aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen')
-rw-r--r--src/codegen/llvm.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
index de132132b0..64485d48bd 100644
--- a/src/codegen/llvm.zig
+++ b/src/codegen/llvm.zig
@@ -699,6 +699,12 @@ pub const Object = struct {
DeclGen.removeFnAttr(llvm_func, "cold");
}
+ if (func.is_noinline) {
+ dg.addFnAttr(llvm_func, "noinline");
+ } else {
+ DeclGen.removeFnAttr(llvm_func, "noinline");
+ }
+
// Remove all the basic blocks of a function in order to start over, generating
// LLVM IR from an empty function body.
while (llvm_func.getFirstBasicBlock()) |bb| {