aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_proc.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-11-14 15:12:37 +0000
committergingerBill <bill@gingerbill.org>2021-11-14 15:12:37 +0000
commit3f038428a7f282468011415db76da4bf08ddb67c (patch)
tree70712155e0f94b43754fd8a28bf40939b8228d0f /src/llvm_backend_proc.cpp
parentb9701340b8faff107fe6a515d5de429141508f48 (diff)
Begin minimizing `Ast` size
Diffstat (limited to 'src/llvm_backend_proc.cpp')
-rw-r--r--src/llvm_backend_proc.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/llvm_backend_proc.cpp b/src/llvm_backend_proc.cpp
index 8b8559cae..25b27ee47 100644
--- a/src/llvm_backend_proc.cpp
+++ b/src/llvm_backend_proc.cpp
@@ -258,8 +258,8 @@ lbProcedure *lb_create_procedure(lbModule *m, Entity *entity, bool ignore_body)
if (entity->file != nullptr) {
file = lb_get_llvm_metadata(m, entity->file);
scope = file;
- } else if (ident != nullptr && ident->file != nullptr) {
- file = lb_get_llvm_metadata(m, ident->file);
+ } else if (ident != nullptr && ident->file_id != 0) {
+ file = lb_get_llvm_metadata(m, ident->file());
scope = file;
} else if (entity->scope != nullptr) {
file = lb_get_llvm_metadata(m, entity->scope->file);