From 5ce6676914f5daadf42613574d4700c2750275de Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 14 Jul 2024 12:41:16 +0100 Subject: Make `#no_capture` map to `nocapture` --- src/llvm_backend_proc.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/llvm_backend_proc.cpp') diff --git a/src/llvm_backend_proc.cpp b/src/llvm_backend_proc.cpp index 1585df865..825434c31 100644 --- a/src/llvm_backend_proc.cpp +++ b/src/llvm_backend_proc.cpp @@ -253,6 +253,9 @@ gb_internal lbProcedure *lb_create_procedure(lbModule *m, Entity *entity, bool i if (e->flags&EntityFlag_NoAlias) { lb_add_proc_attribute_at_index(p, offset+parameter_index, "noalias"); } + if (e->flags&EntityFlag_NoCapture) { + lb_add_proc_attribute_at_index(p, offset+parameter_index, "nocapture"); + } parameter_index += 1; } } -- cgit v1.2.3