ObjCExport: make objc_release nounwind
Also replace it by an LLVM intrinsic, llvm.objc.release, which is lowered to objc_release. This is close to what Clang does.
This commit is contained in:
committed by
Space
parent
0ad440f112
commit
cdfcffbd57
+2
-1
@@ -32,9 +32,10 @@ internal open class ObjCCodeGenerator(val codegen: CodeGenerator) {
|
|||||||
|
|
||||||
val objcRelease = run {
|
val objcRelease = run {
|
||||||
val proto = LlvmFunctionProto(
|
val proto = LlvmFunctionProto(
|
||||||
"objc_release",
|
"llvm.objc.release",
|
||||||
LlvmRetType(voidType),
|
LlvmRetType(voidType),
|
||||||
listOf(LlvmParamType(int8TypePtr)),
|
listOf(LlvmParamType(int8TypePtr)),
|
||||||
|
listOf(LlvmFunctionAttribute.NoUnwind),
|
||||||
origin = context.stdlibModule.llvmSymbolOrigin
|
origin = context.stdlibModule.llvmSymbolOrigin
|
||||||
)
|
)
|
||||||
context.llvm.externalFunction(proto)
|
context.llvm.externalFunction(proto)
|
||||||
|
|||||||
Reference in New Issue
Block a user