| author | |
| committer | |
| log | 9c2fb6e1860d1ea7fab85ceedae290053756d543 |
| tree | b068c102c64c406e419413cb56d093d491d9c052 |
| parent | 9cd521a24f6062889ed574535aa8abc9bf057f81 |
| parent | 1cc890e5c3b5f7fffb826dc8d62a7129987e78ff |
| signature |
llvm: fix missing unwind info (wrong uwtable attribute value)2 files changed, 2 insertions(+), 2 deletions(-)
src/codegen/llvm.zig+1-1| ... | @@ -2572,7 +2572,7 @@ pub const DeclGen = struct { | ... | @@ -2572,7 +2572,7 @@ pub const DeclGen = struct { |
| 2572 | } | 2572 | } |
| 2573 | dg.addFnAttr(llvm_fn, "nounwind"); | 2573 | dg.addFnAttr(llvm_fn, "nounwind"); |
| 2574 | if (comp.unwind_tables) { | 2574 | if (comp.unwind_tables) { |
| 2575 | dg.addFnAttrString(llvm_fn, "uwtable", "sync"); | 2575 | dg.addFnAttrInt(llvm_fn, "uwtable", 2); |
| 2576 | } | 2576 | } |
| 2577 | if (comp.bin_file.options.skip_linker_dependencies or | 2577 | if (comp.bin_file.options.skip_linker_dependencies or |
| 2578 | comp.bin_file.options.no_builtin) | 2578 | comp.bin_file.options.no_builtin) |
src/stage1/codegen.cpp+1-1| ... | @@ -223,7 +223,7 @@ static ZigLLVM_CallingConv get_llvm_cc(CodeGen *g, CallingConvention cc) { | ... | @@ -223,7 +223,7 @@ static ZigLLVM_CallingConv get_llvm_cc(CodeGen *g, CallingConvention cc) { |
| 223 | 223 | ||
| 224 | static void add_uwtable_attr(CodeGen *g, LLVMValueRef fn_val) { | 224 | static void add_uwtable_attr(CodeGen *g, LLVMValueRef fn_val) { |
| 225 | if (g->unwind_tables) { | 225 | if (g->unwind_tables) { |
| 226 | addLLVMFnAttrStr(fn_val, "uwtable", "sync"); | 226 | addLLVMFnAttrInt(fn_val, "uwtable", 2); |
| 227 | } | 227 | } |
| 228 | } | 228 | } |
| 229 | 229 |