From d0bb16f263842b5d163ff8753a24d4d36dd623f0 Mon Sep 17 00:00:00 2001 From: Pasha Bibko <156938226+PashaBibko@users.noreply.github.com> Date: Mon, 28 Apr 2025 21:28:15 +0100 Subject: [PATCH] Added 2 comments --- Parser/src/AST-LLVM.cpp | 2 ++ 1 file changed, 2 insertions(+) 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"); } }