diff options
Diffstat (limited to 'lib/CodeGen/CodeGen.cc')
| -rw-r--r-- | lib/CodeGen/CodeGen.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGen.cc b/lib/CodeGen/CodeGen.cc index ffabf8d..01393a9 100644 --- a/lib/CodeGen/CodeGen.cc +++ b/lib/CodeGen/CodeGen.cc @@ -169,6 +169,13 @@ void CodeGen::compile(const std::vector<std::unique_ptr<StmtAST>> &Statements) { } } + for (const auto &[Class, Methods] : ClassMethods) { + for (const auto &[Name, Method] : Methods) { + SaveAndRestore<int> Location(DiagnosticLine, Method->getLine()); + FuncGen->emitPrototype(Method->getProto()); + } + } + for (const auto &Stmt : Statements) { SaveAndRestore<int> Location(DiagnosticLine, Stmt->getLine()); emitStmt(Stmt.get()); |
