Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/CodeGen/CGObjC.cpp
Show First 20 Lines • Show All 2,709 Lines • ▼ Show 20 Lines | llvm::Value *CodeGenFunction::EmitObjCAutoreleasePoolPush() { | ||||
return EmitNounwindRuntimeCall(fn); | return EmitNounwindRuntimeCall(fn); | ||||
} | } | ||||
/// Produce the code to do a primitive release. | /// Produce the code to do a primitive release. | ||||
/// call void \@objc_autoreleasePoolPop(i8* %ptr) | /// call void \@objc_autoreleasePoolPop(i8* %ptr) | ||||
void CodeGenFunction::EmitObjCAutoreleasePoolPop(llvm::Value *value) { | void CodeGenFunction::EmitObjCAutoreleasePoolPop(llvm::Value *value) { | ||||
assert(value->getType() == Int8PtrTy); | assert(value->getType() == Int8PtrTy); | ||||
if (getInvokeDest()) { | if (shouldUseUnwindAbort() || getInvokeDest()) { | ||||
// Call the runtime method not the intrinsic if we are handling exceptions | // Call the runtime method not the intrinsic if we are handling exceptions | ||||
llvm::FunctionCallee &fn = | llvm::FunctionCallee &fn = | ||||
CGM.getObjCEntrypoints().objc_autoreleasePoolPopInvoke; | CGM.getObjCEntrypoints().objc_autoreleasePoolPopInvoke; | ||||
if (!fn) { | if (!fn) { | ||||
llvm::FunctionType *fnType = | llvm::FunctionType *fnType = | ||||
llvm::FunctionType::get(Builder.getVoidTy(), Int8PtrTy, false); | llvm::FunctionType::get(Builder.getVoidTy(), Int8PtrTy, false); | ||||
fn = CGM.CreateRuntimeFunction(fnType, "objc_autoreleasePoolPop"); | fn = CGM.CreateRuntimeFunction(fnType, "objc_autoreleasePoolPop"); | ||||
setARCRuntimeFunctionLinkage(CGM, fn); | setARCRuntimeFunctionLinkage(CGM, fn); | ||||
▲ Show 20 Lines • Show All 1,380 Lines • Show Last 20 Lines |