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 proto = LlvmFunctionProto(
|
||||
"objc_release",
|
||||
"llvm.objc.release",
|
||||
LlvmRetType(voidType),
|
||||
listOf(LlvmParamType(int8TypePtr)),
|
||||
listOf(LlvmFunctionAttribute.NoUnwind),
|
||||
origin = context.stdlibModule.llvmSymbolOrigin
|
||||
)
|
||||
context.llvm.externalFunction(proto)
|
||||
|
||||
Reference in New Issue
Block a user