mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-07 20:43:40 +00:00
compiler: add nounwind attribute
This attribute is also set by Clang when it compiles C source files (unless -fexceptions is set). The advantage is that no unwind tables are emitted on Linux (and perhaps other systems). It also avoids __aeabi_unwind_cpp_pr0 on ARM when using the musl libc.
This commit is contained in:
committed by
Ron Evans
parent
112b369636
commit
478dd3a28d
@@ -489,6 +489,7 @@ func (c *compilerContext) getInterfaceInvokeWrapper(fn *ssa.Function, llvmFn llv
|
||||
paramTypes := append([]llvm.Type{c.i8ptrType}, fnType.ParamTypes()[len(expandedReceiverType):]...)
|
||||
wrapFnType := llvm.FunctionType(fnType.ReturnType(), paramTypes, false)
|
||||
wrapper = llvm.AddFunction(c.mod, wrapperName, wrapFnType)
|
||||
c.addStandardAttributes(wrapper)
|
||||
wrapper.LastParam().SetName("parentHandle")
|
||||
|
||||
wrapper.SetLinkage(llvm.LinkOnceODRLinkage)
|
||||
|
||||
Reference in New Issue
Block a user