Browse Source

Make `#no_capture` map to `nocapture`

gingerBill 1 year ago
parent
commit
5ce6676914
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/llvm_backend_proc.cpp

+ 3 - 0
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;
 		}
 	}