diff --git a/Parser/src/AST-LLVM.cpp b/Parser/src/AST-LLVM.cpp index 2adb8ae..88fe28a 100644 --- a/Parser/src/AST-LLVM.cpp +++ b/Parser/src/AST-LLVM.cpp @@ -92,9 +92,11 @@ namespace LX::AST llvm::Value* VariableAccess::GenIR(InfoLLVM& LLVM) { + // Loads the variable from the current scope // llvm::AllocaInst* var = LLVM.scope->GetVar(m_Name); ThrowIf(var == nullptr); + // Creates the load within the AST // return LLVM.builder.CreateLoad(llvm::Type::getInt32Ty(LLVM.context), var, m_Name + "_val"); } }