[IR gen] debugging
This commit is contained in:
@ -18,6 +18,7 @@ add_executable(sysyc
|
||||
SysYIRGenerator.cpp
|
||||
Backend.cpp
|
||||
LLVMIRGenerator.cpp
|
||||
LLVMIRGenerator_1.cpp
|
||||
)
|
||||
target_include_directories(sysyc PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
||||
target_compile_options(sysyc PRIVATE -frtti)
|
||||
|
||||
@ -171,6 +171,7 @@ std::any LLVMIRGenerator::visitVarDef(SysYParser::VarDefContext* ctx) {
|
||||
std::string llvmType = getLLVMType(type);
|
||||
std::string allocaName = getNextTemp();
|
||||
|
||||
|
||||
irStream << " " << allocaName << " = alloca " << llvmType << ", align 4\n";
|
||||
|
||||
if (ctx->ASSIGN()) {
|
||||
|
||||
Reference in New Issue
Block a user