aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index f19f6bb8bf..a34312c5de 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -275,6 +275,12 @@ static LLVMValueRef fn_llvm_value(CodeGen *g, FnTableEntry *fn_table_entry) {
ZigLLVMAddFunctionAttr(fn_table_entry->llvm_value, "no-frame-pointer-elim", "true");
ZigLLVMAddFunctionAttr(fn_table_entry->llvm_value, "no-frame-pointer-elim-non-leaf", nullptr);
}
+ if (fn_table_entry->section_name) {
+ LLVMSetSection(fn_table_entry->llvm_value, buf_ptr(fn_table_entry->section_name));
+ }
+ if (fn_table_entry->alignment) {
+ LLVMSetAlignment(fn_table_entry->llvm_value, fn_table_entry->alignment);
+ }
return fn_table_entry->llvm_value;
}