aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2023-12-15 14:30:23 +0000
committerMichael Williamson <mike@zwobble.org>2023-12-15 14:30:23 +0000
commit3816d24d46d9ff779e9bf837182c611d99809d5d (patch)
tree42ecb70c1b29e6b4c3afb0a1771549f688390a65 /src/main/java
parent64ae63e69b6a5f180b869bd49fa92aaed7407021 (diff)
Use global context properly in LLVM backend
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/shedlang/compiler/backends/llvm/codegen/LlvmPatioCodeGen.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/shedlang/compiler/backends/llvm/codegen/LlvmPatioCodeGen.java b/src/main/java/org/shedlang/compiler/backends/llvm/codegen/LlvmPatioCodeGen.java
index 730169e5..cac25645 100644
--- a/src/main/java/org/shedlang/compiler/backends/llvm/codegen/LlvmPatioCodeGen.java
+++ b/src/main/java/org/shedlang/compiler/backends/llvm/codegen/LlvmPatioCodeGen.java
@@ -80,7 +80,7 @@ public class LlvmPatioCodeGen {
PatioCompilationUnit patioCompilationUnit,
LlvmPatioCodeGenGlobalContext globalContext
) {
- var context = LlvmPatioCodeGenModuleContext.EMPTY
+ var context = globalContext.enterModule()
.addTopLevelEntity(ALLOC_DECLARATION)
.addTopLevelEntity(SETJMP_DECLARATION)
.addTopLevelEntity(EXCEPTION_HANDLER_DECLARATION)