add Utils::initExternalFunction
This commit is contained in:
@@ -6,9 +6,9 @@ using namespace std;
|
||||
#include "SysYLexer.h"
|
||||
#include "SysYParser.h"
|
||||
using namespace antlr4;
|
||||
#include "Backend.h"
|
||||
// #include "Backend.h"
|
||||
#include "SysYIRGenerator.h"
|
||||
#include "LLVMIRGenerator.h"
|
||||
// #include "LLVMIRGenerator.h"
|
||||
using namespace sysy;
|
||||
|
||||
static string argStopAfter;
|
||||
@@ -78,12 +78,13 @@ int main(int argc, char **argv) {
|
||||
auto moduleIR = generator.get();
|
||||
// moduleIR->print(cout);
|
||||
return EXIT_SUCCESS;
|
||||
} else if (argStopAfter == "llvmir") {
|
||||
LLVMIRGenerator llvmirGenerator;
|
||||
llvmirGenerator.generateIR(moduleAST); // 使用公共接口生成 IR
|
||||
cout << llvmirGenerator.getIR();
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
}
|
||||
// else if (argStopAfter == "llvmir") {
|
||||
// LLVMIRGenerator llvmirGenerator;
|
||||
// llvmirGenerator.generateIR(moduleAST); // 使用公共接口生成 IR
|
||||
// cout << llvmirGenerator.getIR();
|
||||
// return EXIT_SUCCESS;
|
||||
// }
|
||||
|
||||
// // generate assembly
|
||||
// CodeGen codegen(moduleIR);
|
||||
|
||||
Reference in New Issue
Block a user