aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_proc.cpp
diff options
context:
space:
mode:
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);