summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2018-12-18 20:33:00 +0000
committerPete Cooper <peter_cooper@apple.com>2018-12-18 20:33:00 +0000
commit6682997445e8ad84b4fbab29270e016af5a31be3 (patch)
tree44f2f98644148c9dd9142a8f1caf595ab10f7452
parentccfb6f1d2d2ec37c38a5583d63a8a7974d032c59 (diff)
downloadclang-6682997445e8ad84b4fbab29270e016af5a31be3.tar.gz
Generate objc intrinsics instead of runtime calls as the ARC optimizer now works only on intrinsics
Differential Revision: https://reviews.llvm.org/D55802 Reviewers: rjmccall git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349535 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/CGObjC.cpp165
-rw-r--r--lib/CodeGen/CodeGenModule.h4
-rw-r--r--test/CodeGenObjC/arc-arm.m4
-rw-r--r--test/CodeGenObjC/arc-block-copy-escape.m4
-rw-r--r--test/CodeGenObjC/arc-blocks.m150
-rw-r--r--test/CodeGenObjC/arc-bridged-cast.m16
-rw-r--r--test/CodeGenObjC/arc-exceptions.m8
-rw-r--r--test/CodeGenObjC/arc-foreach.m28
-rw-r--r--test/CodeGenObjC/arc-i386.m4
-rw-r--r--test/CodeGenObjC/arc-linetable-autorelease.m4
-rw-r--r--test/CodeGenObjC/arc-linetable.m10
-rw-r--r--test/CodeGenObjC/arc-literals.m60
-rw-r--r--test/CodeGenObjC/arc-loadweakretained-release.m12
-rw-r--r--test/CodeGenObjC/arc-no-runtime.m8
-rw-r--r--test/CodeGenObjC/arc-precise-lifetime.m54
-rw-r--r--test/CodeGenObjC/arc-property.m20
-rw-r--r--test/CodeGenObjC/arc-related-result-type.m8
-rw-r--r--test/CodeGenObjC/arc-ternary-op.m26
-rw-r--r--test/CodeGenObjC/arc-unbridged-cast.m2
-rw-r--r--test/CodeGenObjC/arc-unopt.m8
-rw-r--r--test/CodeGenObjC/arc-unoptimized-byref-var.m4
-rw-r--r--test/CodeGenObjC/arc-unsafeclaim.m44
-rw-r--r--test/CodeGenObjC/arc-weak-property.m8
-rw-r--r--test/CodeGenObjC/arc-weak.m4
-rw-r--r--test/CodeGenObjC/arc-with-atthrow.m4
-rw-r--r--test/CodeGenObjC/arc.ll10
-rw-r--r--test/CodeGenObjC/arc.m322
-rw-r--r--test/CodeGenObjC/autorelease.m6
-rw-r--r--test/CodeGenObjC/debug-info-block-line.m8
-rw-r--r--test/CodeGenObjC/empty-collection-literals.m12
-rw-r--r--test/CodeGenObjC/fragile-arc.m24
-rw-r--r--test/CodeGenObjC/mrc-weak.m40
-rw-r--r--test/CodeGenObjC/noescape.m8
-rw-r--r--test/CodeGenObjC/ns_consume_null_check.m16
-rw-r--r--test/CodeGenObjC/nsvalue-objc-boxable-ios-arc.m24
-rw-r--r--test/CodeGenObjC/nsvalue-objc-boxable-mac-arc.m24
-rw-r--r--test/CodeGenObjC/objc-arc-container-subscripting.m6
-rw-r--r--test/CodeGenObjC/os_log.m8
-rw-r--r--test/CodeGenObjC/parameterized_classes.m6
-rw-r--r--test/CodeGenObjC/stret-lifetime.m2
-rw-r--r--test/CodeGenObjC/strong-in-c-struct.m20
-rw-r--r--test/CodeGenObjC/weak-in-c-struct.m20
-rw-r--r--test/CodeGenObjCXX/arc-attrs.mm8
-rw-r--r--test/CodeGenObjCXX/arc-blocks.mm22
-rw-r--r--test/CodeGenObjCXX/arc-constexpr.mm18
-rw-r--r--test/CodeGenObjCXX/arc-cxx11-init-list.mm10
-rw-r--r--test/CodeGenObjCXX/arc-exceptions.mm20
-rw-r--r--test/CodeGenObjCXX/arc-forwarded-lambda-call.mm8
-rw-r--r--test/CodeGenObjCXX/arc-globals.mm8
-rw-r--r--test/CodeGenObjCXX/arc-indirect.mm2
-rw-r--r--test/CodeGenObjCXX/arc-move.mm10
-rw-r--r--test/CodeGenObjCXX/arc-new-delete.mm28
-rw-r--r--test/CodeGenObjCXX/arc-pseudo-destructors.mm8
-rw-r--r--test/CodeGenObjCXX/arc-references.mm22
-rw-r--r--test/CodeGenObjCXX/arc-returns-inner-reference-ptr.mm4
-rw-r--r--test/CodeGenObjCXX/arc-special-member-functions.mm20
-rw-r--r--test/CodeGenObjCXX/arc-weak.mm8
-rw-r--r--test/CodeGenObjCXX/arc.mm96
-rw-r--r--test/CodeGenObjCXX/block-nested-in-lambda.mm16
-rw-r--r--test/CodeGenObjCXX/destroy.mm4
-rw-r--r--test/CodeGenObjCXX/lambda-expressions.mm10
-rw-r--r--test/CodeGenObjCXX/literals.mm44
-rw-r--r--test/CodeGenObjCXX/microsoft-abi-arc-param-order.mm4
-rw-r--r--test/CodeGenObjCXX/mrc-weak.mm40
-rw-r--r--test/CodeGenObjCXX/objc-weak.mm14
-rw-r--r--test/SemaObjC/arc-objc-lifetime-conflict.m14
66 files changed, 836 insertions, 817 deletions
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp
index cc582b926b..3747f4920a 100644
--- a/lib/CodeGen/CGObjC.cpp
+++ b/lib/CodeGen/CGObjC.cpp
@@ -1873,12 +1873,8 @@ void CodeGenFunction::EmitARCIntrinsicUse(ArrayRef<llvm::Value*> values) {
EmitNounwindRuntimeCall(fn, values);
}
-
-static llvm::Constant *createARCRuntimeFunction(CodeGenModule &CGM,
- llvm::FunctionType *FTy,
- StringRef Name) {
- llvm::Constant *RTF = CGM.CreateRuntimeFunction(FTy, Name);
-
+static void setARCRuntimeFunctionLinkage(CodeGenModule &CGM,
+ llvm::Constant *RTF) {
if (auto *F = dyn_cast<llvm::Function>(RTF)) {
// If the target runtime doesn't naturally support ARC, emit weak
// references to the runtime support library. We don't really
@@ -1886,14 +1882,8 @@ static llvm::Constant *createARCRuntimeFunction(CodeGenModule &CGM,
if (!CGM.getLangOpts().ObjCRuntime.hasNativeARC() &&
!CGM.getTriple().isOSBinFormatCOFF()) {
F->setLinkage(llvm::Function::ExternalWeakLinkage);
- } else if (Name == "objc_retain" || Name == "objc_release") {
- // If we have Native ARC, set nonlazybind attribute for these APIs for
- // performance.
- F->addFnAttr(llvm::Attribute::NonLazyBind);
}
}
-
- return RTF;
}
/// Perform an operation having the signature
@@ -1903,15 +1893,14 @@ static llvm::Value *emitARCValueOperation(CodeGenFunction &CGF,
llvm::Value *value,
llvm::Type *returnType,
llvm::Constant *&fn,
- StringRef fnName,
+ llvm::Intrinsic::ID IntID,
bool isTailCall = false) {
if (isa<llvm::ConstantPointerNull>(value))
return value;
if (!fn) {
- llvm::FunctionType *fnType =
- llvm::FunctionType::get(CGF.Int8PtrTy, CGF.Int8PtrTy, false);
- fn = createARCRuntimeFunction(CGF.CGM, fnType, fnName);
+ fn = CGF.CGM.getIntrinsic(IntID);
+ setARCRuntimeFunctionLinkage(CGF.CGM, fn);
}
// Cast the argument to 'id'.
@@ -1932,11 +1921,10 @@ static llvm::Value *emitARCValueOperation(CodeGenFunction &CGF,
static llvm::Value *emitARCLoadOperation(CodeGenFunction &CGF,
Address addr,
llvm::Constant *&fn,
- StringRef fnName) {
+ llvm::Intrinsic::ID IntID) {
if (!fn) {
- llvm::FunctionType *fnType =
- llvm::FunctionType::get(CGF.Int8PtrTy, CGF.Int8PtrPtrTy, false);
- fn = createARCRuntimeFunction(CGF.CGM, fnType, fnName);
+ fn = CGF.CGM.getIntrinsic(IntID);
+ setARCRuntimeFunctionLinkage(CGF.CGM, fn);
}
// Cast the argument to 'id*'.
@@ -1959,16 +1947,13 @@ static llvm::Value *emitARCStoreOperation(CodeGenFunction &CGF,
Address addr,
llvm::Value *value,
llvm::Constant *&fn,
- StringRef fnName,
+ llvm::Intrinsic::ID IntID,
bool ignored) {
assert(addr.getElementType() == value->getType());
if (!fn) {
- llvm::Type *argTypes[] = { CGF.Int8PtrPtrTy, CGF.Int8PtrTy };
-
- llvm::FunctionType *fnType
- = llvm::FunctionType::get(CGF.Int8PtrTy, argTypes, false);
- fn = createARCRuntimeFunction(CGF.CGM, fnType, fnName);
+ fn = CGF.CGM.getIntrinsic(IntID);
+ setARCRuntimeFunctionLinkage(CGF.CGM, fn);
}
llvm::Type *origType = value->getType();
@@ -1990,15 +1975,12 @@ static void emitARCCopyOperation(CodeGenFunction &CGF,
Address dst,
Address src,
llvm::Constant *&fn,
- StringRef fnName) {
+ llvm::Intrinsic::ID IntID) {
assert(dst.getType() == src.getType());
if (!fn) {
- llvm::Type *argTypes[] = { CGF.Int8PtrPtrTy, CGF.Int8PtrPtrTy };
-
- llvm::FunctionType *fnType
- = llvm::FunctionType::get(CGF.Builder.getVoidTy(), argTypes, false);
- fn = createARCRuntimeFunction(CGF.CGM, fnType, fnName);
+ fn = CGF.CGM.getIntrinsic(IntID);
+ setARCRuntimeFunctionLinkage(CGF.CGM, fn);
}
llvm::Value *args[] = {
@@ -2008,6 +1990,34 @@ static void emitARCCopyOperation(CodeGenFunction &CGF,
CGF.EmitNounwindRuntimeCall(fn, args);
}
+/// Perform an operation having the signature
+/// i8* (i8*)
+/// where a null input causes a no-op and returns null.
+static llvm::Value *emitObjCValueOperation(CodeGenFunction &CGF,
+ llvm::Value *value,
+ llvm::Type *returnType,
+ llvm::Constant *&fn,
+ StringRef fnName) {
+ if (isa<llvm::ConstantPointerNull>(value))
+ return value;
+
+ if (!fn) {
+ llvm::FunctionType *fnType =
+ llvm::FunctionType::get(CGF.Int8PtrTy, CGF.Int8PtrTy, false);
+ fn = CGF.CGM.CreateRuntimeFunction(fnType, fnName);
+ }
+
+ // Cast the argument to 'id'.
+ llvm::Type *origType = returnType ? returnType : value->getType();
+ value = CGF.Builder.CreateBitCast(value, CGF.Int8PtrTy);
+
+ // Call the function.
+ llvm::CallInst *call = CGF.EmitNounwindRuntimeCall(fn, value);
+
+ // Cast the result back to the original type.
+ return CGF.Builder.CreateBitCast(call, origType);
+}
+
/// Produce the code to do a retain. Based on the type, calls one of:
/// call i8* \@objc_retain(i8* %value)
/// call i8* \@objc_retainBlock(i8* %value)
@@ -2023,7 +2033,7 @@ llvm::Value *CodeGenFunction::EmitARCRetain(QualType type, llvm::Value *value) {
llvm::Value *CodeGenFunction::EmitARCRetainNonBlock(llvm::Value *value) {
return emitARCValueOperation(*this, value, nullptr,
CGM.getObjCEntrypoints().objc_retain,
- "objc_retain");
+ llvm::Intrinsic::objc_retain);
}
/// Retain the given block, with _Block_copy semantics.
@@ -2037,7 +2047,7 @@ llvm::Value *CodeGenFunction::EmitARCRetainBlock(llvm::Value *value,
llvm::Value *result
= emitARCValueOperation(*this, value, nullptr,
CGM.getObjCEntrypoints().objc_retainBlock,
- "objc_retainBlock");
+ llvm::Intrinsic::objc_retainBlock);
// If the copy isn't mandatory, add !clang.arc.copy_on_escape to
// tell the optimizer that it doesn't need to do this copy if the
@@ -2107,7 +2117,7 @@ CodeGenFunction::EmitARCRetainAutoreleasedReturnValue(llvm::Value *value) {
emitAutoreleasedReturnValueMarker(*this);
return emitARCValueOperation(*this, value, nullptr,
CGM.getObjCEntrypoints().objc_retainAutoreleasedReturnValue,
- "objc_retainAutoreleasedReturnValue");
+ llvm::Intrinsic::objc_retainAutoreleasedReturnValue);
}
/// Claim a possibly-autoreleased return value at +0. This is only
@@ -2122,7 +2132,7 @@ CodeGenFunction::EmitARCUnsafeClaimAutoreleasedReturnValue(llvm::Value *value) {
emitAutoreleasedReturnValueMarker(*this);
return emitARCValueOperation(*this, value, nullptr,
CGM.getObjCEntrypoints().objc_unsafeClaimAutoreleasedReturnValue,
- "objc_unsafeClaimAutoreleasedReturnValue");
+ llvm::Intrinsic::objc_unsafeClaimAutoreleasedReturnValue);
}
/// Release the given object.
@@ -2133,9 +2143,8 @@ void CodeGenFunction::EmitARCRelease(llvm::Value *value,
llvm::Constant *&fn = CGM.getObjCEntrypoints().objc_release;
if (!fn) {
- llvm::FunctionType *fnType =
- llvm::FunctionType::get(Builder.getVoidTy(), Int8PtrTy, false);
- fn = createARCRuntimeFunction(CGM, fnType, "objc_release");
+ fn = CGM.getIntrinsic(llvm::Intrinsic::objc_release);
+ setARCRuntimeFunctionLinkage(CGM, fn);
}
// Cast the argument to 'id'.
@@ -2180,10 +2189,8 @@ llvm::Value *CodeGenFunction::EmitARCStoreStrongCall(Address addr,
llvm::Constant *&fn = CGM.getObjCEntrypoints().objc_storeStrong;
if (!fn) {
- llvm::Type *argTypes[] = { Int8PtrPtrTy, Int8PtrTy };
- llvm::FunctionType *fnType
- = llvm::FunctionType::get(Builder.getVoidTy(), argTypes, false);
- fn = createARCRuntimeFunction(CGM, fnType, "objc_storeStrong");
+ fn = CGM.getIntrinsic(llvm::Intrinsic::objc_storeStrong);
+ setARCRuntimeFunctionLinkage(CGM, fn);
}
llvm::Value *args[] = {
@@ -2237,7 +2244,7 @@ llvm::Value *CodeGenFunction::EmitARCStoreStrong(LValue dst,
llvm::Value *CodeGenFunction::EmitARCAutorelease(llvm::Value *value) {
return emitARCValueOperation(*this, value, nullptr,
CGM.getObjCEntrypoints().objc_autorelease,
- "objc_autorelease");
+ llvm::Intrinsic::objc_autorelease);
}
/// Autorelease the given object.
@@ -2246,7 +2253,7 @@ llvm::Value *
CodeGenFunction::EmitARCAutoreleaseReturnValue(llvm::Value *value) {
return emitARCValueOperation(*this, value, nullptr,
CGM.getObjCEntrypoints().objc_autoreleaseReturnValue,
- "objc_autoreleaseReturnValue",
+ llvm::Intrinsic::objc_autoreleaseReturnValue,
/*isTailCall*/ true);
}
@@ -2256,7 +2263,7 @@ llvm::Value *
CodeGenFunction::EmitARCRetainAutoreleaseReturnValue(llvm::Value *value) {
return emitARCValueOperation(*this, value, nullptr,
CGM.getObjCEntrypoints().objc_retainAutoreleaseReturnValue,
- "objc_retainAutoreleaseReturnValue",
+ llvm::Intrinsic::objc_retainAutoreleaseReturnValue,
/*isTailCall*/ true);
}
@@ -2285,7 +2292,7 @@ llvm::Value *
CodeGenFunction::EmitARCRetainAutoreleaseNonBlock(llvm::Value *value) {
return emitARCValueOperation(*this, value, nullptr,
CGM.getObjCEntrypoints().objc_retainAutorelease,
- "objc_retainAutorelease");
+ llvm::Intrinsic::objc_retainAutorelease);
}
/// i8* \@objc_loadWeak(i8** %addr)
@@ -2293,14 +2300,14 @@ CodeGenFunction::EmitARCRetainAutoreleaseNonBlock(llvm::Value *value) {
llvm::Value *CodeGenFunction::EmitARCLoadWeak(Address addr) {
return emitARCLoadOperation(*this, addr,
CGM.getObjCEntrypoints().objc_loadWeak,
- "objc_loadWeak");
+ llvm::Intrinsic::objc_loadWeak);
}
/// i8* \@objc_loadWeakRetained(i8** %addr)
llvm::Value *CodeGenFunction::EmitARCLoadWeakRetained(Address addr) {
return emitARCLoadOperation(*this, addr,
CGM.getObjCEntrypoints().objc_loadWeakRetained,
- "objc_loadWeakRetained");
+ llvm::Intrinsic::objc_loadWeakRetained);
}
/// i8* \@objc_storeWeak(i8** %addr, i8* %value)
@@ -2310,7 +2317,7 @@ llvm::Value *CodeGenFunction::EmitARCStoreWeak(Address addr,
bool ignored) {
return emitARCStoreOperation(*this, addr, value,
CGM.getObjCEntrypoints().objc_storeWeak,
- "objc_storeWeak", ignored);
+ llvm::Intrinsic::objc_storeWeak, ignored);
}
/// i8* \@objc_initWeak(i8** %addr, i8* %value)
@@ -2330,7 +2337,7 @@ void CodeGenFunction::EmitARCInitWeak(Address addr, llvm::Value *value) {
emitARCStoreOperation(*this, addr, value,
CGM.getObjCEntrypoints().objc_initWeak,
- "objc_initWeak", /*ignored*/ true);
+ llvm::Intrinsic::objc_initWeak, /*ignored*/ true);
}
/// void \@objc_destroyWeak(i8** %addr)
@@ -2338,9 +2345,8 @@ void CodeGenFunction::EmitARCInitWeak(Address addr, llvm::Value *value) {
void CodeGenFunction::EmitARCDestroyWeak(Address addr) {
llvm::Constant *&fn = CGM.getObjCEntrypoints().objc_destroyWeak;
if (!fn) {
- llvm::FunctionType *fnType =
- llvm::FunctionType::get(Builder.getVoidTy(), Int8PtrPtrTy, false);
- fn = createARCRuntimeFunction(CGM, fnType, "objc_destroyWeak");
+ fn = CGM.getIntrinsic(llvm::Intrinsic::objc_destroyWeak);
+ setARCRuntimeFunctionLinkage(CGM, fn);
}
// Cast the argument to 'id*'.
@@ -2355,7 +2361,7 @@ void CodeGenFunction::EmitARCDestroyWeak(Address addr) {
void CodeGenFunction::EmitARCMoveWeak(Address dst, Address src) {
emitARCCopyOperation(*this, dst, src,
CGM.getObjCEntrypoints().objc_moveWeak,
- "objc_moveWeak");
+ llvm::Intrinsic::objc_moveWeak);
}
/// void \@objc_copyWeak(i8** %dest, i8** %src)
@@ -2364,7 +2370,7 @@ void CodeGenFunction::EmitARCMoveWeak(Address dst, Address src) {
void CodeGenFunction::EmitARCCopyWeak(Address dst, Address src) {
emitARCCopyOperation(*this, dst, src,
CGM.getObjCEntrypoints().objc_copyWeak,
- "objc_copyWeak");
+ llvm::Intrinsic::objc_copyWeak);
}
void CodeGenFunction::emitARCCopyAssignWeak(QualType Ty, Address DstAddr,
@@ -2387,9 +2393,8 @@ void CodeGenFunction::emitARCMoveAssignWeak(QualType Ty, Address DstAddr,
llvm::Value *CodeGenFunction::EmitObjCAutoreleasePoolPush() {
llvm::Constant *&fn = CGM.getObjCEntrypoints().objc_autoreleasePoolPush;
if (!fn) {
- llvm::FunctionType *fnType =
- llvm::FunctionType::get(Int8PtrTy, false);
- fn = createARCRuntimeFunction(CGM, fnType, "objc_autoreleasePoolPush");
+ fn = CGM.getIntrinsic(llvm::Intrinsic::objc_autoreleasePoolPush);
+ setARCRuntimeFunctionLinkage(CGM, fn);
}
return EmitNounwindRuntimeCall(fn);
@@ -2400,18 +2405,28 @@ llvm::Value *CodeGenFunction::EmitObjCAutoreleasePoolPush() {
void CodeGenFunction::EmitObjCAutoreleasePoolPop(llvm::Value *value) {
assert(value->getType() == Int8PtrTy);
- llvm::Constant *&fn = CGM.getObjCEntrypoints().objc_autoreleasePoolPop;
- if (!fn) {
- llvm::FunctionType *fnType =
- llvm::FunctionType::get(Builder.getVoidTy(), Int8PtrTy, false);
+ if (getInvokeDest()) {
+ // Call the runtime method not the intrinsic if we are handling exceptions
+ llvm::Constant *&fn =
+ CGM.getObjCEntrypoints().objc_autoreleasePoolPopInvoke;
+ if (!fn) {
+ llvm::FunctionType *fnType =
+ llvm::FunctionType::get(Builder.getVoidTy(), Int8PtrTy, false);
+ fn = CGM.CreateRuntimeFunction(fnType, "objc_autoreleasePoolPop");
+ setARCRuntimeFunctionLinkage(CGM, fn);
+ }
- // We don't want to use a weak import here; instead we should not
- // fall into this path.
- fn = createARCRuntimeFunction(CGM, fnType, "objc_autoreleasePoolPop");
- }
+ // objc_autoreleasePoolPop can throw.
+ EmitRuntimeCallOrInvoke(fn, value);
+ } else {
+ llvm::Constant *&fn = CGM.getObjCEntrypoints().objc_autoreleasePoolPop;
+ if (!fn) {
+ fn = CGM.getIntrinsic(llvm::Intrinsic::objc_autoreleasePoolPop);
+ setARCRuntimeFunctionLinkage(CGM, fn);
+ }
- // objc_autoreleasePoolPop can throw.
- EmitRuntimeCallOrInvoke(fn, value);
+ EmitRuntimeCall(fn, value);
+ }
}
/// Produce the code to do an MRR version objc_autoreleasepool_push.
@@ -2446,18 +2461,18 @@ llvm::Value *CodeGenFunction::EmitObjCMRRAutoreleasePoolPush() {
/// call i8* \@objc_alloc(i8* %value)
llvm::Value *CodeGenFunction::EmitObjCAlloc(llvm::Value *value,
llvm::Type *resultType) {
- return emitARCValueOperation(*this, value, resultType,
- CGM.getObjCEntrypoints().objc_alloc,
- "objc_alloc");
+ return emitObjCValueOperation(*this, value, resultType,
+ CGM.getObjCEntrypoints().objc_alloc,
+ "objc_alloc");
}
/// Allocate the given objc object.
/// call i8* \@objc_allocWithZone(i8* %value)
llvm::Value *CodeGenFunction::EmitObjCAllocWithZone(llvm::Value *value,
llvm::Type *resultType) {
- return emitARCValueOperation(*this, value, resultType,
- CGM.getObjCEntrypoints().objc_allocWithZone,
- "objc_allocWithZone");
+ return emitObjCValueOperation(*this, value, resultType,
+ CGM.getObjCEntrypoints().objc_allocWithZone,
+ "objc_allocWithZone");
}
/// Produce the code to do a primitive release.
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h
index 0f6c3bec9e..f0d72af3ad 100644
--- a/lib/CodeGen/CodeGenModule.h
+++ b/lib/CodeGen/CodeGenModule.h
@@ -128,6 +128,10 @@ struct ObjCEntrypoints {
/// void objc_autoreleasePoolPop(void*);
llvm::Constant *objc_autoreleasePoolPop;
+ /// void objc_autoreleasePoolPop(void*);
+ /// Note this method is used when we are using exception handling
+ llvm::Constant *objc_autoreleasePoolPopInvoke;
+
/// void *objc_autoreleasePoolPush(void);
llvm::Constant *objc_autoreleasePoolPush;
diff --git a/test/CodeGenObjC/arc-arm.m b/test/CodeGenObjC/arc-arm.m
index 63c861f289..b46f956bc6 100644
--- a/test/CodeGenObjC/arc-arm.m
+++ b/test/CodeGenObjC/arc-arm.m
@@ -14,9 +14,9 @@ void test1(void) {
extern id test1_helper(void);
// CHECK: [[T0:%.*]] = call [[CC]]i8* @test1_helper()
// CHECK-NEXT: call void asm sideeffect "mov\09{{fp, fp|r7, r7}}\09\09// marker for objc_retainAutoreleaseReturnValue"
- // CHECK-NEXT: [[T1:%.*]] = call [[CC]]i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
+ // CHECK-NEXT: [[T1:%.*]] = call [[CC]]i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: store i8* [[T1]],
- // CHECK-NEXT: call [[CC]]void @objc_storeStrong(
+ // CHECK-NEXT: call [[CC]]void @llvm.objc.storeStrong(
// CHECK-NEXT: ret void
id x = test1_helper();
}
diff --git a/test/CodeGenObjC/arc-block-copy-escape.m b/test/CodeGenObjC/arc-block-copy-escape.m
index 16a75a0d31..3823a95d6a 100644
--- a/test/CodeGenObjC/arc-block-copy-escape.m
+++ b/test/CodeGenObjC/arc-block-copy-escape.m
@@ -9,14 +9,14 @@ void use_int(int);
void test0(int i) {
block_t block = ^{ use_int(i); };
// CHECK-LABEL: define {{.*}}void @test0(
- // CHECK: call {{.*}}i8* @objc_retainBlock(i8* {{%.*}}) [[NUW:#[0-9]+]], !clang.arc.copy_on_escape
+ // CHECK: call {{.*}}i8* @llvm.objc.retainBlock(i8* {{%.*}}) [[NUW:#[0-9]+]], !clang.arc.copy_on_escape
// CHECK: ret void
}
void test1(int i) {
id block = ^{ use_int(i); };
// CHECK-LABEL: define {{.*}}void @test1(
- // CHECK: call {{.*}}i8* @objc_retainBlock(i8* {{%.*}}) [[NUW]]
+ // CHECK: call {{.*}}i8* @llvm.objc.retainBlock(i8* {{%.*}}) [[NUW]]
// CHECK-NOT: !clang.arc.copy_on_escape
// CHECK: ret void
}
diff --git a/test/CodeGenObjC/arc-blocks.m b/test/CodeGenObjC/arc-blocks.m
index 89317ab113..9181d21311 100644
--- a/test/CodeGenObjC/arc-blocks.m
+++ b/test/CodeGenObjC/arc-blocks.m
@@ -19,10 +19,10 @@ int (^test1(int x))(void) {
// CHECK-NEXT: store i32 {{%.*}}, i32* [[X]]
// CHECK: [[T0:%.*]] = bitcast [[BLOCK_T]]* [[BLOCK]] to i32 ()*
// CHECK-NEXT: [[T1:%.*]] = bitcast i32 ()* [[T0]] to i8*
- // CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainBlock(i8* [[T1]]) [[NUW:#[0-9]+]]
+ // CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainBlock(i8* [[T1]]) [[NUW:#[0-9]+]]
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to i32 ()*
// CHECK-NEXT: [[T4:%.*]] = bitcast i32 ()* [[T3]] to i8*
- // CHECK-NEXT: [[T5:%.*]] = tail call i8* @objc_autoreleaseReturnValue(i8* [[T4]]) [[NUW]]
+ // CHECK-NEXT: [[T5:%.*]] = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* [[T4]]) [[NUW]]
// CHECK-NEXT: [[T6:%.*]] = bitcast i8* [[T5]] to i32 ()*
// CHECK-NEXT: ret i32 ()* [[T6]]
return ^{ return x; };
@@ -32,19 +32,19 @@ void test2(id x) {
// CHECK-LABEL: define void @test2(
// CHECK: [[X:%.*]] = alloca i8*,
// CHECK-NEXT: [[BLOCK:%.*]] = alloca [[BLOCK_T:<{.*}>]],
-// CHECK-NEXT: [[PARM:%.*]] = call i8* @objc_retain(i8* {{%.*}})
+// CHECK-NEXT: [[PARM:%.*]] = call i8* @llvm.objc.retain(i8* {{%.*}})
// CHECK-NEXT: store i8* [[PARM]], i8** [[X]]
// CHECK-NEXT: [[SLOTREL:%.*]] = getelementptr inbounds [[BLOCK_T]], [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
// CHECK: [[SLOT:%.*]] = getelementptr inbounds [[BLOCK_T]], [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[X]],
-// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retain(i8* [[T0]])
+// CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retain(i8* [[T0]])
// CHECK-NEXT: store i8* [[T1]], i8** [[SLOT]],
// CHECK-NEXT: bitcast
// CHECK-NEXT: call void @test2_helper(
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[SLOTREL]]
-// CHECK-NEXT: call void @objc_release(i8* [[T0]]) [[NUW]], !clang.imprecise_release
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]]) [[NUW]], !clang.imprecise_release
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[X]]
-// CHECK-NEXT: call void @objc_release(i8* [[T0]]) [[NUW]], !clang.imprecise_release
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]]) [[NUW]], !clang.imprecise_release
// CHECK-NEXT: ret void
extern void test2_helper(id (^)(void));
test2_helper(^{ return x; });
@@ -56,7 +56,7 @@ void test2(id x) {
// CHECK-NEXT: [[DST:%.*]] = bitcast i8* [[T0]] to [[BLOCK_T]]*
// CHECK-NEXT: [[T0:%.*]] = getelementptr inbounds [[BLOCK_T]], [[BLOCK_T]]* [[SRC]], i32 0, i32 5
// CHECK-NEXT: [[T1:%.*]] = load i8*, i8** [[T0]]
-// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retain(i8* [[T1]]) [[NUW]]
+// CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retain(i8* [[T1]]) [[NUW]]
// CHECK-NEXT: ret void
@@ -65,7 +65,7 @@ void test2(id x) {
// CHECK-NEXT: [[T1:%.*]] = bitcast i8* [[T0]] to [[BLOCK_T]]*
// CHECK-NEXT: [[T2:%.*]] = getelementptr inbounds [[BLOCK_T]], [[BLOCK_T]]* [[T1]], i32 0, i32 5
// CHECK-NEXT: [[T3:%.*]] = load i8*, i8** [[T2]]
-// CHECK-NEXT: call void @objc_release(i8* [[T3]])
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[T3]])
// CHECK-NEXT: ret void
}
@@ -78,7 +78,7 @@ void test3(void (^sink)(id*)) {
// CHECK-NEXT: [[STRONG:%.*]] = alloca i8*
// CHECK-NEXT: [[TEMP:%.*]] = alloca i8*
// CHECK-NEXT: bitcast void (i8**)* {{%.*}} to i8*
- // CHECK-NEXT: call i8* @objc_retain(
+ // CHECK-NEXT: call i8* @llvm.objc.retain(
// CHECK-NEXT: bitcast i8*
// CHECK-NEXT: store void (i8**)* {{%.*}}, void (i8**)** [[SINK]]
// CHECK-NEXT: [[STRONGPTR1:%.*]] = bitcast i8** [[STRONG]] to i8*
@@ -95,20 +95,20 @@ void test3(void (^sink)(id*)) {
// CHECK-NEXT: [[F1:%.*]] = bitcast i8* [[F0]] to void (i8*, i8**)*
// CHECK-NEXT: call void [[F1]](i8* [[BLOCK]], i8** [[TEMP]])
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[TEMP]]
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retain(i8* [[T0]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retain(i8* [[T0]])
// CHECK-NEXT: call void (...) @clang.arc.use(i8* [[V]]) [[NUW]]
// CHECK-NEXT: [[T2:%.*]] = load i8*, i8** [[STRONG]]
// CHECK-NEXT: store i8* [[T1]], i8** [[STRONG]]
- // CHECK-NEXT: call void @objc_release(i8* [[T2]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T2]])
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[STRONG]]
- // CHECK-NEXT: call void @objc_release(i8* [[T0]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]])
// CHECK-NEXT: [[STRONGPTR2:%.*]] = bitcast i8** [[STRONG]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[STRONGPTR2]])
// CHECK-NEXT: load void (i8**)*, void (i8**)** [[SINK]]
// CHECK-NEXT: bitcast
- // CHECK-NEXT: call void @objc_release
+ // CHECK-NEXT: call void @llvm.objc.release
// CHECK-NEXT: ret void
}
@@ -127,7 +127,7 @@ void test4(void) {
// CHECK-NEXT: store i32 838860800, i32* [[T0]]
// CHECK: [[SLOT:%.*]] = getelementptr inbounds [[BYREF_T]], [[BYREF_T]]* [[VAR]], i32 0, i32 6
// CHECK-NEXT: [[T0:%.*]] = call i8* @test4_source()
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: store i8* [[T1]], i8** [[SLOT]]
// CHECK-NEXT: [[SLOT:%.*]] = getelementptr inbounds [[BYREF_T]], [[BYREF_T]]* [[VAR]], i32 0, i32 6
// 0x42800000 - has signature, copy/dispose helpers, as well as BLOCK_HAS_EXTENDED_LAYOUT
@@ -138,7 +138,7 @@ void test4(void) {
// CHECK: [[T0:%.*]] = bitcast [[BYREF_T]]* [[VAR]] to i8*
// CHECK-NEXT: call void @_Block_object_dispose(i8* [[T0]], i32 8)
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[SLOT]]
- // CHECK-NEXT: call void @objc_release(i8* [[T0]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]])
// CHECK: ret void
// CHECK-LABEL: define internal void @__Block_byref_object_copy_(i8*, i8*) #{{[0-9]+}} {
@@ -153,13 +153,13 @@ void test4(void) {
// CHECK-LABEL: define internal void @__Block_byref_object_dispose_(i8*) #{{[0-9]+}} {
// CHECK: [[T0:%.*]] = getelementptr inbounds [[BYREF_T]], [[BYREF_T]]* {{%.*}}, i32 0, i32 6
// CHECK-NEXT: [[T1:%.*]] = load i8*, i8** [[T0]]
- // CHECK-NEXT: call void @objc_release(i8* [[T1]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]])
// CHECK-LABEL: define internal void @__test4_block_invoke
// CHECK: [[SLOT:%.*]] = getelementptr inbounds {{.*}}, i32 0, i32 6
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[SLOT]], align 8
// CHECK-NEXT: store i8* null, i8** [[SLOT]],
- // CHECK-NEXT: call void @objc_release(i8* [[T0]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]])
// CHECK-NEXT: ret void
// CHECK-LABEL: define linkonce_odr hidden void @__copy_helper_block_8_32r(i8*, i8*) unnamed_addr #{{[0-9]+}} {
@@ -181,9 +181,9 @@ void test5(void) {
// CHECK-NEXT: [[VARPTR1:%.*]] = bitcast i8** [[VAR]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[VARPTR1]])
// CHECK: [[T0:%.*]] = call i8* @test5_source()
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: store i8* [[T1]], i8** [[VAR]],
- // CHECK-NEXT: call void @objc_release(i8* [[T1]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]])
// 0x40800000 - has signature but no copy/dispose, as well as BLOCK_HAS_EXTENDED_LAYOUT
// CHECK: store i32 -1073741824, i32*
// CHECK: [[CAPTURE:%.*]] = getelementptr inbounds [[BLOCK_T]], [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
@@ -212,9 +212,9 @@ void test6(void) {
// CHECK-NEXT: store i32 1107296256, i32* [[T0]]
// CHECK: [[SLOT:%.*]] = getelementptr inbounds [[BYREF_T]], [[BYREF_T]]* [[VAR]], i32 0, i32 6
// CHECK-NEXT: [[T0:%.*]] = call i8* @test6_source()
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
- // CHECK-NEXT: call i8* @objc_initWeak(i8** [[SLOT]], i8* [[T1]])
- // CHECK-NEXT: call void @objc_release(i8* [[T1]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
+ // CHECK-NEXT: call i8* @llvm.objc.initWeak(i8** [[SLOT]], i8* [[T1]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]])
// CHECK-NEXT: [[SLOT:%.*]] = getelementptr inbounds [[BYREF_T]], [[BYREF_T]]* [[VAR]], i32 0, i32 6
// 0x42800000 - has signature, copy/dispose helpers, as well as BLOCK_HAS_EXTENDED_LAYOUT
// CHECK: store i32 -1040187392,
@@ -225,7 +225,7 @@ void test6(void) {
// CHECK: call void @test6_helper(
// CHECK: [[T0:%.*]] = bitcast [[BYREF_T]]* [[VAR]] to i8*
// CHECK-NEXT: call void @_Block_object_dispose(i8* [[T0]], i32 8)
- // CHECK-NEXT: call void @objc_destroyWeak(i8** [[SLOT]])
+ // CHECK-NEXT: call void @llvm.objc.destroyWeak(i8** [[SLOT]])
// CHECK-NEXT: [[VARPTR2:%.*]] = bitcast [[BYREF_T]]* [[VAR]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 48, i8* [[VARPTR2]])
// CHECK-NEXT: ret void
@@ -235,15 +235,15 @@ void test6(void) {
// CHECK-NEXT: load i8*, i8**
// CHECK-NEXT: bitcast i8* {{%.*}} to [[BYREF_T]]*
// CHECK-NEXT: [[T1:%.*]] = getelementptr inbounds [[BYREF_T]], [[BYREF_T]]* {{%.*}}, i32 0, i32 6
- // CHECK-NEXT: call void @objc_moveWeak(i8** [[T0]], i8** [[T1]])
+ // CHECK-NEXT: call void @llvm.objc.moveWeak(i8** [[T0]], i8** [[T1]])
// CHECK-LABEL: define internal void @__Block_byref_object_dispose_.{{[0-9]+}}(i8*) #{{[0-9]+}} {
// CHECK: [[T0:%.*]] = getelementptr inbounds [[BYREF_T]], [[BYREF_T]]* {{%.*}}, i32 0, i32 6
- // CHECK-NEXT: call void @objc_destroyWeak(i8** [[T0]])
+ // CHECK-NEXT: call void @llvm.objc.destroyWeak(i8** [[T0]])
// CHECK-LABEL: define internal void @__test6_block_invoke
// CHECK: [[SLOT:%.*]] = getelementptr inbounds {{.*}}, i32 0, i32 6
- // CHECK-NEXT: call i8* @objc_storeWeak(i8** [[SLOT]], i8* null)
+ // CHECK-NEXT: call i8* @llvm.objc.storeWeak(i8** [[SLOT]], i8* null)
// CHECK-NEXT: ret void
}
@@ -258,33 +258,33 @@ void test7(void) {
// CHECK: [[VAR:%.*]] = alloca i8*,
// CHECK-NEXT: [[BLOCK:%.*]] = alloca [[BLOCK_T:<{.*}>]],
// CHECK: [[T0:%.*]] = call i8* @test7_source()
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
- // CHECK-NEXT: call i8* @objc_initWeak(i8** [[VAR]], i8* [[T1]])
- // CHECK-NEXT: call void @objc_release(i8* [[T1]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
+ // CHECK-NEXT: call i8* @llvm.objc.initWeak(i8** [[VAR]], i8* [[T1]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]])
// 0x42800000 - has signature, copy/dispose helpers, as well as BLOCK_HAS_EXTENDED_LAYOUT
// CHECK: store i32 -1040187392,
// CHECK: [[SLOT:%.*]] = getelementptr inbounds [[BLOCK_T]], [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
- // CHECK-NEXT: call void @objc_copyWeak(i8** [[SLOT]], i8** [[VAR]])
+ // CHECK-NEXT: call void @llvm.objc.copyWeak(i8** [[SLOT]], i8** [[VAR]])
// CHECK: call void @test7_helper(
- // CHECK-NEXT: call void @objc_destroyWeak(i8** {{%.*}})
- // CHECK-NEXT: call void @objc_destroyWeak(i8** [[VAR]])
+ // CHECK-NEXT: call void @llvm.objc.destroyWeak(i8** {{%.*}})
+ // CHECK-NEXT: call void @llvm.objc.destroyWeak(i8** [[VAR]])
// CHECK: ret void
// CHECK-LABEL: define internal void @__test7_block_invoke
// CHECK: [[SLOT:%.*]] = getelementptr inbounds [[BLOCK_T]], [[BLOCK_T]]* {{%.*}}, i32 0, i32 5
- // CHECK-NEXT: [[T0:%.*]] = call i8* @objc_loadWeakRetained(i8** [[SLOT]])
+ // CHECK-NEXT: [[T0:%.*]] = call i8* @llvm.objc.loadWeakRetained(i8** [[SLOT]])
// CHECK-NEXT: call void @test7_consume(i8* [[T0]])
- // CHECK-NEXT: call void @objc_release(i8* [[T0]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]])
// CHECK: ret void
// CHECK-LABEL: define linkonce_odr hidden void @__copy_helper_block_8_32w(i8*, i8*) unnamed_addr #{{[0-9]+}} {
// CHECK: getelementptr
// CHECK-NEXT: getelementptr
- // CHECK-NEXT: call void @objc_copyWeak(
+ // CHECK-NEXT: call void @llvm.objc.copyWeak(
// CHECK-LABEL: define linkonce_odr hidden void @__destroy_helper_block_8_32w(i8*) unnamed_addr #{{[0-9]+}} {
// CHECK: getelementptr
- // CHECK-NEXT: call void @objc_destroyWeak(
+ // CHECK-NEXT: call void @llvm.objc.destroyWeak(
}
@interface Test8 @end
@@ -323,11 +323,11 @@ id test9(void) {
// CHECK: load i8*, i8** getelementptr
// CHECK-NEXT: bitcast i8*
// CHECK-NEXT: call i8*
-// CHECK-NEXT: tail call i8* @objc_autoreleaseReturnValue
+// CHECK-NEXT: tail call i8* @llvm.objc.autoreleaseReturnValue
// CHECK-NEXT: ret i8*
// CHECK: call i8* @test9_produce()
-// CHECK-NEXT: call i8* @objc_retain
+// CHECK-NEXT: call i8* @llvm.objc.retain
// CHECK-NEXT: ret i8*
}
@@ -345,7 +345,7 @@ void test10a(void) {
// Run the initializer as an assignment.
// CHECK: [[T0:%.*]] = bitcast void ()* {{%.*}} to i8*
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainBlock(i8* [[T0]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainBlock(i8* [[T0]])
// CHECK-NEXT: [[T2:%.*]] = bitcast i8* [[T1]] to void ()*
// CHECK-NEXT: [[T3:%.*]] = getelementptr inbounds [[BYREF_T]], [[BYREF_T]]* [[BYREF]], i32 0, i32 1
// CHECK-NEXT: [[T4:%.*]] = load [[BYREF_T]]*, [[BYREF_T]]** [[T3]]
@@ -353,7 +353,7 @@ void test10a(void) {
// CHECK-NEXT: [[T6:%.*]] = load void ()*, void ()** [[T5]], align 8
// CHECK-NEXT: store void ()* {{%.*}}, void ()** [[T5]], align 8
// CHECK-NEXT: [[T7:%.*]] = bitcast void ()* [[T6]] to i8*
- // CHECK-NEXT: call void @objc_release(i8* [[T7]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T7]])
// Destroy at end of function.
// CHECK-NEXT: [[SLOT:%.*]] = getelementptr inbounds [[BYREF_T]], [[BYREF_T]]* [[BYREF]], i32 0, i32 6
@@ -361,7 +361,7 @@ void test10a(void) {
// CHECK-NEXT: call void @_Block_object_dispose(i8* [[T0]], i32 8)
// CHECK-NEXT: [[T1:%.*]] = load void ()*, void ()** [[SLOT]]
// CHECK-NEXT: [[T2:%.*]] = bitcast void ()* [[T1]] to i8*
- // CHECK-NEXT: call void @objc_release(i8* [[T2]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T2]])
// CHECK: ret void
}
@@ -379,7 +379,7 @@ void test10a(void) {
// CHECK-NEXT: [[S2:%.*]] = getelementptr inbounds [[BYREF_T]], [[BYREF_T]]* [[S1]], i32 0, i32 6
// CHECK-NEXT: [[T0:%.*]] = load void ()*, void ()** [[S2]], align 8
// CHECK-NEXT: [[T1:%.*]] = bitcast void ()* [[T0]] to i8*
-// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainBlock(i8* [[T1]])
+// CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainBlock(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to void ()*
// CHECK-NEXT: store void ()* [[T3]], void ()** [[D2]], align 8
// CHECK: ret void
@@ -390,7 +390,7 @@ void test10a(void) {
// CHECK-NEXT: [[T2:%.*]] = getelementptr inbounds [[BYREF_T]], [[BYREF_T]]* [[T1]], i32 0, i32 6
// CHECK-NEXT: [[T3:%.*]] = load void ()*, void ()** [[T2]]
// CHECK-NEXT: [[T4:%.*]] = bitcast void ()* [[T3]] to i8*
-// CHECK-NEXT: call void @objc_release(i8* [[T4]])
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[T4]])
// CHECK-NEXT: ret void
// Test that we correctly assign to __block variables when the
@@ -410,7 +410,7 @@ void test10b(void) {
// The assignment.
// CHECK: [[T0:%.*]] = bitcast void ()* {{%.*}} to i8*
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainBlock(i8* [[T0]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainBlock(i8* [[T0]])
// CHECK-NEXT: [[T2:%.*]] = bitcast i8* [[T1]] to void ()*
// CHECK-NEXT: [[T3:%.*]] = getelementptr inbounds [[BYREF_T]], [[BYREF_T]]* [[BYREF]], i32 0, i32 1
// CHECK-NEXT: [[T4:%.*]] = load [[BYREF_T]]*, [[BYREF_T]]** [[T3]]
@@ -418,14 +418,14 @@ void test10b(void) {
// CHECK-NEXT: [[T6:%.*]] = load void ()*, void ()** [[T5]], align 8
// CHECK-NEXT: store void ()* {{%.*}}, void ()** [[T5]], align 8
// CHECK-NEXT: [[T7:%.*]] = bitcast void ()* [[T6]] to i8*
- // CHECK-NEXT: call void @objc_release(i8* [[T7]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T7]])
// Destroy at end of function.
// CHECK-NEXT: [[T0:%.*]] = bitcast [[BYREF_T]]* [[BYREF]] to i8*
// CHECK-NEXT: call void @_Block_object_dispose(i8* [[T0]], i32 8)
// CHECK-NEXT: [[T1:%.*]] = load void ()*, void ()** [[SLOT]]
// CHECK-NEXT: [[T2:%.*]] = bitcast void ()* [[T1]] to i8*
- // CHECK-NEXT: call void @objc_release(i8* [[T2]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T2]])
// CHECK: ret void
}
@@ -440,12 +440,12 @@ void test11a(void) {
// CHECK-NEXT: [[BLOCK:%.*]] = alloca [[BLOCK_T:<{.*}>]], align 8
// CHECK: [[T0:%.*]] = bitcast [[BLOCK_T]]* [[BLOCK]] to void ()*
// CHECK-NEXT: [[T1:%.*]] = bitcast void ()* [[T0]] to i8*
- // CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainBlock(i8* [[T1]])
+ // CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainBlock(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to void ()*
// CHECK-NEXT: [[T4:%.*]] = bitcast void ()* [[T3]] to i8*
// CHECK-NEXT: call void @test11_helper(i8* [[T4]])
// CHECK-NEXT: [[T5:%.*]] = bitcast void ()* [[T3]] to i8*
- // CHECK-NEXT: call void @objc_release(i8* [[T5]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T5]])
// CHECK: ret void
}
void test11b(void) {
@@ -458,12 +458,12 @@ void test11b(void) {
// CHECK-NEXT: [[BLOCK:%.*]] = alloca [[BLOCK_T:<{.*}>]], align 8
// CHECK: [[T0:%.*]] = bitcast [[BLOCK_T]]* [[BLOCK]] to void ()*
// CHECK-NEXT: [[T1:%.*]] = bitcast void ()* [[T0]] to i8*
- // CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainBlock(i8* [[T1]])
+ // CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainBlock(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to void ()*
// CHECK-NEXT: [[T4:%.*]] = bitcast void ()* [[T3]] to i8*
// CHECK-NEXT: store i8* [[T4]], i8** [[B]], align 8
// CHECK-NEXT: [[T5:%.*]] = load i8*, i8** [[B]]
- // CHECK-NEXT: call void @objc_release(i8* [[T5]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T5]])
// CHECK: ret void
}
@@ -500,7 +500,7 @@ void test13(id x) {
// CHECK-NEXT: [[B:%.*]] = alloca void ()*, align 8
// CHECK-NEXT: [[BLOCK:%.*]] = alloca [[BLOCK_T:.*]], align 8
// CHECK-NEXT: [[CLEANUP_ACTIVE:%.*]] = alloca i1
- // CHECK-NEXT: [[T0:%.*]] = call i8* @objc_retain(i8* {{%.*}})
+ // CHECK-NEXT: [[T0:%.*]] = call i8* @llvm.objc.retain(i8* {{%.*}})
// CHECK-NEXT: store i8* [[T0]], i8** [[X]], align 8
// CHECK-NEXT: [[BPTR1:%.*]] = bitcast void ()** [[B]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[BPTR1]])
@@ -513,7 +513,7 @@ void test13(id x) {
// CHECK-NOT: br
// CHECK: [[CAPTURE:%.*]] = getelementptr inbounds [[BLOCK_T]], [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[X]], align 8
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retain(i8* [[T0]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retain(i8* [[T0]])
// CHECK-NEXT: store i8* [[T1]], i8** [[CAPTURE]], align 8
// CHECK-NEXT: store i1 true, i1* [[CLEANUP_ACTIVE]]
// CHECK-NEXT: bitcast [[BLOCK_T]]* [[BLOCK]] to void ()*
@@ -521,25 +521,25 @@ void test13(id x) {
// CHECK: br label
// CHECK: [[T0:%.*]] = phi void ()*
// CHECK-NEXT: [[T1:%.*]] = bitcast void ()* [[T0]] to i8*
- // CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainBlock(i8* [[T1]])
+ // CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainBlock(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to void ()*
// CHECK-NEXT: store void ()* [[T3]], void ()** [[B]], align 8
// CHECK-NEXT: [[T0:%.*]] = load void ()*, void ()** [[B]], align 8
// CHECK-NEXT: call void @test13_use(void ()* [[T0]])
// CHECK-NEXT: [[T0:%.*]] = load void ()*, void ()** [[B]]
// CHECK-NEXT: [[T1:%.*]] = bitcast void ()* [[T0]] to i8*
- // CHECK-NEXT: call void @objc_release(i8* [[T1]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]])
// CHECK-NEXT: [[T0:%.*]] = load i1, i1* [[CLEANUP_ACTIVE]]
// CHECK-NEXT: br i1 [[T0]]
// CHECK: [[T0:%.*]] = load i8*, i8** [[CLEANUP_ADDR]]
- // CHECK-NEXT: call void @objc_release(i8* [[T0]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]])
// CHECK-NEXT: br label
// CHECK: [[BPTR2:%.*]] = bitcast void ()** [[B]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[BPTR2]])
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[X]]
- // CHECK-NEXT: call void @objc_release(i8* [[T0]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]])
// CHECK-NEXT: ret void
}
@@ -586,7 +586,7 @@ id (^test17(id self, int which))(void) {
// CHECK-NEXT: [[SELF:%.*]] = alloca i8*,
// CHECK: [[B0:%.*]] = alloca [[BLOCK:<.*>]], align
// CHECK: [[B1:%.*]] = alloca [[BLOCK]], align
-// CHECK: [[T0:%.*]] = call i8* @objc_retain(i8*
+// CHECK: [[T0:%.*]] = call i8* @llvm.objc.retain(i8*
// CHECK-NEXT: store i8* [[T0]], i8** [[SELF]], align
// CHECK-NOT: objc_retain
// CHECK-NOT: objc_release
@@ -595,15 +595,15 @@ id (^test17(id self, int which))(void) {
// CHECK-NOT: objc_release
// CHECK: [[T0:%.*]] = getelementptr inbounds [[BLOCK]], [[BLOCK]]* [[B0]], i32 0, i32 5
// CHECK-NEXT: [[T1:%.*]] = load i8*, i8** [[SELF]], align
-// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retain(i8* [[T1]])
+// CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retain(i8* [[T1]])
// CHECK-NEXT: store i8* [[T2]], i8** [[T0]],
// CHECK-NEXT: [[T0:%.*]] = bitcast [[BLOCK]]* [[B0]] to i8* ()*
// CHECK-NEXT: [[T1:%.*]] = bitcast i8* ()* [[T0]] to i8*
-// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainBlock(i8* [[T1]])
+// CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainBlock(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to i8* ()*
// CHECK-NEXT: store i8* ()* [[T3]], i8* ()** [[RET]]
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[DESTROY]]
-// CHECK-NEXT: call void @objc_release(i8* [[T0]])
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]])
// CHECK-NEXT: store i32
// CHECK-NEXT: br label
// CHECK-NOT: objc_retain
@@ -613,15 +613,15 @@ id (^test17(id self, int which))(void) {
// CHECK-NOT: objc_release
// CHECK: [[T0:%.*]] = getelementptr inbounds [[BLOCK]], [[BLOCK]]* [[B1]], i32 0, i32 5
// CHECK-NEXT: [[T1:%.*]] = load i8*, i8** [[SELF]], align
-// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retain(i8* [[T1]])
+// CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retain(i8* [[T1]])
// CHECK-NEXT: store i8* [[T2]], i8** [[T0]],
// CHECK-NEXT: [[T0:%.*]] = bitcast [[BLOCK]]* [[B1]] to i8* ()*
// CHECK-NEXT: [[T1:%.*]] = bitcast i8* ()* [[T0]] to i8*
-// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainBlock(i8* [[T1]])
+// CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainBlock(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to i8* ()*
// CHECK-NEXT: store i8* ()* [[T3]], i8* ()** [[RET]]
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[DESTROY]]
-// CHECK-NEXT: call void @objc_release(i8* [[T0]])
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]])
// CHECK-NEXT: store i32
// CHECK-NEXT: br label
@@ -630,18 +630,18 @@ void test18(id x) {
// CHECK-UNOPT: [[X:%.*]] = alloca i8*,
// CHECK-UNOPT-NEXT: [[BLOCK:%.*]] = alloca [[BLOCK_T:<{.*}>]],
// CHECK-UNOPT-NEXT: store i8* null, i8** [[X]]
-// CHECK-UNOPT-NEXT: call void @objc_storeStrong(i8** [[X]],
+// CHECK-UNOPT-NEXT: call void @llvm.objc.storeStrong(i8** [[X]],
// CHECK-UNOPT-NEXT: [[SLOTREL:%.*]] = getelementptr inbounds [[BLOCK_T]], [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
// CHECK-UNOPT: %[[BLOCK_DESCRIPTOR:.*]] = getelementptr inbounds [[BLOCK_T]], [[BLOCK_T]]* [[BLOCK]], i32 0, i32 4
// CHECK-UNOPT: store %[[STRUCT_BLOCK_DESCRIPTOR]]* bitcast ({ i64, i64, i8*, i8*, i8*, i64 }* @[[BLOCK_DESCRIPTOR_TMP44]] to %[[STRUCT_BLOCK_DESCRIPTOR]]*), %[[STRUCT_BLOCK_DESCRIPTOR]]** %[[BLOCK_DESCRIPTOR]], align 8
// CHECK-UNOPT: [[SLOT:%.*]] = getelementptr inbounds [[BLOCK_T]], [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
// CHECK-UNOPT-NEXT: [[T0:%.*]] = load i8*, i8** [[X]],
-// CHECK-UNOPT-NEXT: [[T1:%.*]] = call i8* @objc_retain(i8* [[T0]])
+// CHECK-UNOPT-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retain(i8* [[T0]])
// CHECK-UNOPT-NEXT: store i8* [[T1]], i8** [[SLOT]],
// CHECK-UNOPT-NEXT: bitcast
// CHECK-UNOPT-NEXT: call void @test18_helper(
-// CHECK-UNOPT-NEXT: call void @objc_storeStrong(i8** [[SLOTREL]], i8* null) [[NUW:#[0-9]+]]
-// CHECK-UNOPT-NEXT: call void @objc_storeStrong(i8** [[X]], i8* null) [[NUW]]
+// CHECK-UNOPT-NEXT: call void @llvm.objc.storeStrong(i8** [[SLOTREL]], i8* null) [[NUW:#[0-9]+]]
+// CHECK-UNOPT-NEXT: call void @llvm.objc.storeStrong(i8** [[X]], i8* null) [[NUW]]
// CHECK-UNOPT-NEXT: ret void
extern void test18_helper(id (^)(void));
test18_helper(^{ return x; });
@@ -669,7 +669,7 @@ void test19(void (^b)(void)) {
// CHECK: [[B:%.*]] = alloca void ()*,
// CHECK-NEXT: [[BLOCK:%.*]] = alloca [[BLOCK_T:<{.*}>]],
// CHECK-NEXT: [[T0:%.*]] = bitcast void ()* {{%.*}} to i8*
-// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retain(i8* [[T0]])
+// CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retain(i8* [[T0]])
// CHECK-NEXT: [[T2:%.*]] = bitcast i8* [[T1]] to void ()*
// CHECK-NEXT: store void ()* [[T2]], void ()** [[B]]
@@ -680,7 +680,7 @@ void test19(void (^b)(void)) {
// CHECK: [[SLOT:%.*]] = getelementptr inbounds [[BLOCK_T]], [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
// CHECK-NEXT: [[T0:%.*]] = load void ()*, void ()** [[B]],
// CHECK-NEXT: [[T1:%.*]] = bitcast void ()* [[T0]] to i8*
-// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retain(i8* [[T1]])
+// CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retain(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to void ()*
// CHECK-NEXT: store void ()* [[T3]], void ()** [[SLOT]],
// Call.
@@ -692,12 +692,12 @@ void test19(void (^b)(void)) {
// Block teardown.
// CHECK-NEXT: [[T0:%.*]] = load void ()*, void ()** [[SLOTREL]]
// CHECK-NEXT: [[T1:%.*]] = bitcast void ()* [[T0]] to i8*
-// CHECK-NEXT: call void @objc_release(i8* [[T1]])
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]])
// Local cleanup.
// CHECK-NEXT: [[T0:%.*]] = load void ()*, void ()** [[B]]
// CHECK-NEXT: [[T1:%.*]] = bitcast void ()* [[T0]] to i8*
-// CHECK-NEXT: call void @objc_release(i8* [[T1]])
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]])
// CHECK-NEXT: ret void
}
@@ -705,7 +705,7 @@ void test19(void (^b)(void)) {
// CHECK-LABEL: define void @test20(
// CHECK: [[XADDR:%.*]] = alloca i8*
// CHECK-NEXT: [[BLOCK:%.*]] = alloca <[[BLOCKTY:.*]]>
-// CHECK-NEXT: [[RETAINEDX:%.*]] = call i8* @objc_retain(i8* %{{.*}})
+// CHECK-NEXT: [[RETAINEDX:%.*]] = call i8* @llvm.objc.retain(i8* %{{.*}})
// CHECK-NEXT: store i8* [[RETAINEDX]], i8** [[XADDR]]
// CHECK-NEXT: [[CAPTUREFIELD:%.*]] = getelementptr inbounds <[[BLOCKTY]]>, <[[BLOCKTY]]>* [[BLOCK]], i32 0, i32 5
// CHECK: [[BLOCKCAPTURED:%.*]] = getelementptr inbounds <[[BLOCKTY]]>, <[[BLOCKTY]]>* [[BLOCK]], i32 0, i32 5
@@ -714,7 +714,7 @@ void test19(void (^b)(void)) {
// CHECK: [[CAPTURE:%.*]] = load i8*, i8** [[CAPTUREFIELD]]
// CHECK-NEXT: call void (...) @clang.arc.use(i8* [[CAPTURE]])
// CHECK-NEXT: [[X:%.*]] = load i8*, i8** [[XADDR]]
-// CHECK-NEXT: call void @objc_release(i8* [[X]])
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[X]])
// CHECK-NEXT: ret void
// CHECK-UNOPT-LABEL: define void @test20(
@@ -723,9 +723,9 @@ void test19(void (^b)(void)) {
// CHECK-UNOPT: [[CAPTUREFIELD:%.*]] = getelementptr inbounds <[[BLOCKTY]]>, <[[BLOCKTY]]>* [[BLOCK]], i32 0, i32 5
// CHECK-UNOPT: [[BLOCKCAPTURED:%.*]] = getelementptr inbounds <[[BLOCKTY]]>, <[[BLOCKTY]]>* [[BLOCK]], i32 0, i32 5
// CHECK-UNOPT: [[CAPTURED:%.*]] = load i8*, i8** [[XADDR]]
-// CHECK-UNOPT: [[RETAINED:%.*]] = call i8* @objc_retain(i8* [[CAPTURED]])
+// CHECK-UNOPT: [[RETAINED:%.*]] = call i8* @llvm.objc.retain(i8* [[CAPTURED]])
// CHECK-UNOPT: store i8* [[RETAINED]], i8** [[BLOCKCAPTURED]]
-// CHECK-UNOPT: call void @objc_storeStrong(i8** [[CAPTUREFIELD]], i8* null)
+// CHECK-UNOPT: call void @llvm.objc.storeStrong(i8** [[CAPTUREFIELD]], i8* null)
void test20_callee(void (^)());
void test20(const id x) {
diff --git a/test/CodeGenObjC/arc-bridged-cast.m b/test/CodeGenObjC/arc-bridged-cast.m
index 42795d5d80..db01894496 100644
--- a/test/CodeGenObjC/arc-bridged-cast.m
+++ b/test/CodeGenObjC/arc-bridged-cast.m
@@ -27,10 +27,10 @@ void bridge_transfer_from_cf(int *i) {
// CHECK-NOT: retain
// CHECK: store i32 13
(void)(__bridge_transfer id)CFCreateSomething(), *i = 13;
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: store i32 17
*i = 17;
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK-NEXT: bitcast
// CHECK-NEXT: call void @llvm.lifetime.end
// CHECK-NEXT: ret void
@@ -42,7 +42,7 @@ void bridge_from_cf(int *i) {
*i = 7;
// CHECK: call i8* @CFCreateSomething()
id obj1 = (__bridge id)CFCreateSomething();
- // CHECK: objc_retainAutoreleasedReturnValue
+ // CHECK: llvm.objc.retainAutoreleasedReturnValue
// CHECK: store i32 11
*i = 11;
// CHECK: call i8* @CFCreateSomething()
@@ -51,7 +51,7 @@ void bridge_from_cf(int *i) {
(void)(__bridge id)CFCreateSomething(), *i = 13;
// CHECK: store i32 17
*i = 17;
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK-NEXT: bitcast
// CHECK-NEXT: call void @llvm.lifetime.end
// CHECK-NEXT: ret void
@@ -62,12 +62,12 @@ void bridge_retained_of_cf(int *i) {
*i = 7;
// CHECK: call i8* @CreateSomething()
CFTypeRef cf1 = (__bridge_retained CFTypeRef)CreateSomething();
- // CHECK-NEXT: call i8* @objc_retainAutoreleasedReturnValue
+ // CHECK-NEXT: call i8* @llvm.objc.retainAutoreleasedReturnValue
// CHECK: store i32 11
*i = 11;
// CHECK: call i8* @CreateSomething()
(__bridge_retained CFTypeRef)CreateSomething(), *i = 13;
- // CHECK-NEXT: call i8* @objc_retainAutoreleasedReturnValue
+ // CHECK-NEXT: call i8* @llvm.objc.retainAutoreleasedReturnValue
// CHECK: store i32 13
// CHECK: store i32 17
*i = 17;
@@ -99,8 +99,8 @@ void bridge_of_cf(int *i) {
// CHECK-LABEL: define %struct.__CFString* @bridge_of_paren_expr()
CFStringRef bridge_of_paren_expr() {
- // CHECK-NOT: call i8* @objc_retainAutoreleasedReturnValue(
- // CHECK-NOT: call void @objc_release(
+ // CHECK-NOT: call i8* @llvm.objc.retainAutoreleasedReturnValue(
+ // CHECK-NOT: call void @llvm.objc.release(
CFStringRef r = (__bridge CFStringRef)(CreateNSString());
r = (__bridge CFStringRef)((NSString *)(CreateNSString()));
return r;
diff --git a/test/CodeGenObjC/arc-exceptions.m b/test/CodeGenObjC/arc-exceptions.m
index dafffd81f5..b8fb47057e 100644
--- a/test/CodeGenObjC/arc-exceptions.m
+++ b/test/CodeGenObjC/arc-exceptions.m
@@ -17,11 +17,11 @@ void test0(void) {
// CHECK: [[T0:%.*]] = call i8* @objc_begin_catch(
// CHECK-NEXT: [[T1:%.*]] = bitcast i8* [[T0]] to [[ETY]]*
// CHECK-NEXT: [[T2:%.*]] = bitcast [[ETY]]* [[T1]] to i8*
-// CHECK-NEXT: [[T3:%.*]] = call i8* @objc_retain(i8* [[T2]]) [[NUW:#[0-9]+]]
+// CHECK-NEXT: [[T3:%.*]] = call i8* @llvm.objc.retain(i8* [[T2]]) [[NUW:#[0-9]+]]
// CHECK-NEXT: [[T4:%.*]] = bitcast i8* [[T3]] to [[ETY]]*
// CHECK-NEXT: store [[ETY]]* [[T4]], [[ETY]]** [[E]]
// CHECK-NEXT: [[T0:%.*]] = bitcast [[ETY]]** [[E]] to i8**
-// CHECK-NEXT: call void @objc_storeStrong(i8** [[T0]], i8* null) [[NUW]]
+// CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[T0]], i8* null) [[NUW]]
// CHECK-NEXT: call void @objc_end_catch() [[NUW]]
void test1_helper(void);
@@ -38,9 +38,9 @@ void test1(void) {
// CHECK-NEXT: [[T1:%.*]] = bitcast i8* [[T0]] to [[ETY]]*
// CHECK-NEXT: [[T2:%.*]] = bitcast [[ETY]]** [[E]] to i8**
// CHECK-NEXT: [[T3:%.*]] = bitcast [[ETY]]* [[T1]] to i8*
-// CHECK-NEXT: call i8* @objc_initWeak(i8** [[T2]], i8* [[T3]]) [[NUW]]
+// CHECK-NEXT: call i8* @llvm.objc.initWeak(i8** [[T2]], i8* [[T3]]) [[NUW]]
// CHECK-NEXT: [[T0:%.*]] = bitcast [[ETY]]** [[E]] to i8**
-// CHECK-NEXT: call void @objc_destroyWeak(i8** [[T0]]) [[NUW]]
+// CHECK-NEXT: call void @llvm.objc.destroyWeak(i8** [[T0]]) [[NUW]]
// CHECK-NEXT: call void @objc_end_catch() [[NUW]]
// CHECK: attributes [[NUW]] = { nounwind }
diff --git a/test/CodeGenObjC/arc-foreach.m b/test/CodeGenObjC/arc-foreach.m
index ffeb37247b..65d517cc93 100644
--- a/test/CodeGenObjC/arc-foreach.m
+++ b/test/CodeGenObjC/arc-foreach.m
@@ -38,7 +38,7 @@ void test0(NSArray *array) {
// CHECK-LP64-NEXT: store [[ARRAY_T]]* null, [[ARRAY_T]]** [[ARRAY]]
// CHECK-LP64-NEXT: [[ZERO:%.*]] = bitcast [[ARRAY_T]]** [[ARRAY]] to i8**
// CHECK-LP64-NEXT: [[ONE:%.*]] = bitcast [[ARRAY_T]]* {{%.*}} to i8*
-// CHECK-LP64-NEXT: call void @objc_storeStrong(i8** [[ZERO]], i8* [[ONE]]) [[NUW:#[0-9]+]]
+// CHECK-LP64-NEXT: call void @llvm.objc.storeStrong(i8** [[ZERO]], i8* [[ONE]]) [[NUW:#[0-9]+]]
// Initialize the fast enumaration state.
// CHECK-LP64-NEXT: [[T0:%.*]] = bitcast [[STATE_T]]* [[STATE]] to i8*
@@ -47,7 +47,7 @@ void test0(NSArray *array) {
// Evaluate the collection expression and retain.
// CHECK-LP64-NEXT: [[T0:%.*]] = load [[ARRAY_T]]*, [[ARRAY_T]]** [[ARRAY]], align 8
// CHECK-LP64-NEXT: [[T1:%.*]] = bitcast [[ARRAY_T]]* [[T0]] to i8*
-// CHECK-LP64-NEXT: [[T2:%.*]] = call i8* @objc_retain(i8* [[T1]])
+// CHECK-LP64-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retain(i8* [[T1]])
// CHECK-LP64-NEXT: [[SAVED_ARRAY:%.*]] = bitcast i8* [[T2]] to [[ARRAY_T]]*
// Call the enumeration method.
@@ -68,11 +68,11 @@ void test0(NSArray *array) {
// CHECK-LP64: [[D0:%.*]] = getelementptr inbounds [[BLOCK_T]], [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
// CHECK-LP64: [[T0:%.*]] = getelementptr inbounds [[BLOCK_T]], [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
// CHECK-LP64-NEXT: [[T1:%.*]] = load i8*, i8** [[X]]
-// CHECK-LP64-NEXT: [[T2:%.*]] = call i8* @objc_retain(i8* [[T1]])
+// CHECK-LP64-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retain(i8* [[T1]])
// CHECK-LP64-NEXT: store i8* [[T2]], i8** [[T0]]
// CHECK-LP64-NEXT: [[BLOCK1:%.*]] = bitcast [[BLOCK_T]]* [[BLOCK]]
// CHECK-LP64-NEXT: call void @use_block(void ()* [[BLOCK1]])
-// CHECK-LP64-NEXT: call void @objc_storeStrong(i8** [[D0]], i8* null)
+// CHECK-LP64-NEXT: call void @llvm.objc.storeStrong(i8** [[D0]], i8* null)
// CHECK-LP64-NOT: call void (...) @clang.arc.use(i8* [[CAPTURE]])
// CHECK-LP64-OPT: [[D0:%.*]] = getelementptr inbounds [[BLOCK_T]], [[BLOCK_T]]* [[BLOCK]], i64 0, i32 5
@@ -85,11 +85,11 @@ void test0(NSArray *array) {
// Release the array.
// CHECK-LP64: [[T0:%.*]] = bitcast [[ARRAY_T]]* [[SAVED_ARRAY]] to i8*
-// CHECK-LP64-NEXT: call void @objc_release(i8* [[T0]])
+// CHECK-LP64-NEXT: call void @llvm.objc.release(i8* [[T0]])
// Destroy 'array'.
// CHECK-LP64: [[T0:%.*]] = bitcast [[ARRAY_T]]** [[ARRAY]] to i8**
-// CHECK-LP64-NEXT: call void @objc_storeStrong(i8** [[T0]], i8* null)
+// CHECK-LP64-NEXT: call void @llvm.objc.storeStrong(i8** [[T0]], i8* null)
// CHECK-LP64-NEXT: ret void
// CHECK-LP64-LABEL: define internal void @__test0_block_invoke
@@ -116,15 +116,15 @@ void test1(NSArray *array) {
// CHECK-LP64-NEXT: [[T1:%.*]] = load i8**, i8*** [[T0]]
// CHECK-LP64-NEXT: [[T2:%.*]] = getelementptr i8*, i8** [[T1]], i64
// CHECK-LP64-NEXT: [[T3:%.*]] = load i8*, i8** [[T2]]
-// CHECK-LP64-NEXT: call i8* @objc_initWeak(i8** [[X]], i8* [[T3]])
+// CHECK-LP64-NEXT: call i8* @llvm.objc.initWeak(i8** [[X]], i8* [[T3]])
// CHECK-LP64: [[D0:%.*]] = getelementptr inbounds [[BLOCK_T]], [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
// CHECK-LP64: [[T0:%.*]] = getelementptr inbounds [[BLOCK_T]], [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
-// CHECK-LP64-NEXT: call void @objc_copyWeak(i8** [[T0]], i8** [[X]])
+// CHECK-LP64-NEXT: call void @llvm.objc.copyWeak(i8** [[T0]], i8** [[X]])
// CHECK-LP64-NEXT: [[T1:%.*]] = bitcast [[BLOCK_T]]* [[BLOCK]] to
// CHECK-LP64: call void @use_block
-// CHECK-LP64-NEXT: call void @objc_destroyWeak(i8** [[D0]])
-// CHECK-LP64-NEXT: call void @objc_destroyWeak(i8** [[X]])
+// CHECK-LP64-NEXT: call void @llvm.objc.destroyWeak(i8** [[D0]])
+// CHECK-LP64-NEXT: call void @llvm.objc.destroyWeak(i8** [[X]])
// rdar://problem/9817306
@interface Test2
@@ -139,7 +139,7 @@ void test2(Test2 *a) {
// CHECK-LP64-LABEL: define void @test2(
// CHECK-LP64: [[T0:%.*]] = call [[ARRAY_T]]* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to [[ARRAY_T]]* (i8*, i8*)*)(
// CHECK-LP64-NEXT: [[T1:%.*]] = bitcast [[ARRAY_T]]* [[T0]] to i8*
-// CHECK-LP64-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
+// CHECK-LP64-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T1]])
// CHECK-LP64-NEXT: [[COLL:%.*]] = bitcast i8* [[T2]] to [[ARRAY_T]]*
// Make sure it's not immediately released before starting the iteration.
@@ -157,7 +157,7 @@ void test2(Test2 *a) {
// This bitcast is for the final release.
// CHECK-LP64: [[T0:%.*]] = bitcast [[ARRAY_T]]* [[COLL]] to i8*
-// CHECK-LP64-NEXT: call void @objc_release(i8* [[T0]])
+// CHECK-LP64-NEXT: call void @llvm.objc.release(i8* [[T0]])
// Check that the 'continue' label is positioned appropriately
@@ -211,7 +211,7 @@ NSArray *array4;
// CHECK-LP64: [[BC:%.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, [[TY]]* }>, <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, [[TY]]* }>* [[BLOCK]], i32 0, i32 5
// CHECK-LP64: [[T1:%.*]] = load [[TY]]*, [[TY]]** [[SELF_ADDR]]
// CHECK-LP64: [[T2:%.*]] = bitcast [[TY]]* [[T1]] to i8*
-// CHECK-LP64: call i8* @objc_retain(i8* [[T2]])
+// CHECK-LP64: call i8* @llvm.objc.retain(i8* [[T2]])
// CHECK-LP64-OPT-LABEL: define internal void @"\01-[I1 foo2]"(
// CHECK-LP64-OPT: [[TY:%.*]]* %self
@@ -219,7 +219,7 @@ NSArray *array4;
// CHECK-LP64-OPT: [[T0:%.*]] = getelementptr inbounds [[BLOCK_T]], [[BLOCK_T]]* [[BLOCK]], i64 0, i32 5
// CHECK-LP64: [[T5:%.*]] = bitcast [[TY]]** [[T0]] to i8**
-// CHECK-LP64: call void @objc_storeStrong(i8** [[T5]], i8* null)
+// CHECK-LP64: call void @llvm.objc.storeStrong(i8** [[T5]], i8* null)
// CHECK-LP64-NOT: call void (...) @clang.arc.use([[TY]]* [[T5]])
// CHECK-LP64: switch i32 {{%.*}}, label %[[UNREACHABLE:.*]] [
// CHECK-LP64-NEXT: i32 0, label %[[CLEANUP_CONT:.*]]
diff --git a/test/CodeGenObjC/arc-i386.m b/test/CodeGenObjC/arc-i386.m
index 7693a8f2b6..66b6ea8501 100644
--- a/test/CodeGenObjC/arc-i386.m
+++ b/test/CodeGenObjC/arc-i386.m
@@ -16,9 +16,9 @@ void test1(void) {
extern id test1_helper(void);
// CHECK: [[T0:%.*]] = call i8* @test1_helper()
// CHECK-NEXT: call void asm sideeffect "mov
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: store i8* [[T1]],
- // CHECK-NEXT: call void @objc_storeStrong(
+ // CHECK-NEXT: call void @llvm.objc.storeStrong(
// CHECK-NEXT: ret void
id x = test1_helper();
}
diff --git a/test/CodeGenObjC/arc-linetable-autorelease.m b/test/CodeGenObjC/arc-linetable-autorelease.m
index 6812e8a6de..0804b0700a 100644
--- a/test/CodeGenObjC/arc-linetable-autorelease.m
+++ b/test/CodeGenObjC/arc-linetable-autorelease.m
@@ -29,8 +29,8 @@ NSRect NSMakeRect(CGFloat x, CGFloat y, CGFloat w, CGFloat h);
CGFloat pattern[2];
// CHECK: define {{.*}}_createBezierPathWithWidth
// CHECK: load {{.*}} %path, align {{.*}}, !dbg ![[RET:[0-9]+]]
- // CHECK: call void @objc_storeStrong{{.*}} !dbg ![[ARC:[0-9]+]]
- // CHECK: call {{.*}} @objc_autoreleaseReturnValue{{.*}} !dbg ![[ARC]]
+ // CHECK: call void @llvm.objc.storeStrong{{.*}} !dbg ![[ARC:[0-9]+]]
+ // CHECK: call {{.*}} @llvm.objc.autoreleaseReturnValue{{.*}} !dbg ![[ARC]]
// CHECK: ret {{.*}} !dbg ![[ARC]]
// CHECK: ![[RET]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
return path;
diff --git a/test/CodeGenObjC/arc-linetable.m b/test/CodeGenObjC/arc-linetable.m
index 531219d6d5..3883e0a3a9 100644
--- a/test/CodeGenObjC/arc-linetable.m
+++ b/test/CodeGenObjC/arc-linetable.m
@@ -3,8 +3,8 @@
// Legend: EXP = Return expression, RET = ret instruction
// CHECK: define {{.*}}testNoSideEffect
-// CHECK: call void @objc_storeStrong{{.*}}
-// CHECK: call void @objc_storeStrong{{.*}} !dbg ![[RET1:[0-9]+]]
+// CHECK: call void @llvm.objc.storeStrong{{.*}}
+// CHECK: call void @llvm.objc.storeStrong{{.*}} !dbg ![[RET1:[0-9]+]]
// CHECK: ret {{.*}} !dbg ![[RET1]]
// CHECK: define {{.*}}testNoCleanup
@@ -20,8 +20,8 @@
// CHECK: ret {{.*}} !dbg ![[RET4:[0-9]+]]
// CHECK: define {{.*}}testVoid
-// CHECK: call void @objc_storeStrong{{.*}}
-// CHECK: call void @objc_storeStrong{{.*}} !dbg ![[RET5:[0-9]+]]
+// CHECK: call void @llvm.objc.storeStrong{{.*}}
+// CHECK: call void @llvm.objc.storeStrong{{.*}} !dbg ![[RET5:[0-9]+]]
// CHECK: ret {{.*}} !dbg ![[RET5]]
// CHECK: define {{.*}}testVoidNoReturn
@@ -35,7 +35,7 @@
// CHECK: define {{.*}}testCleanupVoid
// CHECK: icmp ne {{.*}}!dbg ![[SKIP1:[0-9]+]]
// CHECK: store i32 0, i32* {{.*}}, !dbg ![[RET8:[0-9]+]]
-// CHECK: @objc_storeStrong{{.*}}, !dbg ![[RET8]]
+// CHECK: @llvm.objc.storeStrong{{.*}}, !dbg ![[RET8]]
// CHECK: ret {{.*}} !dbg ![[RET8]]
typedef signed char BOOL;
diff --git a/test/CodeGenObjC/arc-literals.m b/test/CodeGenObjC/arc-literals.m
index 74e231c765..3953787ea5 100644
--- a/test/CodeGenObjC/arc-literals.m
+++ b/test/CodeGenObjC/arc-literals.m
@@ -15,24 +15,24 @@
// CHECK-LABEL: define void @test_numeric()
void test_numeric() {
// CHECK: {{call.*objc_msgSend.*i32 17}}
- // CHECK: call i8* @objc_retainAutoreleasedReturnValue
+ // CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
id ilit = @17;
// CHECK: {{call.*objc_msgSend.*i32 25}}
- // CHECK: call i8* @objc_retainAutoreleasedReturnValue
+ // CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
id ulit = @25u;
// CHECK: {{call.*objc_msgSend.*i64 42}}
- // CHECK: call i8* @objc_retainAutoreleasedReturnValue
+ // CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
id ulllit = @42ull;
// CHECK: {{call.*objc_msgSend.*i8 signext 97}}
- // CHECK: call i8* @objc_retainAutoreleasedReturnValue
+ // CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
id charlit = @'a';
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: call void @llvm.lifetime.end
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: call void @llvm.lifetime.end
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: call void @llvm.lifetime.end
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: call void @llvm.lifetime.end
// CHECK-NEXT: ret void
}
@@ -43,8 +43,8 @@ void test_array(id a, id b) {
// CHECK: [[B:%.*]] = alloca i8*,
// Retaining parameters
- // CHECK: call i8* @objc_retain(i8*
- // CHECK: call i8* @objc_retain(i8*
+ // CHECK: call i8* @llvm.objc.retain(i8*
+ // CHECK: call i8* @llvm.objc.retain(i8*
// Constructing the array
// CHECK: [[T0:%.*]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[OBJECTS:%[A-Za-z0-9]+]], i64 0, i64 0
@@ -59,13 +59,13 @@ void test_array(id a, id b) {
// CHECK-NEXT: [[T1:%.*]] = bitcast [[CLASS_T]]* [[T0]] to i8*
// CHECK-NEXT: [[T2:%.*]] = bitcast [2 x i8*]* [[OBJECTS]] to i8**
// CHECK-NEXT: [[T3:%.*]] = call i8* bitcast ({{.*@objc_msgSend.*}})(i8* [[T1]], i8* [[SEL]], i8** [[T2]], i64 2)
- // CHECK-NEXT: [[T4:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T3]])
+ // CHECK-NEXT: [[T4:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T3]])
// CHECK: call void (...) @clang.arc.use(i8* [[V0]], i8* [[V1]])
id arr = @[a, b];
- // CHECK: call void @objc_release
- // CHECK: call void @objc_release
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
+ // CHECK: call void @llvm.objc.release
+ // CHECK: call void @llvm.objc.release
// CHECK-NEXT: ret void
}
@@ -77,10 +77,10 @@ void test_dictionary(id k1, id o1, id k2, id o2) {
// CHECK: [[O2:%.*]] = alloca i8*,
// Retaining parameters
- // CHECK: call i8* @objc_retain(i8*
- // CHECK: call i8* @objc_retain(i8*
- // CHECK: call i8* @objc_retain(i8*
- // CHECK: call i8* @objc_retain(i8*
+ // CHECK: call i8* @llvm.objc.retain(i8*
+ // CHECK: call i8* @llvm.objc.retain(i8*
+ // CHECK: call i8* @llvm.objc.retain(i8*
+ // CHECK: call i8* @llvm.objc.retain(i8*
// Constructing the arrays
// CHECK: [[T0:%.*]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[KEYS:%[A-Za-z0-9]+]], i64 0, i64 0
@@ -103,16 +103,16 @@ void test_dictionary(id k1, id o1, id k2, id o2) {
// CHECK-NEXT: [[T2:%.*]] = bitcast [2 x i8*]* [[OBJECTS]] to i8**
// CHECK-NEXT: [[T3:%.*]] = bitcast [2 x i8*]* [[KEYS]] to i8**
// CHECK-NEXT: [[T4:%.*]] = call i8* bitcast ({{.*@objc_msgSend.*}})(i8* [[T1]], i8* [[SEL]], i8** [[T2]], i8** [[T3]], i64 2)
- // CHECK-NEXT: [[T5:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T4]])
+ // CHECK-NEXT: [[T5:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T4]])
// CHECK-NEXT: call void (...) @clang.arc.use(i8* [[V0]], i8* [[V1]], i8* [[V2]], i8* [[V3]])
id dict = @{ k1 : o1, k2 : o2 };
- // CHECK: call void @objc_release
- // CHECK: call void @objc_release
- // CHECK: call void @objc_release
- // CHECK: call void @objc_release
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
+ // CHECK: call void @llvm.objc.release
+ // CHECK: call void @llvm.objc.release
+ // CHECK: call void @llvm.objc.release
+ // CHECK: call void @llvm.objc.release
// CHECK-NEXT: ret void
}
@@ -126,7 +126,7 @@ void test_dictionary(id k1, id o1, id k2, id o2) {
// CHECK-LABEL: define void @test_property
void test_property(B *b) {
// Retain parameter
- // CHECK: call i8* @objc_retain
+ // CHECK: call i8* @llvm.objc.retain
// CHECK: [[T0:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[OBJECTS:%.*]], i64 0, i64 0
@@ -135,7 +135,7 @@ void test_property(B *b) {
// CHECK-NEXT: [[T1:%.*]] = bitcast
// CHECK-NEXT: [[T2:%.*]] = call [[B:%.*]]* bitcast ({{.*}} @objc_msgSend to {{.*}})(i8* [[T1]], i8* [[SEL]])
// CHECK-NEXT: [[T3:%.*]] = bitcast [[B]]* [[T2]] to i8*
- // CHECK-NEXT: [[T4:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T3]])
+ // CHECK-NEXT: [[T4:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T3]])
// CHECK-NEXT: [[V0:%.*]] = bitcast i8* [[T4]] to [[B]]*
// CHECK-NEXT: [[V1:%.*]] = bitcast [[B]]* [[V0]] to i8*
@@ -148,7 +148,7 @@ void test_property(B *b) {
// CHECK-NEXT: [[T1:%.*]] = bitcast [[CLASS_T]]* [[T0]] to i8*
// CHECK-NEXT: [[T2:%.*]] = bitcast [1 x i8*]* [[OBJECTS]] to i8**
// CHECK-NEXT: [[T3:%.*]] = call i8* bitcast ({{.*}} @objc_msgSend to {{.*}}(i8* [[T1]], i8* [[SEL]], i8** [[T2]], i64 1)
- // CHECK-NEXT: call i8* @objc_retainAutoreleasedReturnValue(i8* [[T3]])
+ // CHECK-NEXT: call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T3]])
// CHECK-NEXT: call void (...) @clang.arc.use(i8* [[V1]])
// CHECK-NEXT: bitcast
// CHECK-NEXT: bitcast
@@ -157,12 +157,12 @@ void test_property(B *b) {
// Release b.prop
// CHECK-NEXT: [[T0:%.*]] = bitcast [[B]]* [[V0]] to i8*
- // CHECK-NEXT: call void @objc_release(i8* [[T0]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]])
// Destroy arr
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// Destroy b
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK-NEXT: ret void
}
diff --git a/test/CodeGenObjC/arc-loadweakretained-release.m b/test/CodeGenObjC/arc-loadweakretained-release.m
index 5392abdf8c..a35ee0187c 100644
--- a/test/CodeGenObjC/arc-loadweakretained-release.m
+++ b/test/CodeGenObjC/arc-loadweakretained-release.m
@@ -28,13 +28,13 @@ int main (int argc, const char * argv[]) {
}
}
-// CHECK: [[SIXTEEN:%.*]] = call i8* @objc_loadWeakRetained(i8** {{%.*}})
+// CHECK: [[SIXTEEN:%.*]] = call i8* @llvm.objc.loadWeakRetained(i8** {{%.*}})
// CHECK-NEXT: [[SEVENTEEN:%.*]] = bitcast i8* [[SIXTEEN]] to {{%.*}}
// CHECK-NEXT: [[EIGHTEEN:%.*]] = load i8*, i8** @OBJC_SELECTOR_REFERENCES_.6
// CHECK-NEXT: [[NINETEEN:%.*]] = bitcast %0* [[SEVENTEEN]] to i8*
// CHECK-NEXT: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
// CHECK-NEXT: [[TWENTY:%.*]] = bitcast %0* [[SEVENTEEN]] to i8*
-// CHECK-NEXT: call void @objc_release(i8* [[TWENTY]])
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[TWENTY]])
void test1(int cond) {
extern void test34_sink(id *);
@@ -55,7 +55,7 @@ void test1(int cond) {
// CHECK-NEXT: [[ICRARGUMENT:%.*]] = select i1 [[ICRISNULL]], i8** null, i8** [[INCRTEMP]]
// CHECK-NEXT: store i1 false, i1* [[CONDCLEANUP]]
// CHECK-NEXT: br i1 [[ICRISNULL]], label [[ICRCONT:%.*]], label [[ICRCOPY:%.*]]
-// CHECK: [[ONE:%.*]] = call i8* @objc_loadWeakRetained(
+// CHECK: [[ONE:%.*]] = call i8* @llvm.objc.loadWeakRetained(
// CHECK-NEXT: store i8* [[ONE]], i8** [[CONDCLEANUPSAVE]]
// CHECK-NEXT: store i1 true, i1* [[CONDCLEANUP]]
// CHECK-NEXT: store i8* [[ONE]], i8** [[INCRTEMP]]
@@ -65,13 +65,13 @@ void test1(int cond) {
// CHECK-NEXT: [[ICRISNULL1:%.*]] = icmp eq i8** [[COND1]], null
// CHECK-NEXT: br i1 [[ICRISNULL1]], label [[ICRDONE:%.*]], label [[ICRWRITEBACK:%.*]]
// CHECK: [[TWO:%.*]] = load i8*, i8** [[INCRTEMP]]
-// CHECK-NEXT: [[THREE:%.*]] = call i8* @objc_storeWeak(
+// CHECK-NEXT: [[THREE:%.*]] = call i8* @llvm.objc.storeWeak(
// CHECK-NEXT: br label [[ICRDONE]]
// CHECK: [[CLEANUPISACTIVE:%.*]] = load i1, i1* [[CONDCLEANUP]]
// CHECK-NEXT: br i1 [[CLEANUPISACTIVE]], label [[CLEASNUPACTION:%.*]], label [[CLEANUPDONE:%.*]]
// CHECK: [[FOUR:%.*]] = load i8*, i8** [[CONDCLEANUPSAVE]]
-// CHECK-NEXT: call void @objc_release(i8* [[FOUR]])
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[FOUR]])
// CHECK-NEXT: br label
-// CHECK: call void @objc_destroyWeak(i8** [[WEAK]])
+// CHECK: call void @llvm.objc.destroyWeak(i8** [[WEAK]])
// CHECK-NEXT: ret void
diff --git a/test/CodeGenObjC/arc-no-runtime.m b/test/CodeGenObjC/arc-no-runtime.m
index f5f5b90ea5..31f0ed8714 100644
--- a/test/CodeGenObjC/arc-no-runtime.m
+++ b/test/CodeGenObjC/arc-no-runtime.m
@@ -5,9 +5,9 @@ id make(void) __attribute__((ns_returns_retained));
void test0() {
make();
id x = 0;
- // CHECK: call void @objc_release(
- // CHECK: call void @objc_storeStrong(
+ // CHECK: call void @llvm.objc.release(
+ // CHECK: call void @llvm.objc.storeStrong(
}
-// CHECK: declare extern_weak void @objc_release(
-// CHECK: declare extern_weak void @objc_storeStrong(
+// CHECK: declare extern_weak void @llvm.objc.release(
+// CHECK: declare extern_weak void @llvm.objc.storeStrong(
diff --git a/test/CodeGenObjC/arc-precise-lifetime.m b/test/CodeGenObjC/arc-precise-lifetime.m
index a366c08bbb..4c563c5b84 100644
--- a/test/CodeGenObjC/arc-precise-lifetime.m
+++ b/test/CodeGenObjC/arc-precise-lifetime.m
@@ -14,11 +14,11 @@ void test0() {
// CHECK-NEXT: [[T1:%.*]] = load i8*, i8** [[X]]
// CHECK-NEXT: store i8* null, i8** [[X]]
- // CHECK-NEXT: call void @objc_release(i8* [[T1]]) [[NUW:#[0-9]+]]
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]]) [[NUW:#[0-9]+]]
// CHECK-NOT: clang.imprecise_release
// CHECK-NEXT: [[T1:%.*]] = load i8*, i8** [[X]]
- // CHECK-NEXT: call void @objc_release(i8* [[T1]]) [[NUW:#[0-9]+]]
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]]) [[NUW:#[0-9]+]]
// CHECK-NOT: clang.imprecise_release
// CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
@@ -43,14 +43,14 @@ void test1a_message(void) {
// CHECK: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[PTRPTR1]])
// CHECK: [[T0:%.*]] = call [[TEST1:%.*]]* @test1_helper()
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
- // CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
+ // CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[TEST1]]*
// CHECK-NEXT: store [[TEST1]]* [[T3]]
// CHECK-NEXT: [[CPTR1:%.*]] = bitcast i8** [[C]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[CPTR1]])
// CHECK-NEXT: [[T0:%.*]] = load [[TEST1]]*, [[TEST1]]**
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
- // CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutorelease(i8* [[T1]])
+ // CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainAutorelease(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[TEST1]]*
// CHECK-NEXT: [[T4:%.*]] = load i8*, i8** @OBJC_SELECTOR_REFERENCES_
// CHECK-NEXT: [[T5:%.*]] = bitcast [[TEST1]]* [[T3]] to i8*
@@ -60,7 +60,7 @@ void test1a_message(void) {
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[CPTR2]])
// CHECK-NEXT: [[T0:%.*]] = load [[TEST1]]*, [[TEST1]]**
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
- // CHECK-NEXT: call void @objc_release(i8* [[T1]]) [[NUW]], !clang.imprecise_release
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]]) [[NUW]], !clang.imprecise_release
// CHECK-NEXT: [[PTRPTR2:%.*]] = bitcast [[PTR_T]]** [[PTR]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[PTRPTR2]])
// CHECK-NEXT: ret void
@@ -77,14 +77,14 @@ void test1a_property(void) {
// CHECK: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[PTRPTR1]])
// CHECK: [[T0:%.*]] = call [[TEST1:%.*]]* @test1_helper()
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
- // CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
+ // CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[TEST1]]*
// CHECK-NEXT: store [[TEST1]]* [[T3]]
// CHECK-NEXT: [[CPTR1:%.*]] = bitcast i8** [[C]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[CPTR1]])
// CHECK-NEXT: [[T0:%.*]] = load [[TEST1]]*, [[TEST1]]**
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
- // CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutorelease(i8* [[T1]])
+ // CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainAutorelease(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[TEST1]]*
// CHECK-NEXT: [[T4:%.*]] = load i8*, i8** @OBJC_SELECTOR_REFERENCES_
// CHECK-NEXT: [[T5:%.*]] = bitcast [[TEST1]]* [[T3]] to i8*
@@ -94,7 +94,7 @@ void test1a_property(void) {
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[CPTR2]])
// CHECK-NEXT: [[T0:%.*]] = load [[TEST1]]*, [[TEST1]]**
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
- // CHECK-NEXT: call void @objc_release(i8* [[T1]]) [[NUW]], !clang.imprecise_release
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]]) [[NUW]], !clang.imprecise_release
// CHECK-NEXT: [[PTRPTR2:%.*]] = bitcast [[PTR_T]]** [[PTR]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[PTRPTR2]])
// CHECK-NEXT: ret void
@@ -111,7 +111,7 @@ void test1b_message(void) {
// CHECK: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[PTRPTR1]])
// CHECK: [[T0:%.*]] = call [[TEST1:%.*]]* @test1_helper()
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
- // CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
+ // CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[TEST1]]*
// CHECK-NEXT: store [[TEST1]]* [[T3]]
// CHECK-NEXT: [[CPTR1:%.*]] = bitcast i8** [[C]] to i8*
@@ -125,7 +125,7 @@ void test1b_message(void) {
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[CPTR2]])
// CHECK-NEXT: [[T0:%.*]] = load [[TEST1]]*, [[TEST1]]**
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
- // CHECK-NEXT: call void @objc_release(i8* [[T1]]) [[NUW]]
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]]) [[NUW]]
// CHECK-NOT: clang.imprecise_release
// CHECK-NEXT: [[PTRPTR2:%.*]] = bitcast [[PTR_T]]** [[PTR]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[PTRPTR2]])
@@ -142,7 +142,7 @@ void test1b_property(void) {
// CHECK: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[PTRPTR1]])
// CHECK: [[T0:%.*]] = call [[TEST1:%.*]]* @test1_helper()
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
- // CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
+ // CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[TEST1]]*
// CHECK-NEXT: store [[TEST1]]* [[T3]]
// CHECK-NEXT: [[CPTR1:%.*]] = bitcast i8** [[C]] to i8*
@@ -156,7 +156,7 @@ void test1b_property(void) {
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[CPTR2]])
// CHECK-NEXT: [[T0:%.*]] = load [[TEST1]]*, [[TEST1]]**
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
- // CHECK-NEXT: call void @objc_release(i8* [[T1]]) [[NUW]]
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]]) [[NUW]]
// CHECK-NOT: clang.imprecise_release
// CHECK-NEXT: [[PTRPTR2:%.*]] = bitcast [[PTR_T]]** [[PTR]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[PTRPTR2]])
@@ -173,14 +173,14 @@ void test1c_message(void) {
// CHECK: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[PTRPTR1]])
// CHECK: [[T0:%.*]] = call [[TEST1:%.*]]* @test1_helper()
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
- // CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
+ // CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[TEST1]]*
// CHECK-NEXT: store [[TEST1]]* [[T3]]
// CHECK-NEXT: [[PCPTR1:%.*]] = bitcast i8** [[PC]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[PCPTR1]])
// CHECK-NEXT: [[T0:%.*]] = load [[TEST1]]*, [[TEST1]]**
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
- // CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutorelease(i8* [[T1]])
+ // CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainAutorelease(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[TEST1]]*
// CHECK-NEXT: [[T4:%.*]] = load i8*, i8** @OBJC_SELECTOR_REFERENCES_
// CHECK-NEXT: [[T5:%.*]] = bitcast [[TEST1]]* [[T3]] to i8*
@@ -190,7 +190,7 @@ void test1c_message(void) {
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[PCPTR2]])
// CHECK-NEXT: [[T0:%.*]] = load [[TEST1]]*, [[TEST1]]**
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
- // CHECK-NEXT: call void @objc_release(i8* [[T1]]) [[NUW]], !clang.imprecise_release
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]]) [[NUW]], !clang.imprecise_release
// CHECK-NEXT: [[PTRPTR2:%.*]] = bitcast [[PTR_T]]** [[PTR]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[PTRPTR2]])
// CHECK-NEXT: ret void
@@ -206,14 +206,14 @@ void test1c_property(void) {
// CHECK: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[PTRPTR1]])
// CHECK: [[T0:%.*]] = call [[TEST1:%.*]]* @test1_helper()
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
- // CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
+ // CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[TEST1]]*
// CHECK-NEXT: store [[TEST1]]* [[T3]]
// CHECK-NEXT: [[PCPTR1:%.*]] = bitcast i8** [[PC]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[PCPTR1]])
// CHECK-NEXT: [[T0:%.*]] = load [[TEST1]]*, [[TEST1]]**
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
- // CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutorelease(i8* [[T1]])
+ // CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainAutorelease(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[TEST1]]*
// CHECK-NEXT: [[T4:%.*]] = load i8*, i8** @OBJC_SELECTOR_REFERENCES_
// CHECK-NEXT: [[T5:%.*]] = bitcast [[TEST1]]* [[T3]] to i8*
@@ -223,7 +223,7 @@ void test1c_property(void) {
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[PCPTR2]])
// CHECK-NEXT: [[T0:%.*]] = load [[TEST1]]*, [[TEST1]]**
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
- // CHECK-NEXT: call void @objc_release(i8* [[T1]]) [[NUW]], !clang.imprecise_release
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]]) [[NUW]], !clang.imprecise_release
// CHECK-NEXT: [[PTRPTR2:%.*]] = bitcast [[PTR_T]]** [[PTR]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[PTRPTR2]])
// CHECK-NEXT: ret void
@@ -239,7 +239,7 @@ void test1d_message(void) {
// CHECK: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[PTRPTR1]])
// CHECK: [[T0:%.*]] = call [[TEST1:%.*]]* @test1_helper()
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
- // CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
+ // CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[TEST1]]*
// CHECK-NEXT: store [[TEST1]]* [[T3]]
// CHECK-NEXT: [[PCPTR1:%.*]] = bitcast i8** [[PC]] to i8*
@@ -253,7 +253,7 @@ void test1d_message(void) {
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[PCPTR2]])
// CHECK-NEXT: [[NINE:%.*]] = load [[TEST1]]*, [[TEST1]]**
// CHECK-NEXT: [[TEN:%.*]] = bitcast [[TEST1]]* [[NINE]] to i8*
- // CHECK-NEXT: call void @objc_release(i8* [[TEN]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[TEN]])
// CHECK-NEXT: [[PTRPTR2:%.*]] = bitcast [[PTR_T]]** [[PTR]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[PTRPTR2]])
// CHECK-NEXT: ret void
@@ -269,7 +269,7 @@ void test1d_property(void) {
// CHECK: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[PTRPTR1]])
// CHECK: [[T0:%.*]] = call [[TEST1:%.*]]* @test1_helper()
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
- // CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
+ // CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[TEST1]]*
// CHECK-NEXT: store [[TEST1]]* [[T3]]
// CHECK-NEXT: [[PCPTR1:%.*]] = bitcast i8** [[PC]] to i8*
@@ -283,7 +283,7 @@ void test1d_property(void) {
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[PCPTR2]])
// CHECK-NEXT: [[NINE:%.*]] = load [[TEST1]]*, [[TEST1]]**
// CHECK-NEXT: [[TEN:%.*]] = bitcast [[TEST1]]* [[NINE]] to i8*
- // CHECK-NEXT: call void @objc_release(i8* [[TEN]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[TEN]])
// CHECK-NEXT: [[PTRPTR2:%.*]] = bitcast [[PTR_T]]** [[PTR]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[PTRPTR2]])
// CHECK-NEXT: ret void
@@ -301,7 +301,7 @@ void test2(Test2 *x) {
x->ivar = 0;
// CHECK: [[X:%.*]] = alloca [[TEST2:%.*]]*
// CHECK-NEXT: [[T0:%.*]] = bitcast [[TEST2]]* {{%.*}} to i8*
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retain(i8* [[T0]]) [[NUW]]
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retain(i8* [[T0]]) [[NUW]]
// CHECK-NEXT: [[T2:%.*]] = bitcast i8* [[T1]] to [[TEST2]]*
// CHECK-NEXT: store [[TEST2]]* [[T2]], [[TEST2]]** [[X]],
@@ -312,12 +312,12 @@ void test2(Test2 *x) {
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to i8**
// CHECK-NEXT: [[T4:%.*]] = load i8*, i8** [[T3]],
// CHECK-NEXT: store i8* null, i8** [[T3]],
- // CHECK-NEXT: call void @objc_release(i8* [[T4]]) [[NUW]]
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T4]]) [[NUW]]
// CHECK-NOT: imprecise
// CHECK-NEXT: [[T0:%.*]] = load [[TEST2]]*, [[TEST2]]** [[X]]
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST2]]* [[T0]] to i8*
- // CHECK-NEXT: call void @objc_release(i8* [[T1]]) [[NUW]], !clang.imprecise_release
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]]) [[NUW]], !clang.imprecise_release
// CHECK-NEXT: ret void
}
@@ -325,11 +325,11 @@ void test2(Test2 *x) {
// CHECK-LABEL: define void @test3(i8*
void test3(PRECISE_LIFETIME id x) {
// CHECK: [[X:%.*]] = alloca i8*,
- // CHECK-NEXT: [[T0:%.*]] = call i8* @objc_retain(i8* {{%.*}}) [[NUW]]
+ // CHECK-NEXT: [[T0:%.*]] = call i8* @llvm.objc.retain(i8* {{%.*}}) [[NUW]]
// CHECK-NEXT: store i8* [[T0]], i8** [[X]],
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[X]]
- // CHECK-NEXT: call void @objc_release(i8* [[T0]]) [[NUW]]
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]]) [[NUW]]
// CHECK-NOT: imprecise_release
// CHECK-NEXT: ret void
diff --git a/test/CodeGenObjC/arc-property.m b/test/CodeGenObjC/arc-property.m
index edc4d1e853..b417f9505e 100644
--- a/test/CodeGenObjC/arc-property.m
+++ b/test/CodeGenObjC/arc-property.m
@@ -8,11 +8,11 @@ void test0(Test0 *t0, id value) {
t0.value = value;
}
// CHECK-LABEL: define void @test0(
-// CHECK: call void @objc_storeStrong
-// CHECK: call void @objc_storeStrong
+// CHECK: call void @llvm.objc.storeStrong
+// CHECK: call void @llvm.objc.storeStrong
// CHECK: @objc_msgSend
-// CHECK: call void @objc_storeStrong(
-// CHECK: call void @objc_storeStrong(
+// CHECK: call void @llvm.objc.storeStrong(
+// CHECK: call void @llvm.objc.storeStrong(
struct S1 { Class isa; };
@interface Test1
@@ -62,7 +62,7 @@ static Class theGlobalClass;
// CHECK-NEXT: [[T2:%.*]] = bitcast [[TEST2]]* [[T1]] to i8*
// CHECK-NEXT: [[T3:%.*]] = getelementptr inbounds i8, i8* [[T2]], i64 [[OFFSET]]
// CHECK-NEXT: [[T4:%.*]] = bitcast i8* [[T3]] to i8**
-// CHECK-NEXT: call void @objc_storeStrong(i8** [[T4]], i8* [[T0]]) [[NUW:#[0-9]+]]
+// CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[T4]], i8* [[T0]]) [[NUW:#[0-9]+]]
// CHECK-NEXT: ret void
// CHECK: define internal i8* @"\01-[Test2 theClass]"(
@@ -83,7 +83,7 @@ static Class theGlobalClass;
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST2]]* [[T0]] to i8*
// CHECK-NEXT: [[T2:%.*]] = getelementptr inbounds i8, i8* [[T1]], i64 [[OFFSET]]
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to i8**
-// CHECK-NEXT: call void @objc_storeStrong(i8** [[T3]], i8* null) [[NUW]]
+// CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[T3]], i8* null) [[NUW]]
// CHECK-NEXT: ret void
// rdar://13115896
@@ -112,11 +112,11 @@ void test3(Test3 *t) {
// CHECK-NEXT: [[T2:%.*]] = call i8* bitcast ({{.*}} @objc_msgSend to {{.*}})(i8* [[T1]], i8* [[SEL]])
// CHECK-NEXT: [[T3:%.*]] = load i8*, i8** [[X]],
// CHECK-NEXT: store i8* [[T2]], i8** [[X]],
-// CHECK-NEXT: call void @objc_release(i8* [[T3]])
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[T3]])
// Epilogue.
-// CHECK-NEXT: call void @objc_storeStrong(i8** [[X]], i8* null)
+// CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[X]], i8* null)
// CHECK-NEXT: [[T0:%.*]] = bitcast [[TEST3]]** [[T]] to i8**
-// CHECK-NEXT: call void @objc_storeStrong(i8** [[T0]], i8* null)
+// CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[T0]], i8* null)
// CHECK-NEXT: ret void
@implementation Test3
@@ -126,7 +126,7 @@ void test3(Test3 *t) {
}
// CHECK: define internal i8* @"\01-[Test3 copyMachine]"(
// CHECK: [[T0:%.*]] = call i8* @test3_helper()
-// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
+// CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: ret i8* [[T1]]
- (void) setCopyMachine: (id) x {}
@end
diff --git a/test/CodeGenObjC/arc-related-result-type.m b/test/CodeGenObjC/arc-related-result-type.m
index 02d380368b..ac69e0d9f6 100644
--- a/test/CodeGenObjC/arc-related-result-type.m
+++ b/test/CodeGenObjC/arc-related-result-type.m
@@ -12,17 +12,17 @@ void test0(Test0 *val) {
// CHECK-NEXT: store [[TEST0]]* null
// CHECK-NEXT: bitcast
// CHECK-NEXT: bitcast
-// CHECK-NEXT: call void @objc_storeStrong(
+// CHECK-NEXT: call void @llvm.objc.storeStrong(
// CHECK-NEXT: load [[TEST0]]*, [[TEST0]]** [[VAL]],
// CHECK-NEXT: load
// CHECK-NEXT: bitcast
// CHECK-NEXT: [[T0:%.*]] = call i8* bitcast (
-// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
+// CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: [[T2:%.*]] = bitcast i8* [[T1]] to [[TEST0]]*
// CHECK-NEXT: store [[TEST0]]* [[T2]], [[TEST0]]** [[X]]
// CHECK-NEXT: [[T0:%.*]] = bitcast [[TEST0]]** [[X]] to i8**
-// CHECK-NEXT: call void @objc_storeStrong(i8** [[T0]], i8* null)
+// CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[T0]], i8* null)
// CHECK-NEXT: [[T0:%.*]] = bitcast [[TEST0]]** [[VAL]] to i8**
-// CHECK-NEXT: call void @objc_storeStrong(i8** [[T0]], i8* null)
+// CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[T0]], i8* null)
// CHECK-NEXT: ret void
}
diff --git a/test/CodeGenObjC/arc-ternary-op.m b/test/CodeGenObjC/arc-ternary-op.m
index 3488d2c538..91ba6c4505 100644
--- a/test/CodeGenObjC/arc-ternary-op.m
+++ b/test/CodeGenObjC/arc-ternary-op.m
@@ -22,15 +22,15 @@ void test0(_Bool cond) {
// CHECK-NEXT: store i1 true, i1* [[RELCOND]]
// CHECK-NEXT: br label
// CHECK: [[T0:%.*]] = phi i8* [ null, {{%.*}} ], [ [[CALL]], {{%.*}} ]
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retain(i8* [[T0]]) [[NUW:#[0-9]+]]
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retain(i8* [[T0]]) [[NUW:#[0-9]+]]
// CHECK-NEXT: store i8* [[T1]], i8** [[X]],
// CHECK-NEXT: [[REL:%.*]] = load i1, i1* [[RELCOND]]
// CHECK-NEXT: br i1 [[REL]],
// CHECK: [[T0:%.*]] = load i8*, i8** [[RELVAL]]
- // CHECK-NEXT: call void @objc_release(i8* [[T0]]) [[NUW]]
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]]) [[NUW]]
// CHECK-NEXT: br label
// CHECK: [[T0:%.*]] = load i8*, i8** [[X]]
- // CHECK-NEXT: call void @objc_release(i8* [[T0]]) [[NUW]]
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]]) [[NUW]]
// CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
@@ -58,7 +58,7 @@ void test1(int cond) {
// CHECK-NEXT: store i8* null, i8** [[STRONG]]
// CHECK-NEXT: [[WEAKPTR1:%.*]] = bitcast i8** [[WEAK]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[WEAKPTR1]])
- // CHECK-NEXT: call i8* @objc_initWeak(i8** [[WEAK]], i8* null)
+ // CHECK-NEXT: call i8* @llvm.objc.initWeak(i8** [[WEAK]], i8* null)
// CHECK-NEXT: [[T0:%.*]] = load i32, i32* [[COND]]
// CHECK-NEXT: [[T1:%.*]] = icmp ne i32 [[T0]], 0
@@ -74,11 +74,11 @@ void test1(int cond) {
// CHECK-NEXT: [[T0:%.*]] = icmp eq i8** [[ARG]], null
// CHECK-NEXT: br i1 [[T0]],
// CHECK: [[T0:%.*]] = load i8*, i8** [[TEMP1]]
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retain(i8* [[T0]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retain(i8* [[T0]])
// CHECK-NEXT: call void (...) @clang.arc.use(i8* [[W]]) [[NUW]]
// CHECK-NEXT: [[T2:%.*]] = load i8*, i8** [[ARG]]
// CHECK-NEXT: store i8* [[T1]], i8** [[ARG]]
- // CHECK-NEXT: call void @objc_release(i8* [[T2]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T2]])
// CHECK-NEXT: br label
// CHECK: [[T0:%.*]] = load i32, i32* [[COND]]
@@ -88,7 +88,7 @@ void test1(int cond) {
// CHECK-NEXT: [[T1:%.*]] = select i1 [[T0]], i8** null, i8** [[TEMP2]]
// CHECK-NEXT: store i1 false, i1* [[CONDCLEANUP]]
// CHECK-NEXT: br i1 [[T0]],
- // CHECK: [[T0:%.*]] = call i8* @objc_loadWeakRetained(i8** [[ARG]])
+ // CHECK: [[T0:%.*]] = call i8* @llvm.objc.loadWeakRetained(i8** [[ARG]])
// CHECK-NEXT: store i8* [[T0]], i8** [[CONDCLEANUPSAVE]]
// CHECK-NEXT: store i1 true, i1* [[CONDCLEANUP]]
// CHECK-NEXT: store i8* [[T0]], i8** [[TEMP2]]
@@ -97,10 +97,10 @@ void test1(int cond) {
// CHECK-NEXT: [[T0:%.*]] = icmp eq i8** [[ARG]], null
// CHECK-NEXT: br i1 [[T0]],
// CHECK: [[T0:%.*]] = load i8*, i8** [[TEMP2]]
- // CHECK-NEXT: call i8* @objc_storeWeak(i8** [[ARG]], i8* [[T0]])
+ // CHECK-NEXT: call i8* @llvm.objc.storeWeak(i8** [[ARG]], i8* [[T0]])
// CHECK-NEXT: br label
- // CHECK: call void @objc_destroyWeak(i8** [[WEAK]])
+ // CHECK: call void @llvm.objc.destroyWeak(i8** [[WEAK]])
// CHECK: [[WEAKPTR2:%.*]] = bitcast i8** [[WEAK]] to i8*
// CHECK: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[WEAKPTR2]])
// CHECK: [[STRONGPTR2:%.*]] = bitcast i8** [[STRONG]] to i8*
@@ -130,21 +130,21 @@ void test2(int cond) {
// CHECK-NEXT: br i1
// Within true branch, cleanup enabled.
// CHECK: [[T0:%.*]] = call i8* @test2_producer()
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: store i8* [[T1]], i8** [[CLEANUP_SAVE]]
// CHECK-NEXT: store i1 true, i1* [[RUN_CLEANUP]]
// CHECK-NEXT: br label
// Join point for conditional operator; retain immediately.
// CHECK: [[T0:%.*]] = phi i8* [ [[T1]], {{%.*}} ], [ null, {{%.*}} ]
- // CHECK-NEXT: [[RESULT:%.*]] = call i8* @objc_retain(i8* [[T0]])
+ // CHECK-NEXT: [[RESULT:%.*]] = call i8* @llvm.objc.retain(i8* [[T0]])
// Leaving full-expression; run conditional cleanup.
// CHECK-NEXT: [[T0:%.*]] = load i1, i1* [[RUN_CLEANUP]]
// CHECK-NEXT: br i1 [[T0]]
// CHECK: [[T0:%.*]] = load i8*, i8** [[CLEANUP_SAVE]]
- // CHECK-NEXT: call void @objc_release(i8* [[T0]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]])
// CHECK-NEXT: br label
// And way down at the end of the loop:
- // CHECK: call void @objc_release(i8* [[RESULT]])
+ // CHECK: call void @llvm.objc.release(i8* [[RESULT]])
}
// CHECK: attributes [[NUW]] = { nounwind }
diff --git a/test/CodeGenObjC/arc-unbridged-cast.m b/test/CodeGenObjC/arc-unbridged-cast.m
index 5ab5d02fff..72b7b01bb7 100644
--- a/test/CodeGenObjC/arc-unbridged-cast.m
+++ b/test/CodeGenObjC/arc-unbridged-cast.m
@@ -32,4 +32,4 @@ id MMM()
return 0;
}
-// CHECK-NOT: call i8* @objc_retainAutoreleasedReturnValue
+// CHECK-NOT: call i8* @llvm.objc.retainAutoreleasedReturnValue
diff --git a/test/CodeGenObjC/arc-unopt.m b/test/CodeGenObjC/arc-unopt.m
index f80514d6e4..4354cb61c4 100644
--- a/test/CodeGenObjC/arc-unopt.m
+++ b/test/CodeGenObjC/arc-unopt.m
@@ -9,7 +9,7 @@ Test0 *test0(void) {
// CHECK: [[LD:%.*]] = load [[TEST0:%.*]]*, [[TEST0:%.*]]** @test0_helper
// CHECK-NEXT: [[T0:%.*]] = bitcast [[TEST0]]* [[LD]] to i8*
- // CHECK-NEXT: [[T1:%.*]] = tail call i8* @objc_retainAutoreleaseReturnValue(i8* [[T0]])
+ // CHECK-NEXT: [[T1:%.*]] = tail call i8* @llvm.objc.retainAutoreleaseReturnValue(i8* [[T0]])
// CHECK-NEXT: [[T2:%.*]] = bitcast i8* [[T1]] to [[TEST0]]*
// CHECK-NEXT: ret [[TEST0]]* [[T2]]
}
@@ -19,14 +19,14 @@ id test1(void) {
return test1_helper;
// CHECK: [[LD:%.*]] = load i8*, i8** @test1_helper
- // CHECK-NEXT: [[T0:%.*]] = tail call i8* @objc_retainAutoreleaseReturnValue(i8* [[LD]])
+ // CHECK-NEXT: [[T0:%.*]] = tail call i8* @llvm.objc.retainAutoreleaseReturnValue(i8* [[LD]])
// CHECK-NEXT: ret i8* [[T0]]
}
void test2(void) {
// CHECK: [[X:%.*]] = alloca i8*
// CHECK-NEXT: store i8* null, i8** [[X]]
- // CHECK-NEXT: call void @objc_destroyWeak(i8** [[X]])
+ // CHECK-NEXT: call void @llvm.objc.destroyWeak(i8** [[X]])
// CHECK-NEXT: ret void
__weak id x;
}
@@ -63,7 +63,7 @@ void test5(void) {
// CHECK-NEXT: [[T0:%.*]] = load [[TEST5]]*, [[TEST5]]** [[Y]],
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST5]]** [[X]] to i8**
// CHECK-NEXT: [[T2:%.*]] = bitcast [[TEST5]]* [[T0]] to i8*
-// CHECK-NEXT: call void @objc_storeStrong(i8** [[T1]], i8* [[T2]])
+// CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[T1]], i8* [[T2]])
// CHECK-NEXT: [[T3:%.*]] = icmp ne [[TEST5]]* [[T0]], null
// CHECK-NEXT: br i1 [[T3]],
}
diff --git a/test/CodeGenObjC/arc-unoptimized-byref-var.m b/test/CodeGenObjC/arc-unoptimized-byref-var.m
index ffc73a44d4..bd57335d6e 100644
--- a/test/CodeGenObjC/arc-unoptimized-byref-var.m
+++ b/test/CodeGenObjC/arc-unoptimized-byref-var.m
@@ -9,8 +9,8 @@ void test19() {
// CHECK-UNOPT: [[X2:%.*]] = getelementptr inbounds [[BYREF_T:%.*]], [[BYREF_T:%.*]]* [[VAR1:%.*]], i32 0, i32 6
// CHECK-UNOPT-NEXT: [[SIX:%.*]] = load i8*, i8** [[X2]], align 8
// CHECK-UNOPT-NEXT: store i8* null, i8** [[X]], align 8
-// CHECK-UNOPT-NEXT: call void @objc_storeStrong(i8** [[X]], i8* [[SIX]]) [[NUW:#[0-9]+]]
-// CHECK-UNOPT-NEXT: call void @objc_storeStrong(i8** [[X2]], i8* null) [[NUW]]
+// CHECK-UNOPT-NEXT: call void @llvm.objc.storeStrong(i8** [[X]], i8* [[SIX]]) [[NUW:#[0-9]+]]
+// CHECK-UNOPT-NEXT: call void @llvm.objc.storeStrong(i8** [[X2]], i8* null) [[NUW]]
// CHECK-UNOPT-NEXT: ret void
}
diff --git a/test/CodeGenObjC/arc-unsafeclaim.m b/test/CodeGenObjC/arc-unsafeclaim.m
index 01329df0f7..fd063bfccf 100644
--- a/test/CodeGenObjC/arc-unsafeclaim.m
+++ b/test/CodeGenObjC/arc-unsafeclaim.m
@@ -29,7 +29,7 @@ void test_assign() {
// CHECK: [[T0:%.*]] = call [[A:.*]]* @makeA()
// CHECK-MARKED-NEXT: call void asm sideeffect
// CHECK-NEXT: [[T1:%.*]] = bitcast [[A]]* [[T0]] to i8*
-// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_unsafeClaimAutoreleasedReturnValue(i8* [[T1]])
+// CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.unsafeClaimAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[A]]*
// CHECK-NEXT: [[T4:%.*]] = bitcast [[A]]* [[T3]] to i8*
// CHECK-NEXT: store i8* [[T4]], i8** [[X]]
@@ -41,7 +41,7 @@ void test_assign() {
// DISABLED: [[T0:%.*]] = call [[A:.*]]* @makeA()
// DISABLED-MARKED-NEXT: call void asm sideeffect
// DISABLED-NEXT: [[T1:%.*]] = bitcast [[A]]* [[T0]] to i8*
-// DISABLED-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
+// DISABLED-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T1]])
void test_assign_assign() {
__unsafe_unretained id x, y;
@@ -53,7 +53,7 @@ void test_assign_assign() {
// CHECK: [[T0:%.*]] = call [[A]]* @makeA()
// CHECK-MARKED-NEXT: call void asm sideeffect
// CHECK-NEXT: [[T1:%.*]] = bitcast [[A]]* [[T0]] to i8*
-// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_unsafeClaimAutoreleasedReturnValue(i8* [[T1]])
+// CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.unsafeClaimAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[A]]*
// CHECK-NEXT: [[T4:%.*]] = bitcast [[A]]* [[T3]] to i8*
// CHECK-NEXT: store i8* [[T4]], i8** [[Y]]
@@ -75,18 +75,18 @@ void test_strong_assign_assign() {
// CHECK: [[T0:%.*]] = call [[A]]* @makeA()
// CHECK-MARKED-NEXT: call void asm sideeffect
// CHECK-NEXT: [[T1:%.*]] = bitcast [[A]]* [[T0]] to i8*
-// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
+// CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[A]]*
// CHECK-NEXT: [[T4:%.*]] = bitcast [[A]]* [[T3]] to i8*
// CHECK-NEXT: store i8* [[T4]], i8** [[Y]]
// CHECK-NEXT: [[OLD:%.*]] = load i8*, i8** [[X]]
// CHECK-NEXT: store i8* [[T4]], i8** [[X]]
-// CHECK-NEXT: call void @objc_release(i8* [[OLD]]
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[OLD]]
// CHECK-OPTIMIZED-NEXT: bitcast
// CHECK-OPTIMIZED-NEXT: lifetime.end
-// CHECK-UNOPTIMIZED-NEXT: call void @objc_storeStrong(i8** [[X]], i8* null)
+// CHECK-UNOPTIMIZED-NEXT: call void @llvm.objc.storeStrong(i8** [[X]], i8* null)
// CHECK-OPTIMIZED-NEXT: [[T0:%.*]] = load i8*, i8** [[X]]
-// CHECK-OPTIMIZED-NEXT: call void @objc_release(i8* [[T0]])
+// CHECK-OPTIMIZED-NEXT: call void @llvm.objc.release(i8* [[T0]])
// CHECK-OPTIMIZED-NEXT: bitcast
// CHECK-OPTIMIZED-NEXT: lifetime.end
// CHECK-NEXT: ret void
@@ -102,16 +102,16 @@ void test_assign_strong_assign() {
// CHECK: [[T0:%.*]] = call [[A]]* @makeA()
// CHECK-MARKED-NEXT: call void asm sideeffect
// CHECK-NEXT: [[T1:%.*]] = bitcast [[A]]* [[T0]] to i8*
-// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
+// CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[A]]*
// CHECK-NEXT: [[T4:%.*]] = bitcast [[A]]* [[T3]] to i8*
// CHECK-NEXT: [[OLD:%.*]] = load i8*, i8** [[Y]]
// CHECK-NEXT: store i8* [[T4]], i8** [[Y]]
-// CHECK-NEXT: call void @objc_release(i8* [[OLD]]
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[OLD]]
// CHECK-NEXT: store i8* [[T4]], i8** [[X]]
-// CHECK-UNOPTIMIZED-NEXT: call void @objc_storeStrong(i8** [[Y]], i8* null)
+// CHECK-UNOPTIMIZED-NEXT: call void @llvm.objc.storeStrong(i8** [[Y]], i8* null)
// CHECK-OPTIMIZED-NEXT: [[T0:%.*]] = load i8*, i8** [[Y]]
-// CHECK-OPTIMIZED-NEXT: call void @objc_release(i8* [[T0]])
+// CHECK-OPTIMIZED-NEXT: call void @llvm.objc.release(i8* [[T0]])
// CHECK-OPTIMIZED-NEXT: bitcast
// CHECK-OPTIMIZED-NEXT: lifetime.end
// CHECK-OPTIMIZED-NEXT: bitcast
@@ -126,7 +126,7 @@ void test_init() {
// CHECK: [[T0:%.*]] = call [[A]]* @makeA()
// CHECK-MARKED-NEXT: call void asm sideeffect
// CHECK-NEXT: [[T1:%.*]] = bitcast [[A]]* [[T0]] to i8*
-// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_unsafeClaimAutoreleasedReturnValue(i8* [[T1]])
+// CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.unsafeClaimAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[A]]*
// CHECK-NEXT: [[T4:%.*]] = bitcast [[A]]* [[T3]] to i8*
// CHECK-NEXT: store i8* [[T4]], i8** [[X]]
@@ -144,7 +144,7 @@ void test_init_assignment() {
// CHECK: [[T0:%.*]] = call [[A]]* @makeA()
// CHECK-MARKED-NEXT: call void asm sideeffect
// CHECK-NEXT: [[T1:%.*]] = bitcast [[A]]* [[T0]] to i8*
-// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_unsafeClaimAutoreleasedReturnValue(i8* [[T1]])
+// CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.unsafeClaimAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[A]]*
// CHECK-NEXT: [[T4:%.*]] = bitcast [[A]]* [[T3]] to i8*
// CHECK-NEXT: store i8* [[T4]], i8** [[X]]
@@ -165,14 +165,14 @@ void test_strong_init_assignment() {
// CHECK: [[T0:%.*]] = call [[A]]* @makeA()
// CHECK-MARKED-NEXT: call void asm sideeffect
// CHECK-NEXT: [[T1:%.*]] = bitcast [[A]]* [[T0]] to i8*
-// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
+// CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[A]]*
// CHECK-NEXT: [[T4:%.*]] = bitcast [[A]]* [[T3]] to i8*
// CHECK-NEXT: store i8* [[T4]], i8** [[X]]
// CHECK-NEXT: store i8* [[T4]], i8** [[Y]]
-// CHECK-UNOPTIMIZED-NEXT: call void @objc_storeStrong(i8** [[Y]], i8* null)
+// CHECK-UNOPTIMIZED-NEXT: call void @llvm.objc.storeStrong(i8** [[Y]], i8* null)
// CHECK-OPTIMIZED-NEXT: [[T0:%.*]] = load i8*, i8** [[Y]]
-// CHECK-OPTIMIZED-NEXT: call void @objc_release(i8* [[T0]])
+// CHECK-OPTIMIZED-NEXT: call void @llvm.objc.release(i8* [[T0]])
// CHECK-OPTIMIZED-NEXT: bitcast
// CHECK-OPTIMIZED-NEXT: lifetime.end
// CHECK-OPTIMIZED-NEXT: bitcast
@@ -189,18 +189,18 @@ void test_init_strong_assignment() {
// CHECK: [[T0:%.*]] = call [[A]]* @makeA()
// CHECK-MARKED-NEXT: call void asm sideeffect
// CHECK-NEXT: [[T1:%.*]] = bitcast [[A]]* [[T0]] to i8*
-// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
+// CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[A]]*
// CHECK-NEXT: [[T4:%.*]] = bitcast [[A]]* [[T3]] to i8*
// CHECK-NEXT: [[OLD:%.*]] = load i8*, i8** [[X]]
// CHECK-NEXT: store i8* [[T4]], i8** [[X]]
-// CHECK-NEXT: call void @objc_release(i8* [[OLD]])
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[OLD]])
// CHECK-NEXT: store i8* [[T4]], i8** [[Y]]
// CHECK-OPTIMIZED-NEXT: bitcast
// CHECK-OPTIMIZED-NEXT: lifetime.end
-// CHECK-UNOPTIMIZED-NEXT: call void @objc_storeStrong(i8** [[X]], i8* null)
+// CHECK-UNOPTIMIZED-NEXT: call void @llvm.objc.storeStrong(i8** [[X]], i8* null)
// CHECK-OPTIMIZED-NEXT: [[T0:%.*]] = load i8*, i8** [[X]]
-// CHECK-OPTIMIZED-NEXT: call void @objc_release(i8* [[T0]])
+// CHECK-OPTIMIZED-NEXT: call void @llvm.objc.release(i8* [[T0]])
// CHECK-OPTIMIZED-NEXT: bitcast
// CHECK-OPTIMIZED-NEXT: lifetime.end
// CHECK-NEXT: ret void
@@ -212,7 +212,7 @@ void test_ignored() {
// CHECK: [[T0:%.*]] = call [[A]]* @makeA()
// CHECK-MARKED-NEXT: call void asm sideeffect
// CHECK-NEXT: [[T1:%.*]] = bitcast [[A]]* [[T0]] to i8*
-// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_unsafeClaimAutoreleasedReturnValue(i8* [[T1]])
+// CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.unsafeClaimAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: bitcast i8* [[T2]] to [[A]]*
// CHECK-NEXT: ret void
@@ -223,7 +223,7 @@ void test_cast_to_void() {
// CHECK: [[T0:%.*]] = call [[A]]* @makeA()
// CHECK-MARKED-NEXT: call void asm sideeffect
// CHECK-NEXT: [[T1:%.*]] = bitcast [[A]]* [[T0]] to i8*
-// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_unsafeClaimAutoreleasedReturnValue(i8* [[T1]])
+// CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.unsafeClaimAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: bitcast i8* [[T2]] to [[A]]*
// CHECK-NEXT: ret void
diff --git a/test/CodeGenObjC/arc-weak-property.m b/test/CodeGenObjC/arc-weak-property.m
index d04032bc0d..8b50a0c209 100644
--- a/test/CodeGenObjC/arc-weak-property.m
+++ b/test/CodeGenObjC/arc-weak-property.m
@@ -21,8 +21,8 @@
// CHECK-NEXT: [[T2:%.*]] = bitcast [[WPT]]* [[T0]] to i8*
// CHECK-NEXT: [[T3:%.*]] = getelementptr inbounds i8, i8* [[T2]], i64 [[T1]]
// CHECK-NEXT: [[T4:%.*]] = bitcast i8* [[T3]] to i8**
-// CHECK-NEXT: [[T5:%.*]] = call i8* @objc_loadWeakRetained(i8** [[T4]])
-// CHECK-NEXT: [[T6:%.*]] = tail call i8* @objc_autoreleaseReturnValue(i8* [[T5]])
+// CHECK-NEXT: [[T5:%.*]] = call i8* @llvm.objc.loadWeakRetained(i8** [[T4]])
+// CHECK-NEXT: [[T6:%.*]] = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* [[T5]])
// CHECK-NEXT: ret i8* [[T6]]
// CHECK: define internal void @"\01-[WeakPropertyTest setPROP:]"
@@ -38,7 +38,7 @@
// CHECK-NEXT: [[T2:%.*]] = bitcast [[WPT]]* [[T0]] to i8*
// CHECK-NEXT: [[T3:%.*]] = getelementptr inbounds i8, i8* [[T2]], i64 [[T1]]
// CHECK-NEXT: [[T4:%.*]] = bitcast i8* [[T3]] to i8**
-// CHECK-NEXT: call i8* @objc_storeWeak(i8** [[T4]], i8* [[V]])
+// CHECK-NEXT: call i8* @llvm.objc.storeWeak(i8** [[T4]], i8* [[V]])
// CHECK-NEXT: ret void
// CHECK: define internal void @"\01-[WeakPropertyTest .cxx_destruct]"
@@ -51,5 +51,5 @@
// CHECK-NEXT: [[T2:%.*]] = bitcast [[WPT]]* [[T0]] to i8*
// CHECK-NEXT: [[T3:%.*]] = getelementptr inbounds i8, i8* [[T2]], i64 [[T1]]
// CHECK-NEXT: [[T4:%.*]] = bitcast i8* [[T3]] to i8**
-// CHECK-NEXT: call void @objc_destroyWeak(i8** [[T4]])
+// CHECK-NEXT: call void @llvm.objc.destroyWeak(i8** [[T4]])
// CHECK-NEXT: ret void
diff --git a/test/CodeGenObjC/arc-weak.m b/test/CodeGenObjC/arc-weak.m
index 59f8d1d693..a976402f54 100644
--- a/test/CodeGenObjC/arc-weak.m
+++ b/test/CodeGenObjC/arc-weak.m
@@ -15,6 +15,6 @@ void test0(__weak B **src) {
// CHECK-NEXT: [[T1:%.*]] = bitcast [[B]]** [[T0]] to [[A]]**
// CHECK-NEXT: [[T2:%.*]] = bitcast [[A]]** [[DEST]] to i8**
// CHECK-NEXT: [[T3:%.*]] = bitcast [[A]]** [[T1]] to i8**
-// CHECK-NEXT: call void @objc_copyWeak(i8** [[T2]], i8** [[T3]])
+// CHECK-NEXT: call void @llvm.objc.copyWeak(i8** [[T2]], i8** [[T3]])
// CHECK-NEXT: [[T0:%.*]] = bitcast [[A]]** [[DEST]] to i8**
-// CHECK: call void @objc_destroyWeak(i8** [[T0]])
+// CHECK: call void @llvm.objc.destroyWeak(i8** [[T0]])
diff --git a/test/CodeGenObjC/arc-with-atthrow.m b/test/CodeGenObjC/arc-with-atthrow.m
index e5295159ce..93fa228c8b 100644
--- a/test/CodeGenObjC/arc-with-atthrow.m
+++ b/test/CodeGenObjC/arc-with-atthrow.m
@@ -11,8 +11,8 @@ void test() {
// CHECK-LABEL: define void @test()
// CHECK: [[T0:%.*]] = call i8* @make()
-// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
-// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_autorelease(i8* [[T1]])
+// CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
+// CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.autorelease(i8* [[T1]])
// CHECK-NEXT: call void @objc_exception_throw(i8* [[T2]]) [[NR:#[0-9]+]]
// CHECK-NEXT: unreachable
diff --git a/test/CodeGenObjC/arc.ll b/test/CodeGenObjC/arc.ll
index caafcff052..f23c656c34 100644
--- a/test/CodeGenObjC/arc.ll
+++ b/test/CodeGenObjC/arc.ll
@@ -2,8 +2,8 @@
target triple = "x86_64-apple-darwin10"
-declare i8* @objc_retain(i8*)
-declare void @objc_release(i8*)
+declare i8* @llvm.objc.retain(i8*)
+declare void @llvm.objc.release(i8*)
; CHECK-LABEL: define void @test(
; CHECK-NOT: @objc_
@@ -13,15 +13,15 @@ entry:
br label %loop
loop:
- call i8* @objc_retain(i8* %x)
+ call i8* @llvm.objc.retain(i8* %x)
%q = load i1, i1* %p
br i1 %q, label %loop.more, label %exit
loop.more:
- call void @objc_release(i8* %x)
+ call void @llvm.objc.release(i8* %x)
br label %loop
exit:
- call void @objc_release(i8* %x)
+ call void @llvm.objc.release(i8* %x)
ret void
}
diff --git a/test/CodeGenObjC/arc.m b/test/CodeGenObjC/arc.m
index 3243952a36..fec6da56bd 100644
--- a/test/CodeGenObjC/arc.m
+++ b/test/CodeGenObjC/arc.m
@@ -6,39 +6,39 @@
// RUN: %clang_cc1 -fobjc-runtime=macosx-10.6.0 -triple x86_64-apple-darwin10 -Wno-objc-root-class -Wno-incompatible-pointer-types -Wno-arc-unsafe-retained-assign -emit-llvm -fblocks -fobjc-arc -fobjc-runtime-has-weak -o - %s | FileCheck -check-prefix=ARC-ALIEN %s
// RUN: %clang_cc1 -fobjc-runtime=macosx-10.7.0 -triple x86_64-apple-darwin11 -Wno-objc-root-class -Wno-incompatible-pointer-types -Wno-arc-unsafe-retained-assign -emit-llvm -fblocks -fobjc-arc -fobjc-runtime-has-weak -o - %s | FileCheck -check-prefix=ARC-NATIVE %s
-// ARC-ALIEN: declare extern_weak void @objc_storeStrong(i8**, i8*)
-// ARC-ALIEN: declare extern_weak i8* @objc_retain(i8*)
-// ARC-ALIEN: declare extern_weak i8* @objc_autoreleaseReturnValue(i8*)
+// ARC-ALIEN: declare extern_weak void @llvm.objc.storeStrong(i8**, i8*)
+// ARC-ALIEN: declare extern_weak i8* @llvm.objc.retain(i8*)
+// ARC-ALIEN: declare extern_weak i8* @llvm.objc.autoreleaseReturnValue(i8*)
// ARC-ALIEN: declare i8* @objc_msgSend(i8*, i8*, ...) [[NLB:#[0-9]+]]
-// ARC-ALIEN: declare extern_weak void @objc_release(i8*)
-// ARC-ALIEN: declare extern_weak i8* @objc_retainAutoreleasedReturnValue(i8*)
-// ARC-ALIEN: declare extern_weak i8* @objc_initWeak(i8**, i8*)
-// ARC-ALIEN: declare extern_weak i8* @objc_storeWeak(i8**, i8*)
-// ARC-ALIEN: declare extern_weak i8* @objc_loadWeakRetained(i8**)
-// ARC-ALIEN: declare extern_weak void @objc_destroyWeak(i8**)
-// ARC-ALIEN: declare extern_weak i8* @objc_autorelease(i8*)
-// ARC-ALIEN: declare extern_weak i8* @objc_retainAutorelease(i8*)
-
-// ARC-NATIVE: declare void @objc_storeStrong(i8**, i8*)
-// ARC-NATIVE: declare i8* @objc_retain(i8*) [[NLB:#[0-9]+]]
-// ARC-NATIVE: declare i8* @objc_autoreleaseReturnValue(i8*)
-// ARC-NATIVE: declare i8* @objc_msgSend(i8*, i8*, ...) [[NLB]]
-// ARC-NATIVE: declare void @objc_release(i8*) [[NLB]]
-// ARC-NATIVE: declare i8* @objc_retainAutoreleasedReturnValue(i8*)
-// ARC-NATIVE: declare i8* @objc_initWeak(i8**, i8*)
-// ARC-NATIVE: declare i8* @objc_storeWeak(i8**, i8*)
-// ARC-NATIVE: declare i8* @objc_loadWeakRetained(i8**)
-// ARC-NATIVE: declare void @objc_destroyWeak(i8**)
-// ARC-NATIVE: declare i8* @objc_autorelease(i8*)
-// ARC-NATIVE: declare i8* @objc_retainAutorelease(i8*)
+// ARC-ALIEN: declare extern_weak void @llvm.objc.release(i8*)
+// ARC-ALIEN: declare extern_weak i8* @llvm.objc.retainAutoreleasedReturnValue(i8*)
+// ARC-ALIEN: declare extern_weak i8* @llvm.objc.initWeak(i8**, i8*)
+// ARC-ALIEN: declare extern_weak i8* @llvm.objc.storeWeak(i8**, i8*)
+// ARC-ALIEN: declare extern_weak i8* @llvm.objc.loadWeakRetained(i8**)
+// ARC-ALIEN: declare extern_weak void @llvm.objc.destroyWeak(i8**)
+// ARC-ALIEN: declare extern_weak i8* @llvm.objc.autorelease(i8*)
+// ARC-ALIEN: declare extern_weak i8* @llvm.objc.retainAutorelease(i8*)
+
+// ARC-NATIVE: declare void @llvm.objc.storeStrong(i8**, i8*)
+// ARC-NATIVE: declare i8* @llvm.objc.retain(i8*)
+// ARC-NATIVE: declare i8* @llvm.objc.autoreleaseReturnValue(i8*)
+// ARC-NATIVE: declare i8* @objc_msgSend(i8*, i8*, ...) [[NLB:#[0-9]+]]
+// ARC-NATIVE: declare void @llvm.objc.release(i8*)
+// ARC-NATIVE: declare i8* @llvm.objc.retainAutoreleasedReturnValue(i8*)
+// ARC-NATIVE: declare i8* @llvm.objc.initWeak(i8**, i8*)
+// ARC-NATIVE: declare i8* @llvm.objc.storeWeak(i8**, i8*)
+// ARC-NATIVE: declare i8* @llvm.objc.loadWeakRetained(i8**)
+// ARC-NATIVE: declare void @llvm.objc.destroyWeak(i8**)
+// ARC-NATIVE: declare i8* @llvm.objc.autorelease(i8*)
+// ARC-NATIVE: declare i8* @llvm.objc.retainAutorelease(i8*)
// CHECK-LABEL: define void @test0
void test0(id x) {
// CHECK: [[X:%.*]] = alloca i8*
- // CHECK-NEXT: [[PARM:%.*]] = call i8* @objc_retain(i8* {{.*}})
+ // CHECK-NEXT: [[PARM:%.*]] = call i8* @llvm.objc.retain(i8* {{.*}})
// CHECK-NEXT: store i8* [[PARM]], i8** [[X]]
// CHECK-NEXT: [[TMP:%.*]] = load i8*, i8** [[X]]
- // CHECK-NEXT: call void @objc_release(i8* [[TMP]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[TMP]])
// CHECK-NEXT: ret void
}
@@ -46,20 +46,20 @@ void test0(id x) {
id test1(id x) {
// CHECK: [[X:%.*]] = alloca i8*
// CHECK-NEXT: [[Y:%.*]] = alloca i8*
- // CHECK-NEXT: [[PARM:%.*]] = call i8* @objc_retain(i8* {{%.*}})
+ // CHECK-NEXT: [[PARM:%.*]] = call i8* @llvm.objc.retain(i8* {{%.*}})
// CHECK-NEXT: store i8* [[PARM]], i8** [[X]]
// CHECK-NEXT: [[YPTR1:%.*]] = bitcast i8** [[Y]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[YPTR1]])
// CHECK-NEXT: store i8* null, i8** [[Y]]
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[Y]]
- // CHECK-NEXT: [[RET:%.*]] = call i8* @objc_retain(i8* [[T0]])
+ // CHECK-NEXT: [[RET:%.*]] = call i8* @llvm.objc.retain(i8* [[T0]])
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[Y]]
- // CHECK-NEXT: call void @objc_release(i8* [[T0]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]])
// CHECK-NEXT: [[YPTR2:%.*]] = bitcast i8** [[Y]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[YPTR2]])
// CHECK-NEXT: [[T1:%.*]] = load i8*, i8** [[X]]
- // CHECK-NEXT: call void @objc_release(i8* [[T1]])
- // CHECK-NEXT: [[T1:%.*]] = tail call i8* @objc_autoreleaseReturnValue(i8* [[RET]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]])
+ // CHECK-NEXT: [[T1:%.*]] = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* [[RET]])
// CHECK-NEXT: ret i8* [[T1]]
id y;
return y;
@@ -113,19 +113,19 @@ void test3_unelided() {
// CHECK-NEXT: [[ALLOC:%.*]] = call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
// CHECK-NEXT: bitcast
// CHECK-NEXT: bitcast
- // CHECK-NEXT: call void @objc_release(i8*
+ // CHECK-NEXT: call void @llvm.objc.release(i8*
[Test3 alloc];
// CHECK-NEXT: [[T0:%.*]] = load [[TEST3]]*, [[TEST3]]** [[X]]
// CHECK-NEXT: load i8*, i8** @OBJC_SELECTOR_REFERENCES_
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST3]]* [[T0]] to i8*
// CHECK-NEXT: [[COPY:%.*]] = call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend {{.*}})(i8* [[T1]],
- // CHECK-NEXT: call void @objc_release(i8* [[COPY]]) [[NUW:#[0-9]+]]
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[COPY]]) [[NUW:#[0-9]+]]
[x copy];
// CHECK-NEXT: [[T0:%.*]] = load [[TEST3]]*, [[TEST3]]** [[X]]
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST3]]* [[T0]] to i8*
- // CHECK-NEXT: call void @objc_release(i8* [[T1]]) [[NUW]]
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]]) [[NUW]]
// CHECK-NEXT: [[XPTR2:%.*]] = bitcast [[TEST3]]** [[X]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
@@ -163,13 +163,13 @@ void test3() {
// Assignment to x.
// CHECK-NEXT: [[TMP:%.*]] = load i8*, i8** [[X]]
// CHECK-NEXT: store i8* [[COPY]], i8** [[X]]
- // CHECK-NEXT: call void @objc_release(i8* [[TMP]]) [[NUW]]
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[TMP]]) [[NUW]]
x = [x copy];
// Cleanup for x.
// CHECK-NEXT: [[TMP:%.*]] = load i8*, i8** [[X]]
- // CHECK-NEXT: call void @objc_release(i8* [[TMP]]) [[NUW]]
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[TMP]]) [[NUW]]
// CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
@@ -193,7 +193,7 @@ id test4() {
// Retain/release elided.
// CHECK-NEXT: bitcast
// CHECK-NEXT: [[INIT:%.*]] = bitcast
- // CHECK-NEXT: [[RET:%.*]] = tail call i8* @objc_autoreleaseReturnValue(i8* [[INIT]])
+ // CHECK-NEXT: [[RET:%.*]] = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* [[INIT]])
// CHECK-NEXT: ret i8* [[RET]]
@@ -212,10 +212,10 @@ void test5(Test5 *x, id y) {
// CHECK: [[X:%.*]] = alloca [[TEST5:%.*]]*,
// CHECK-NEXT: [[Y:%.*]] = alloca i8*
// CHECK-NEXT: bitcast [[TEST5]]* {{%.*}} to i8*
- // CHECK-NEXT: call i8* @objc_retain
+ // CHECK-NEXT: call i8* @llvm.objc.retain
// CHECK-NEXT: [[PARMX:%.*]] = bitcast i8* {{%.*}} to [[TEST5]]*
// CHECK-NEXT: store [[TEST5]]* [[PARMX]], [[TEST5]]** [[X]]
- // CHECK-NEXT: call i8* @objc_retain
+ // CHECK-NEXT: call i8* @llvm.objc.retain
// CHECK-NEXT: store
// CHECK-NEXT: load [[TEST5]]*, [[TEST5]]** [[X]]
@@ -225,7 +225,7 @@ void test5(Test5 *x, id y) {
// CHECK-NEXT: [[VAR:%.*]] = bitcast
// CHECK-NEXT: [[TMP:%.*]] = load i8*, i8** [[VAR]]
// CHECK-NEXT: store i8* null, i8** [[VAR]]
- // CHECK-NEXT: call void @objc_release(i8* [[TMP]]) [[NUW]]
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[TMP]]) [[NUW]]
x->var = 0;
// CHECK-NEXT: [[YVAL:%.*]] = load i8*, i8** [[Y]]
@@ -234,18 +234,18 @@ void test5(Test5 *x, id y) {
// CHECK-NEXT: bitcast
// CHECK-NEXT: getelementptr
// CHECK-NEXT: [[VAR:%.*]] = bitcast
- // CHECK-NEXT: [[T0:%.*]] = call i8* @objc_retain(i8* [[YVAL]]) [[NUW]]
+ // CHECK-NEXT: [[T0:%.*]] = call i8* @llvm.objc.retain(i8* [[YVAL]]) [[NUW]]
// CHECK-NEXT: [[TMP:%.*]] = load i8*, i8** [[VAR]]
// CHECK-NEXT: store i8* [[T0]], i8** [[VAR]]
- // CHECK-NEXT: call void @objc_release(i8* [[TMP]]) [[NUW]]
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[TMP]]) [[NUW]]
x->var = y;
// Epilogue.
// CHECK-NEXT: [[TMP:%.*]] = load i8*, i8** [[Y]]
- // CHECK-NEXT: call void @objc_release(i8* [[TMP]]) [[NUW]]
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[TMP]]) [[NUW]]
// CHECK-NEXT: [[T0:%.*]] = load [[TEST5]]*, [[TEST5]]** [[X]]
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST5]]* [[T0]] to i8*
- // CHECK-NEXT: call void @objc_release(i8* [[T1]]) [[NUW]]
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]]) [[NUW]]
// CHECK-NEXT: ret void
}
@@ -258,7 +258,7 @@ void test6() {
// CHECK-NEXT: [[CALL:%.*]] = call i8* @test6_helper()
// CHECK-NEXT: store i8* [[CALL]], i8** [[X]]
// CHECK-NEXT: [[T1:%.*]] = load i8*, i8** [[X]]
- // CHECK-NEXT: call void @objc_release(i8* [[T1]]) [[NUW]], !clang.imprecise_release
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]]) [[NUW]], !clang.imprecise_release
// CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
@@ -273,10 +273,10 @@ void test7() {
// CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[XPTR1]])
// CHECK-NEXT: store i8* null, i8** [[X]]
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[X]]
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retain(i8* [[T0]]) [[NUW]]
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retain(i8* [[T0]]) [[NUW]]
// CHECK-NEXT: call void @test7_helper(i8* [[T1]])
// CHECK-NEXT: [[T1:%.*]] = load i8*, i8** [[X]]
- // CHECK-NEXT: call void @objc_release(i8* [[T1]]) [[NUW]], !clang.imprecise_release
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]]) [[NUW]], !clang.imprecise_release
// CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
@@ -292,7 +292,7 @@ void test8() {
// CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[XPTR1]])
// CHECK-NEXT: [[T0:%.*]] = call i8* @test8_helper()
// CHECK-NEXT: store i8* [[T0]], i8** [[X]]
- // CHECK-NEXT: call void @objc_release(i8* [[T0]]) [[NUW]], !clang.imprecise_release
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]]) [[NUW]], !clang.imprecise_release
// CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
@@ -318,25 +318,25 @@ void test10() {
// CHECK-NEXT: bitcast
// CHECK-NEXT: [[T0:%.*]] = call [[TEST10]]* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST10]]* [[T0]] to i8*
- // CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
+ // CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: [[V:%.*]] = bitcast i8* [[T2]] to [[TEST10]]*
// CHECK-NEXT: load i8*, i8** @OBJC_SELECTOR_REFERENCES_{{[0-9]*}}
// CHECK-NEXT: bitcast
// CHECK-NEXT: [[T0:%.*]] = call [[TEST10]]* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST10]]* [[T0]] to i8*
- // CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
+ // CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[TEST10]]*
// CHECK-NEXT: [[T4:%.*]] = bitcast [[TEST10]]* [[T3]] to i8*
// CHECK-NEXT: store i8* [[T4]], i8** [[Y]]
// CHECK-NEXT: [[T0:%.*]] = bitcast [[TEST10]]* [[V]] to i8*
- // CHECK-NEXT: call void @objc_release(i8* [[T0]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]])
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[Y]]
- // CHECK-NEXT: call void @objc_release(i8* [[T0]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]])
// CHECK-NEXT: [[YPTR2:%.*]] = bitcast i8** [[Y]] to i8*
// CHECK-NEXT: void @llvm.lifetime.end.p0i8(i64 8, i8* [[YPTR2]])
// CHECK-NEXT: [[T0:%.*]] = load [[TEST10]]*, [[TEST10]]** [[X]]
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST10]]* [[T0]] to i8*
- // CHECK-NEXT: call void @objc_release(i8* [[T1]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]])
// CHECK-NEXT: [[XPTR2:%.*]] = bitcast [[TEST10]]** [[X]] to i8*
// CHECK-NEXT: void @llvm.lifetime.end.p0i8(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
@@ -353,7 +353,7 @@ void test11(id (*f)(void) __attribute__((ns_returns_retained))) {
// CHECK-NEXT: [[T1:%.*]] = call i8* [[T0]]()
// CHECK-NEXT: store i8* [[T1]], i8** [[X]], align
// CHECK-NEXT: [[T3:%.*]] = load i8*, i8** [[X]]
- // CHECK-NEXT: call void @objc_release(i8* [[T3]]) [[NUW]], !clang.imprecise_release
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T3]]) [[NUW]], !clang.imprecise_release
// CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
// CHECK-NEXT: void @llvm.lifetime.end.p0i8(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
@@ -371,27 +371,27 @@ void test12(void) {
// CHECK-NEXT: [[XPTR1:%.*]] = bitcast i8** [[X]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[XPTR1]])
// CHECK-NEXT: [[T0:%.*]] = call i8* @test12_helper()
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
- // CHECK-NEXT: call i8* @objc_initWeak(i8** [[X]], i8* [[T1]])
- // CHECK-NEXT: call void @objc_release(i8* [[T1]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
+ // CHECK-NEXT: call i8* @llvm.objc.initWeak(i8** [[X]], i8* [[T1]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]])
x = test12_helper();
// CHECK-NEXT: [[T0:%.*]] = call i8* @test12_helper()
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
- // CHECK-NEXT: call i8* @objc_storeWeak(i8** [[X]], i8* [[T1]])
- // CHECK-NEXT: call void @objc_release(i8* [[T1]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
+ // CHECK-NEXT: call i8* @llvm.objc.storeWeak(i8** [[X]], i8* [[T1]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]])
id y = x;
// CHECK-NEXT: [[YPTR1:%.*]] = bitcast i8** [[Y]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[YPTR1]])
- // CHECK-NEXT: [[T2:%.*]] = call i8* @objc_loadWeakRetained(i8** [[X]])
+ // CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.loadWeakRetained(i8** [[X]])
// CHECK-NEXT: store i8* [[T2]], i8** [[Y]], align
// CHECK-NEXT: [[T4:%.*]] = load i8*, i8** [[Y]]
- // CHECK-NEXT: call void @objc_release(i8* [[T4]]) [[NUW]], !clang.imprecise_release
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T4]]) [[NUW]], !clang.imprecise_release
// CHECK-NEXT: [[YPTR2:%.*]] = bitcast i8** [[Y]] to i8*
// CHECK-NEXT: void @llvm.lifetime.end.p0i8(i64 8, i8* [[YPTR2]])
- // CHECK-NEXT: call void @objc_destroyWeak(i8** [[X]])
+ // CHECK-NEXT: call void @llvm.objc.destroyWeak(i8** [[X]])
// CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
// CHECK-NEXT: void @llvm.lifetime.end.p0i8(i64 8, i8* [[XPTR2]])
// CHECK: ret void
@@ -410,7 +410,7 @@ void test13(void) {
extern fnty *test13_func;
// CHECK-NEXT: [[FN:%.*]] = load void (i8*)*, void (i8*)** @test13_func, align
// CHECK-NEXT: [[X_VAL:%.*]] = load i8*, i8** [[X]], align
- // CHECK-NEXT: [[X_TMP:%.*]] = call i8* @objc_retain(i8* [[X_VAL]]) [[NUW]]
+ // CHECK-NEXT: [[X_TMP:%.*]] = call i8* @llvm.objc.retain(i8* [[X_VAL]]) [[NUW]]
// CHECK-NEXT: call void [[FN]](i8* [[X_TMP]])
test13_func(x);
@@ -420,14 +420,14 @@ void test13(void) {
// CHECK-NEXT: [[BLOCK_FN_PTR:%.*]] = getelementptr inbounds [[BLOCKTY]], [[BLOCKTY]]* [[BLOCK]], i32 0, i32 3
// CHECK-NEXT: [[BLOCK_OPAQUE:%.*]] = bitcast [[BLOCKTY]]* [[BLOCK]] to i8*
// CHECK-NEXT: [[X_VAL:%.*]] = load i8*, i8** [[X]], align
- // CHECK-NEXT: [[X_TMP:%.*]] = call i8* @objc_retain(i8* [[X_VAL]]) [[NUW]]
+ // CHECK-NEXT: [[X_TMP:%.*]] = call i8* @llvm.objc.retain(i8* [[X_VAL]]) [[NUW]]
// CHECK-NEXT: [[BLOCK_FN_TMP:%.*]] = load i8*, i8** [[BLOCK_FN_PTR]]
// CHECK-NEXT: [[BLOCK_FN:%.*]] = bitcast i8* [[BLOCK_FN_TMP]] to void (i8*, i8*)*
// CHECK-NEXT: call void [[BLOCK_FN]](i8* [[BLOCK_OPAQUE]], i8* [[X_TMP]])
test13_block(x);
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[X]]
- // CHECK-NEXT: call void @objc_release(i8* [[T0]]) [[NUW]]
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]]) [[NUW]]
// CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
// CHECK-NEXT: void @llvm.lifetime.end.p0i8(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
@@ -479,14 +479,14 @@ void test13(void) {
// CHECK-NEXT: [[T0:%.*]] = bitcast [[TEST16]]* [[BASE]] to i8*
// CHECK-NEXT: [[T1:%.*]] = getelementptr inbounds i8, i8* [[T0]], i64 [[Y_OFF]]
// CHECK-NEXT: [[T2:%.*]] = bitcast i8* [[T1]] to i8**
- // CHECK-NEXT: call void @objc_storeStrong(i8** [[T2]], i8* null) [[NUW]]
+ // CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[T2]], i8* null) [[NUW]]
// Destroy z.
// CHECK-NEXT: [[Z_OFF:%.*]] = load i64, i64* @"OBJC_IVAR_$_Test16.z"
// CHECK-NEXT: [[T0:%.*]] = bitcast [[TEST16]]* [[BASE]] to i8*
// CHECK-NEXT: [[T1:%.*]] = getelementptr inbounds i8, i8* [[T0]], i64 [[Z_OFF]]
// CHECK-NEXT: [[T2:%.*]] = bitcast i8* [[T1]] to i8**
- // CHECK-NEXT: call void @objc_storeStrong(i8** [[T2]], i8* null) [[NUW]]
+ // CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[T2]], i8* null) [[NUW]]
// CHECK-NEXT: ret void
@@ -514,11 +514,11 @@ void test19() {
x[2] = test19_helper();
// CHECK-NEXT: [[CALL:%.*]] = call i8* @test19_helper()
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[CALL]]) [[NUW]]
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[CALL]]) [[NUW]]
// CHECK-NEXT: [[SLOT:%.*]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[X]], i64 0, i64 2
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[SLOT]]
// CHECK-NEXT: store i8* [[T1]], i8** [[SLOT]]
- // CHECK-NEXT: call void @objc_release(i8* [[T0]]) [[NUW]]
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]]) [[NUW]]
// CHECK-NEXT: [[BEGIN:%.*]] = getelementptr inbounds [5 x i8*], [5 x i8*]* [[X]], i32 0, i32 0
// CHECK-NEXT: [[END:%.*]] = getelementptr inbounds i8*, i8** [[BEGIN]], i64 5
@@ -527,7 +527,7 @@ void test19() {
// CHECK: [[AFTER:%.*]] = phi i8** [ [[END]], {{%.*}} ], [ [[NEXT:%.*]], {{%.*}} ]
// CHECK-NEXT: [[CUR:%.*]] = getelementptr inbounds i8*, i8** [[AFTER]], i64 -1
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[CUR]]
- // CHECK-NEXT: call void @objc_release(i8* [[T0]]) [[NUW]], !clang.imprecise_release
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]]) [[NUW]], !clang.imprecise_release
// CHECK-NEXT: [[EQ:%.*]] = icmp eq i8** [[CUR]], [[BEGIN]]
// CHECK-NEXT: br i1 [[EQ]],
@@ -570,7 +570,7 @@ void test20(unsigned n) {
// CHECK: [[AFTER:%.*]] = phi i8** [ [[END]], {{%.*}} ], [ [[CUR:%.*]], {{%.*}} ]
// CHECK-NEXT: [[CUR:%.*]] = getelementptr inbounds i8*, i8** [[AFTER]], i64 -1
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[CUR]]
- // CHECK-NEXT: call void @objc_release(i8* [[T0]]) [[NUW]], !clang.imprecise_release
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]]) [[NUW]], !clang.imprecise_release
// CHECK-NEXT: [[EQ:%.*]] = icmp eq i8** [[CUR]], [[VLA]]
// CHECK-NEXT: br i1 [[EQ]],
@@ -620,7 +620,7 @@ void test21(unsigned n) {
// CHECK: [[AFTER:%.*]] = phi i8** [ [[END]], {{%.*}} ], [ [[CUR:%.*]], {{%.*}} ]
// CHECK-NEXT: [[CUR:%.*]] = getelementptr inbounds i8*, i8** [[AFTER]], i64 -1
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[CUR]]
- // CHECK-NEXT: call void @objc_release(i8* [[T0]]) [[NUW]], !clang.imprecise_release
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]]) [[NUW]], !clang.imprecise_release
// CHECK-NEXT: [[EQ:%.*]] = icmp eq i8** [[CUR]], [[BEGIN]]
// CHECK-NEXT: br i1 [[EQ]],
@@ -656,7 +656,7 @@ void test21(unsigned n) {
// CHECK-NEXT: br label
// CHECK: [[PAST:%.*]] = phi i8** [ [[END]], {{%.*}} ], [ [[CUR:%.*]], {{%.*}} ]
// CHECK-NEXT: [[CUR]] = getelementptr inbounds i8*, i8** [[PAST]], i64 -1
-// CHECK-NEXT: call void @objc_storeStrong(i8** [[CUR]], i8* null)
+// CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[CUR]], i8* null)
// CHECK-NEXT: [[ISDONE:%.*]] = icmp eq i8** [[CUR]], [[BEGIN]]
// CHECK-NEXT: br i1 [[ISDONE]],
// CHECK: ret void
@@ -674,12 +674,12 @@ void test21(unsigned n) {
// CHECK-NEXT: store i8* {{%.*}}, i8** [[CMD]]
// CHECK-NEXT: [[T0:%.*]] = load [[TEST27]]*, [[TEST27]]** [[SELF]]
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST27]]* [[T0]] to i8*
-// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retain(i8* [[T1]])
+// CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retain(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[TEST27]]*
// CHECK-NEXT: [[RET:%.*]] = bitcast [[TEST27]]* [[T3]] to i8*
// CHECK-NEXT: [[T0:%.*]] = load [[TEST27]]*, [[TEST27]]** [[SELF]]
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST27]]* [[T0]] to i8*
-// CHECK-NEXT: call void @objc_release(i8* [[T1]])
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]])
// CHECK-NEXT: ret i8* [[RET]]
@end
@@ -697,7 +697,7 @@ void test21(unsigned n) {
// CHECK-NEXT: [[T0:%.*]] = bitcast [[TEST28]]* [[SELF]] to i8*
// CHECK-NEXT: [[T1:%.*]] = getelementptr inbounds i8, i8* [[T0]], i64 [[OFFSET]]
// CHECK-NEXT: [[T2:%.*]] = bitcast i8* [[T1]] to i8**
-// CHECK-NEXT: call void @objc_storeStrong(i8** [[T2]], i8* null)
+// CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[T2]], i8* null)
// CHECK-NEXT: ret void
@interface Test29_super
@@ -738,14 +738,14 @@ static id _test29_allocator = 0;
// Return statement.
// CHECK-NEXT: [[T2:%.*]] = bitcast i8* [[CALL]]
// CHECK-NEXT: [[CALL:%.*]] = bitcast
-// CHECK-NEXT: [[T0:%.*]] = call i8* @objc_retain(i8* [[CALL]]) [[NUW]]
+// CHECK-NEXT: [[T0:%.*]] = call i8* @llvm.objc.retain(i8* [[CALL]]) [[NUW]]
// CHECK-NEXT: [[T1:%.*]] = bitcast i8* [[T0]] to [[TEST29]]*
// CHECK-NEXT: [[RET:%.*]] = bitcast [[TEST29]]* [[T1]] to i8*
// Cleanup.
// CHECK-NEXT: [[T0:%.*]] = load [[TEST29]]*, [[TEST29]]** [[SELF]]
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST29]]* [[T0]] to i8*
-// CHECK-NEXT: call void @objc_release(i8* [[T1]]) [[NUW]], !clang.imprecise_release
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]]) [[NUW]], !clang.imprecise_release
// Return.
// CHECK-NEXT: ret i8* [[RET]]
@@ -759,7 +759,7 @@ static id _test29_allocator = 0;
// CHECK-NEXT: alloca
// CHECK-NEXT: store [[TEST29]]* {{%.*}}, [[TEST29]]** [[SELF]]
// CHECK-NEXT: store i8* {{%.*}}, i8** [[CMD]]
-// CHECK-NEXT: [[T0:%.*]] = call i8* @objc_retain(i8* {{%.*}})
+// CHECK-NEXT: [[T0:%.*]] = call i8* @llvm.objc.retain(i8* {{%.*}})
// CHECK-NEXT: store i8* [[T0]], i8** [[ALLOCATOR]]
// Evaluate arguments. Note that the send argument is evaluated
@@ -782,27 +782,27 @@ static id _test29_allocator = 0;
// Assignment.
// CHECK-NEXT: [[T0:%.*]] = bitcast i8* [[CALL]] to [[TEST29]]*
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST29]]* [[T0]] to i8*
-// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retain(i8* [[T1]]) [[NUW]]
+// CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retain(i8* [[T1]]) [[NUW]]
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[TEST29]]*
// CHECK-NEXT: [[T4:%.*]] = load [[TEST29]]*, [[TEST29]]** [[SELF]], align
// CHECK-NEXT: store [[TEST29]]* [[T3]], [[TEST29]]** [[SELF]], align
// CHECK-NEXT: [[T5:%.*]] = bitcast [[TEST29]]* [[T4]] to i8*
-// CHECK-NEXT: call void @objc_release(i8* [[T5]])
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[T5]])
// Return statement.
// CHECK-NEXT: [[T0:%.*]] = load [[TEST29]]*, [[TEST29]]** [[SELF]]
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST29]]* [[T0]] to i8*
-// CHECK-NEXT: [[T0:%.*]] = call i8* @objc_retain(i8* [[T1]]) [[NUW]]
+// CHECK-NEXT: [[T0:%.*]] = call i8* @llvm.objc.retain(i8* [[T1]]) [[NUW]]
// CHECK-NEXT: [[T1:%.*]] = bitcast i8* [[T0]] to [[TEST29]]*
// CHECK-NEXT: [[RET:%.*]] = bitcast [[TEST29]]* [[T1]] to i8*
// Cleanup.
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[ALLOCATOR]]
-// CHECK-NEXT: call void @objc_release(i8* [[T0]]) [[NUW]], !clang.imprecise_release
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]]) [[NUW]], !clang.imprecise_release
// CHECK-NEXT: [[T0:%.*]] = load [[TEST29]]*, [[TEST29]]** [[SELF]]
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST29]]* [[T0]] to i8*
-// CHECK-NEXT: call void @objc_release(i8* [[T1]]) [[NUW]], !clang.imprecise_release
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]]) [[NUW]], !clang.imprecise_release
// Return.
// CHECK-NEXT: ret i8* [[RET]]
@@ -840,21 +840,21 @@ char *helper;
// CHECK-NEXT: [[T3:%.*]] = getelementptr inbounds i8, i8* [[T2]], i64 [[IVAR]]
// CHECK-NEXT: [[T4:%.*]] = bitcast i8* [[T3]] to i8**
// CHECK-NEXT#: [[T5:%.*]] = load i8*, i8** [[T4]]
-// CHECK-NEXT#: [[T6:%.*]] = call i8* @objc_retain(i8* [[T0]])
-// CHECK-NEXT#: call void @objc_release(i8* [[T5]])
+// CHECK-NEXT#: [[T6:%.*]] = call i8* @llvm.objc.retain(i8* [[T0]])
+// CHECK-NEXT#: call void @llvm.objc.release(i8* [[T5]])
// CHECK-NEXT: store i8* [[T0]], i8** [[T4]]
// Return.
// CHECK-NEXT: [[T0:%.*]] = load [[TEST30]]*, [[TEST30]]** [[SELF]]
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST30]]* [[T0]] to i8*
-// CHECK-NEXT: [[T0:%.*]] = call i8* @objc_retain(i8* [[T1]])
+// CHECK-NEXT: [[T0:%.*]] = call i8* @llvm.objc.retain(i8* [[T1]])
// CHECK-NEXT: [[T1:%.*]] = bitcast i8* [[T0]] to [[TEST30]]*
// CHECK-NEXT: [[RET:%.*]] = bitcast [[TEST30]]* [[T1]] to i8*
// Cleanup.
// CHECK-NEXT: [[T0:%.*]] = load [[TEST30]]*, [[TEST30]]** [[SELF]]
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST30]]* [[T0]] to i8*
-// CHECK-NEXT: call void @objc_release(i8* [[T1]])
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]])
// Epilogue.
// CHECK-NEXT: ret i8* [[RET]]
@@ -876,7 +876,7 @@ char *helper;
__attribute__((ns_returns_retained)) id test32(void) {
// CHECK-LABEL: define i8* @test32()
// CHECK: [[CALL:%.*]] = call i8* @test32_helper()
-// CHECK-NEXT: [[T0:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[CALL]])
+// CHECK-NEXT: [[T0:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[CALL]])
// CHECK-NEXT: ret i8* [[T0]]
extern id test32_helper(void);
return test32_helper();
@@ -905,7 +905,7 @@ void test33(Test33 *ptr) {
// CHECK-NEXT: [[TEMP1:%.*]] = alloca [[A_T]]*
// CHECK-NEXT: [[TEMP2:%.*]] = alloca [[A_T]]*
// CHECK-NEXT: bitcast
- // CHECK-NEXT: objc_retain
+ // CHECK-NEXT: llvm.objc.retain
// CHECK-NEXT: bitcast
// CHECK-NEXT: store
// CHECK-NEXT: bitcast
@@ -920,13 +920,13 @@ void test33(Test33 *ptr) {
// CHECK-NEXT: objc_msgSend{{.*}}, [[A_T]]** [[TEMP0]])
// CHECK-NEXT: [[T0:%.*]] = load [[A_T]]*, [[A_T]]** [[TEMP0]]
// CHECK-NEXT: [[T1:%.*]] = bitcast [[A_T]]* [[T0]] to i8*
- // CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retain(i8* [[T1]])
+ // CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retain(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[A_T]]*
// CHECK-NEXT: call void (...) @clang.arc.use([[A_T]]* [[W0]]) [[NUW]]
// CHECK-NEXT: [[T4:%.*]] = load [[A_T]]*, [[A_T]]** [[A]]
// CHECK-NEXT: store [[A_T]]* [[T3]], [[A_T]]** [[A]]
// CHECK-NEXT: [[T5:%.*]] = bitcast [[A_T]]* [[T4]] to i8*
- // CHECK-NEXT: call void @objc_release(i8* [[T5]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T5]])
// CHECK-NEXT: load [[TEST33]]*, [[TEST33]]** [[PTR]]
// CHECK-NEXT: [[W0:%.*]] = load [[A_T]]*, [[A_T]]** [[A]]
@@ -936,13 +936,13 @@ void test33(Test33 *ptr) {
// CHECK-NEXT: objc_msgSend{{.*}}, [[A_T]]** [[TEMP1]])
// CHECK-NEXT: [[T0:%.*]] = load [[A_T]]*, [[A_T]]** [[TEMP1]]
// CHECK-NEXT: [[T1:%.*]] = bitcast [[A_T]]* [[T0]] to i8*
- // CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retain(i8* [[T1]])
+ // CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retain(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[A_T]]*
// CHECK-NEXT: call void (...) @clang.arc.use([[A_T]]* [[W0]]) [[NUW]]
// CHECK-NEXT: [[T4:%.*]] = load [[A_T]]*, [[A_T]]** [[A]]
// CHECK-NEXT: store [[A_T]]* [[T3]], [[A_T]]** [[A]]
// CHECK-NEXT: [[T5:%.*]] = bitcast [[A_T]]* [[T4]] to i8*
- // CHECK-NEXT: call void @objc_release(i8* [[T5]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T5]])
// CHECK-NEXT: load [[TEST33]]*, [[TEST33]]** [[PTR]]
// CHECK-NEXT: load i8*, i8** @OBJC_SELECTOR_REFERENCES_
@@ -962,21 +962,21 @@ void test33(Test33 *ptr) {
// CHECK-NEXT: objc_msgSend{{.*}}, [[A_T]]** [[TEMP2]])
// CHECK-NEXT: [[T0:%.*]] = load [[A_T]]*, [[A_T]]** [[TEMP2]]
// CHECK-NEXT: [[T1:%.*]] = bitcast [[A_T]]* [[T0]] to i8*
- // CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retain(i8* [[T1]])
+ // CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retain(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[A_T]]*
// CHECK-NEXT: [[T4:%.*]] = load [[A_T]]*, [[A_T]]** [[A]]
// CHECK-NEXT: store [[A_T]]* [[T3]], [[A_T]]** [[A]]
// CHECK-NEXT: [[T5:%.*]] = bitcast [[A_T]]* [[T4]] to i8*
- // CHECK-NEXT: call void @objc_release(i8* [[T5]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T5]])
// CHECK-NEXT: load
// CHECK-NEXT: bitcast
- // CHECK-NEXT: objc_release
+ // CHECK-NEXT: llvm.objc.release
// CHECK-NEXT: bitcast
// CHECK-NEXT: call void @llvm.lifetime.end
// CHECK-NEXT: load
// CHECK-NEXT: bitcast
- // CHECK-NEXT: objc_release
+ // CHECK-NEXT: llvm.objc.release
// CHECK-NEXT: ret void
}
@@ -985,21 +985,21 @@ void test33(Test33 *ptr) {
void test36(id x) {
// CHECK: [[X:%.*]] = alloca i8*
- // CHECK: call i8* @objc_retain
- // CHECK: call i8* @objc_retain
- // CHECK: call i8* @objc_retain
+ // CHECK: call i8* @llvm.objc.retain
+ // CHECK: call i8* @llvm.objc.retain
+ // CHECK: call i8* @llvm.objc.retain
id array[3] = { @"A", x, @"y" };
// CHECK: [[T0:%.*]] = load i8*, i8** [[X]]
// CHECK-NEXT: store i8* null, i8** [[X]]
- // CHECK-NEXT: call void @objc_release(i8* [[T0]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]])
x = 0;
// CHECK: br label
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: br i1
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK-NEXT: ret void
}
@@ -1023,17 +1023,17 @@ void test37(void) {
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[TEMP]]
// CHECK-NEXT: [[T1:%.*]] = bitcast i8* [[T0]] to [[TEST37]]*
// CHECK-NEXT: [[T2:%.*]] = bitcast [[TEST37]]* [[T1]] to i8*
- // CHECK-NEXT: [[T3:%.*]] = call i8* @objc_retain(i8* [[T2]])
+ // CHECK-NEXT: [[T3:%.*]] = call i8* @llvm.objc.retain(i8* [[T2]])
// CHECK-NEXT: [[T4:%.*]] = bitcast i8* [[T3]] to [[TEST37]]*
// CHECK-NEXT: call void (...) @clang.arc.use(i8* [[W1]]) [[NUW]]
// CHECK-NEXT: [[T5:%.*]] = load [[TEST37]]*, [[TEST37]]** [[VAR]]
// CHECK-NEXT: store [[TEST37]]* [[T4]], [[TEST37]]** [[VAR]]
// CHECK-NEXT: [[T6:%.*]] = bitcast [[TEST37]]* [[T5]] to i8*
- // CHECK-NEXT: call void @objc_release(i8* [[T6]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T6]])
// CHECK-NEXT: [[T0:%.*]] = load [[TEST37]]*, [[TEST37]]** [[VAR]]
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST37]]* [[T0]] to i8*
- // CHECK-NEXT: call void @objc_release(i8* [[T1]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]])
// CHECK-NEXT: [[VARPTR2:%.*]] = bitcast [[TEST37]]** [[VAR]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[VARPTR2]])
// CHECK-NEXT: ret void
@@ -1045,7 +1045,7 @@ void test37(void) {
extern id test43_produce(void);
return test43_produce();
// CHECK: call i8* @test43_produce()
- // CHECK-NEXT: call i8* @objc_retainAutoreleasedReturnValue(
+ // CHECK-NEXT: call i8* @llvm.objc.retainAutoreleasedReturnValue(
// CHECK-NEXT: ret
}
@end
@@ -1067,21 +1067,21 @@ void test46(__weak id *wp, __weak volatile id *wvp) {
// TODO: this is sub-optimal, we should retain at the actual call site.
// CHECK: [[T0:%.*]] = call i8* @test46_helper()
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: [[T2:%.*]] = load i8**, i8*** {{%.*}}, align 8
- // CHECK-NEXT: [[T3:%.*]] = call i8* @objc_storeWeak(i8** [[T2]], i8* [[T1]])
- // CHECK-NEXT: [[T4:%.*]] = call i8* @objc_retain(i8* [[T3]])
+ // CHECK-NEXT: [[T3:%.*]] = call i8* @llvm.objc.storeWeak(i8** [[T2]], i8* [[T1]])
+ // CHECK-NEXT: [[T4:%.*]] = call i8* @llvm.objc.retain(i8* [[T3]])
// CHECK-NEXT: store i8* [[T4]], i8**
- // CHECK-NEXT: call void @objc_release(i8* [[T1]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]])
id x = *wp = test46_helper();
// CHECK: [[T0:%.*]] = call i8* @test46_helper()
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: [[T2:%.*]] = load i8**, i8*** {{%.*}}, align 8
- // CHECK-NEXT: [[T3:%.*]] = call i8* @objc_storeWeak(i8** [[T2]], i8* [[T1]])
- // CHECK-NEXT: [[T4:%.*]] = call i8* @objc_retain(i8* [[T3]])
+ // CHECK-NEXT: [[T3:%.*]] = call i8* @llvm.objc.storeWeak(i8** [[T2]], i8* [[T1]])
+ // CHECK-NEXT: [[T4:%.*]] = call i8* @llvm.objc.retain(i8* [[T3]])
// CHECK-NEXT: store i8* [[T4]], i8**
- // CHECK-NEXT: call void @objc_release(i8* [[T1]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]])
id y = *wvp = test46_helper();
}
@@ -1096,16 +1096,16 @@ void test47(void) {
// CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[XPTR1]])
// CHECK-NEXT: store i8* null, i8** [[X]]
// CHECK-NEXT: [[CALL:%.*]] = call i8* @test47_helper()
- // CHECK-NEXT: [[T0:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[CALL]])
+ // CHECK-NEXT: [[T0:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[CALL]])
// CHECK-NEXT: [[T1:%.*]] = load i8*, i8** [[X]]
// CHECK-NEXT: store i8* [[T0]], i8** [[X]]
- // CHECK-NEXT: call void @objc_release(i8* [[T1]])
- // CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retain(i8* [[T0]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]])
+ // CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retain(i8* [[T0]])
// CHECK-NEXT: [[T3:%.*]] = load i8*, i8** [[X]]
// CHECK-NEXT: store i8* [[T2]], i8** [[X]]
- // CHECK-NEXT: call void @objc_release(i8* [[T3]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T3]])
// CHECK-NEXT: [[T4:%.*]] = load i8*, i8** [[X]]
- // CHECK-NEXT: call void @objc_release(i8* [[T4]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T4]])
// CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
@@ -1118,13 +1118,13 @@ void test48(void) {
// CHECK: [[X:%.*]] = alloca i8*
// CHECK-NEXT: [[XPTR1:%.*]] = bitcast i8** [[X]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[XPTR1]])
- // CHECK-NEXT: [[T0:%.*]] = call i8* @objc_initWeak(i8** [[X]], i8* null)
+ // CHECK-NEXT: [[T0:%.*]] = call i8* @llvm.objc.initWeak(i8** [[X]], i8* null)
// CHECK-NEXT: [[T1:%.*]] = call i8* @test48_helper()
- // CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
- // CHECK-NEXT: [[T3:%.*]] = call i8* @objc_storeWeak(i8** [[X]], i8* [[T2]])
- // CHECK-NEXT: [[T4:%.*]] = call i8* @objc_storeWeak(i8** [[X]], i8* [[T3]])
- // CHECK-NEXT: call void @objc_release(i8* [[T2]])
- // CHECK-NEXT: call void @objc_destroyWeak(i8** [[X]])
+ // CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T1]])
+ // CHECK-NEXT: [[T3:%.*]] = call i8* @llvm.objc.storeWeak(i8** [[X]], i8* [[T2]])
+ // CHECK-NEXT: [[T4:%.*]] = call i8* @llvm.objc.storeWeak(i8** [[X]], i8* [[T3]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T2]])
+ // CHECK-NEXT: call void @llvm.objc.destroyWeak(i8** [[X]])
// CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
@@ -1139,10 +1139,10 @@ void test49(void) {
// CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[XPTR1]])
// CHECK-NEXT: store i8* null, i8** [[X]]
// CHECK-NEXT: [[CALL:%.*]] = call i8* @test49_helper()
- // CHECK-NEXT: [[T0:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[CALL]])
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_autorelease(i8* [[T0]])
+ // CHECK-NEXT: [[T0:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[CALL]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.autorelease(i8* [[T0]])
// CHECK-NEXT: store i8* [[T2]], i8** [[X]]
- // CHECK-NEXT: [[T3:%.*]] = call i8* @objc_retainAutorelease(i8* [[T1]])
+ // CHECK-NEXT: [[T3:%.*]] = call i8* @llvm.objc.retainAutorelease(i8* [[T1]])
// CHECK-NEXT: store i8* [[T3]], i8** [[X]]
// CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[XPTR2]])
@@ -1153,8 +1153,8 @@ void test49(void) {
id x();
void test50(id y) {
({x();});
-// CHECK: [[T0:%.*]] = call i8* @objc_retain
-// CHECK: call void @objc_release
+// CHECK: [[T0:%.*]] = call i8* @llvm.objc.retain
+// CHECK: call void @llvm.objc.release
}
@@ -1190,7 +1190,7 @@ id test52(void) {
// CHECK-NEXT: [[XPTR2:%.*]] = bitcast i32* [[X]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 4, i8* [[XPTR2]])
// CHECK-NEXT: [[T2:%.*]] = load i8*, i8** [[TMPALLOCA]]
-// CHECK-NEXT: [[T3:%.*]] = tail call i8* @objc_autoreleaseReturnValue(i8* [[T2]])
+// CHECK-NEXT: [[T3:%.*]] = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* [[T2]])
// CHECK-NEXT: ret i8* [[T3]]
}
@@ -1208,20 +1208,20 @@ void test53(void) {
// CHECK-NEXT: [[YPTR1:%.*]] = bitcast i8** [[Y]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[YPTR1]])
// CHECK-NEXT: [[T0:%.*]] = call i8* @test53_helper()
-// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
+// CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: store i8* [[T1]], i8** [[Y]],
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[Y]],
-// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retain(i8* [[T0]])
+// CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retain(i8* [[T0]])
// CHECK-NEXT: store i8* [[T1]], i8** [[TMPALLOCA]]
// CHECK-NEXT: [[T2:%.*]] = load i8*, i8** [[Y]]
-// CHECK-NEXT: call void @objc_release(i8* [[T2]])
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[T2]])
// CHECK-NEXT: [[YPTR2:%.*]] = bitcast i8** [[Y]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[YPTR2]])
// CHECK-NEXT: [[T3:%.*]] = load i8*, i8** [[TMPALLOCA]]
// CHECK-NEXT: store i8* [[T3]], i8** [[X]],
// CHECK-NEXT: load i8*, i8** [[X]],
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[X]]
-// CHECK-NEXT: call void @objc_release(i8* [[T0]])
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]])
// CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
@@ -1233,11 +1233,11 @@ void test54(int first, ...) {
__builtin_va_list arglist;
// CHECK: call void @llvm.va_start
__builtin_va_start(arglist, first);
- // CHECK: call i8* @objc_retain
+ // CHECK: call i8* @llvm.objc.retain
id obj = __builtin_va_arg(arglist, id);
// CHECK: call void @llvm.va_end
__builtin_va_end(arglist);
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: ret void
}
@@ -1261,7 +1261,7 @@ void test54(int first, ...) {
+ (id) make {
extern id test56_helper(void);
// CHECK: [[T0:%.*]] = call i8* @test56_helper()
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: ret i8* [[T1]]
return test56_helper();
}
@@ -1275,7 +1275,7 @@ void test56_test(void) {
// CHECK: [[T0:%.*]] = call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(
// CHECK-NEXT: store i8* [[T0]], i8** [[X]]
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[X]]
- // CHECK-NEXT: call void @objc_release(i8* [[T0]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]])
// CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
@@ -1305,8 +1305,8 @@ void test56_test(void) {
// CHECK-NEXT: [[T2:%.*]] = bitcast [[TEST57]]* [[T0]] to i8*
// CHECK-NEXT: [[T3:%.*]] = getelementptr inbounds i8, i8* [[T2]], i64 [[T1]]
// CHECK-NEXT: [[T4:%.*]] = bitcast i8* [[T3]] to i8**
-// CHECK-NEXT: [[T5:%.*]] = call i8* @objc_loadWeakRetained(i8** [[T4]])
-// CHECK-NEXT: [[T6:%.*]] = tail call i8* @objc_autoreleaseReturnValue(i8* [[T5]])
+// CHECK-NEXT: [[T5:%.*]] = call i8* @llvm.objc.loadWeakRetained(i8** [[T4]])
+// CHECK-NEXT: [[T6:%.*]] = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* [[T5]])
// CHECK-NEXT: ret i8* [[T6]]
// CHECK: define internal i8* @"\01-[Test57 unsafe]"(
@@ -1328,11 +1328,11 @@ void test59(void) {
// CHECK-LABEL: define void @test59()
// CHECK: [[T0:%.*]] = call i8* @test59_getlock()
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: call i32 @objc_sync_enter(i8* [[T1]])
// CHECK-NEXT: call void @test59_body()
// CHECK-NEXT: call i32 @objc_sync_exit(i8* [[T1]])
- // CHECK-NEXT: call void @objc_release(i8* [[T1]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]])
// CHECK-NEXT: ret void
}
@@ -1350,27 +1350,27 @@ void test61(void) {
extern id test61_make(void);
// CHECK-NEXT: [[T0:%.*]] = call i8* @test61_make()
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: [[T2:%.*]] = load i8*, i8** @OBJC_SELECTOR_REFERENCES_
// CHECK-NEXT: [[T3:%.*]] = load i8*, i8** @OBJC_SELECTOR_REFERENCES_
// CHECK-NEXT: [[T4:%.*]] = call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*)*)(i8* [[T1]], i8* [[T3]], i8* [[T2]])
- // CHECK-NEXT: call void @objc_release(i8* [[T1]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]])
[test61_make() performSelector: @selector(test61_void)];
// CHECK-NEXT: [[YPTR1:%.*]] = bitcast i8** [[Y]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[YPTR1]])
// CHECK-NEXT: [[T0:%.*]] = call i8* @test61_make()
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: [[T2:%.*]] = load i8*, i8** @OBJC_SELECTOR_REFERENCES_
// CHECK-NEXT: [[T3:%.*]] = load i8*, i8** @OBJC_SELECTOR_REFERENCES_
// CHECK-NEXT: [[T4:%.*]] = call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*)*)(i8* [[T1]], i8* [[T3]], i8* [[T2]])
- // CHECK-NEXT: [[T5:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T4]])
+ // CHECK-NEXT: [[T5:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T4]])
// CHECK-NEXT: store i8* [[T5]], i8** [[Y]]
- // CHECK-NEXT: call void @objc_release(i8* [[T1]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]])
id y = [test61_make() performSelector: @selector(test61_id)];
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[Y]]
- // CHECK-NEXT: call void @objc_release(i8* [[T0]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]])
// CHECK-NEXT: [[YPTR2:%.*]] = bitcast i8** [[Y]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[YPTR2]])
// CHECK-NEXT: ret void
@@ -1400,7 +1400,7 @@ void test62(void) {
// CHECK-NEXT: store i1 false, i1* [[CLEANUP_REQUIRED]]
// CHECK-NEXT: br i1 [[T1]],
// CHECK: [[T0:%.*]] = call i8* @test62_make()
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: store i8* [[T1]], i8** [[CLEANUP_VALUE]]
// CHECK-NEXT: store i1 true, i1* [[CLEANUP_REQUIRED]]
// CHECK-NEXT: [[T2:%.*]] = icmp ne i8* [[T1]], null
@@ -1409,7 +1409,7 @@ void test62(void) {
// CHECK-NEXT: [[T0:%.*]] = load i1, i1* [[CLEANUP_REQUIRED]]
// CHECK-NEXT: br i1 [[T0]],
// CHECK: [[T0:%.*]] = load i8*, i8** [[CLEANUP_VALUE]]
- // CHECK-NEXT: call void @objc_release(i8* [[T0]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]])
// CHECK-NEXT: br label
// CHECK: br i1 [[COND]]
// CHECK: call void @test62_body()
@@ -1455,20 +1455,20 @@ void test66(void) {
// CHECK-LABEL: define void @test66()
// CHECK: [[T0:%.*]] = call [[TEST66:%.*]]* @test66_receiver()
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST66]]* [[T0]] to i8*
-// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
+// CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[TEST66]]*
// CHECK-NEXT: [[T4:%.*]] = call i8* @test66_arg()
-// CHECK-NEXT: [[T5:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T4]])
+// CHECK-NEXT: [[T5:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T4]])
// CHECK-NEXT: [[T6:%.*]] = load i8*, i8** @OBJC_SELECTOR_REFERENCES
// CHECK-NEXT: [[T7:%.*]] = bitcast [[TEST66]]* [[T3]] to i8*
// CHECK-NEXT: [[SIX:%.*]] = icmp eq i8* [[T7]], null
// CHECK-NEXT: br i1 [[SIX]], label [[NULINIT:%.*]], label [[CALL:%.*]]
// CHECK: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i8*)*)(i8* [[T7]], i8* [[T6]], i8* [[T5]])
// CHECK-NEXT: br label [[CONT:%.*]]
-// CHECK: call void @objc_release(i8* [[T5]]) [[NUW]]
+// CHECK: call void @llvm.objc.release(i8* [[T5]]) [[NUW]]
// CHECK-NEXT: br label [[CONT:%.*]]
// CHECK: [[T8:%.*]] = bitcast [[TEST66]]* [[T3]] to i8*
-// CHECK-NEXT: call void @objc_release(i8* [[T8]])
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[T8]])
// CHECK-NEXT: ret void
// rdar://problem/9953540
@@ -1495,10 +1495,10 @@ void test68(void) {
// CHECK-NEXT: [[CLPTR1:%.*]] = bitcast i8** [[CL]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[CLPTR1]])
// CHECK-NEXT: [[T0:%.*]] = call i8* @test67_helper()
-// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
+// CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: store i8* [[T1]], i8** [[CL]], align 8
// CHECK-NEXT: [[T2:%.*]] = load i8*, i8** [[CL]]
-// CHECK-NEXT: call void @objc_release(i8* [[T2]])
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[T2]])
// CHECK-NEXT: [[CLPTR2:%.*]] = bitcast i8** [[CL]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[CLPTR2]])
// CHECK-NEXT: ret void
@@ -1519,7 +1519,7 @@ void test70(id i) {
// CHECK-LABEL: define void @test70
// CHECK: store i8* null, i8**
// CHECK: store i8* null, i8**
- // CHECK: [[ID:%.*]] = call i8* @objc_retain(i8*
+ // CHECK: [[ID:%.*]] = call i8* @llvm.objc.retain(i8*
// CHECK: store i8* [[ID]], i8**
id x[3] = {
[2] = i
diff --git a/test/CodeGenObjC/autorelease.m b/test/CodeGenObjC/autorelease.m
index ab65f8088d..0677340eae 100644
--- a/test/CodeGenObjC/autorelease.m
+++ b/test/CodeGenObjC/autorelease.m
@@ -25,9 +25,9 @@
}
@end
-// CHECK: call i8* @objc_autoreleasePoolPush
+// CHECK: call i8* @llvm.objc.autoreleasePoolPush
// CHECK: [[T:%.*]] = load i8*, i8** [[A:%.*]]
-// CHECK: call void @objc_autoreleasePoolPop
+// CHECK: call void @llvm.objc.autoreleasePoolPop
// rdar://13660038
int tryTo(int (*f)(void)) {
@@ -41,7 +41,7 @@ int tryTo(int (*f)(void)) {
}
// CHECK-LABEL: define i32 @tryTo(i32 ()*
// CHECK: [[RET:%.*]] = alloca i32,
-// CHECK: [[T0:%.*]] = call i8* @objc_autoreleasePoolPush()
+// CHECK: [[T0:%.*]] = call i8* @llvm.objc.autoreleasePoolPush()
// CHECK-NEXT: [[T1:%.*]] = load i32 ()*, i32 ()** {{%.*}},
// CHECK-NEXT: [[T2:%.*]] = invoke i32 [[T1]]()
// CHECK: store i32 [[T2]], i32* [[RET]]
diff --git a/test/CodeGenObjC/debug-info-block-line.m b/test/CodeGenObjC/debug-info-block-line.m
index d4c409411c..863912e5df 100644
--- a/test/CodeGenObjC/debug-info-block-line.m
+++ b/test/CodeGenObjC/debug-info-block-line.m
@@ -62,16 +62,16 @@ typedef enum : NSUInteger {
TMap *map = [TMap mapForID:mapID];
// Make sure we do not map code generated for the block to the above line.
// CHECK: define internal void @"__39-[TServer serverConnection:getCommand:]_block_invoke"
-// CHECK: call void @objc_storeStrong(i8** [[ZERO:%.*]], i8* [[ONE:%.*]]) [[NUW:#[0-9]+]]
-// CHECK: call void @objc_storeStrong(i8** [[TWO:%.*]], i8* [[THREE:%.*]]) [[NUW]]
+// CHECK: call void @llvm.objc.storeStrong(i8** [[ZERO:%.*]], i8* [[ONE:%.*]]) [[NUW:#[0-9]+]]
+// CHECK: call void @llvm.objc.storeStrong(i8** [[TWO:%.*]], i8* [[THREE:%.*]]) [[NUW]]
// CHECK: call {{.*}}@objc_msgSend{{.*}}, !dbg ![[LINE_ABOVE:[0-9]+]]
// CHECK: getelementptr
// CHECK-NOT: !dbg, ![[LINE_ABOVE]]
// CHECK: bitcast %5** [[TMP:%.*]] to i8**
// CHECK-NOT: !dbg, ![[LINE_ABOVE]]
-// CHECK: call void @objc_storeStrong(i8** [[VAL1:%.*]], i8* null) [[NUW]]
+// CHECK: call void @llvm.objc.storeStrong(i8** [[VAL1:%.*]], i8* null) [[NUW]]
// CHECK-NEXT: bitcast %4** [[TMP:%.*]] to i8**
-// CHECK-NEXT: call void @objc_storeStrong(i8** [[VAL2:%.*]], i8* null) [[NUW]]
+// CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[VAL2:%.*]], i8* null) [[NUW]]
// CHECK-NEXT: ret
// CHECK: attributes [[NUW]] = { nounwind }
[map dataWithCompletionBlock:^(NSData *data, NSError *error) {
diff --git a/test/CodeGenObjC/empty-collection-literals.m b/test/CodeGenObjC/empty-collection-literals.m
index 4b1d7f6ebe..313c8c86c1 100644
--- a/test/CodeGenObjC/empty-collection-literals.m
+++ b/test/CodeGenObjC/empty-collection-literals.m
@@ -17,16 +17,16 @@ void test_empty_array() {
// CHECK-WITHOUT-EMPTY-COLLECTIONS-NOT: ret void
// CHECK-WITHOUT-EMPTY-COLLECTIONS: {{call.*objc_msgSend}}
// CHECK-WITHOUT-EMPTY-COLLECTIONS-NOT: ret void
- // CHECK-WITHOUT-EMPTY-COLLECTIONS: {{call.*objc_retainAutoreleasedReturnValue}}
+ // CHECK-WITHOUT-EMPTY-COLLECTIONS: {{call.*llvm.objc.retainAutoreleasedReturnValue}}
// CHECK-WITHOUT-EMPTY-COLLECTIONS: ret void
// CHECK-WITH-EMPTY-COLLECTIONS-LABEL: define void @test_empty_array
// CHECK-WITH-EMPTY-COLLECTIONS-NOT: ret void
// CHECK-WITH-EMPTY-COLLECTIONS: load {{.*}} @__NSArray0__
// CHECK-WITH-EMPTY-COLLECTIONS-NOT: ret void
- // CHECK-WITH-EMPTY-COLLECTIONS: {{call.*objc_retain\(}}
+ // CHECK-WITH-EMPTY-COLLECTIONS: {{call.*llvm.objc.retain\(}}
// CHECK-WITH-EMPTY-COLLECTIONS-NOT: ret void
- // CHECK-WITH-EMPTY-COLLECTIONS: call void @objc_storeStrong
+ // CHECK-WITH-EMPTY-COLLECTIONS: call void @llvm.objc.storeStrong
// CHECK-WITH-EMPTY-COLLECTIONS-NEXT: ret void
NSArray *arr = @[];
}
@@ -36,16 +36,16 @@ void test_empty_dictionary() {
// CHECK-WITHOUT-EMPTY-COLLECTIONS-NOT: ret void
// CHECK-WITHOUT-EMPTY-COLLECTIONS: {{call.*objc_msgSend}}
// CHECK-WITHOUT-EMPTY-COLLECTIONS-NOT: ret void
- // CHECK-WITHOUT-EMPTY-COLLECTIONS: {{call.*objc_retainAutoreleasedReturnValue}}
+ // CHECK-WITHOUT-EMPTY-COLLECTIONS: {{call.*llvm.objc.retainAutoreleasedReturnValue}}
// CHECK-WITHOUT-EMPTY-COLLECTIONS: ret void
// CHECK-WITH-EMPTY-COLLECTIONS-LABEL: define void @test_empty_dictionary
// CHECK-WITH-EMPTY-COLLECTIONS-NOT: ret void
// CHECK-WITH-EMPTY-COLLECTIONS: load {{.*}} @__NSDictionary0__{{.*}}!invariant.load
// CHECK-WITH-EMPTY-COLLECTIONS-NOT: ret void
- // CHECK-WITH-EMPTY-COLLECTIONS: {{call.*objc_retain\(}}
+ // CHECK-WITH-EMPTY-COLLECTIONS: {{call.*llvm.objc.retain\(}}
// CHECK-WITH-EMPTY-COLLECTIONS-NOT: ret void
- // CHECK-WITH-EMPTY-COLLECTIONS: call void @objc_storeStrong
+ // CHECK-WITH-EMPTY-COLLECTIONS: call void @llvm.objc.storeStrong
// CHECK-WITH-EMPTY-COLLECTIONS-NEXT: ret void
NSDictionary *dict = @{};
}
diff --git a/test/CodeGenObjC/fragile-arc.m b/test/CodeGenObjC/fragile-arc.m
index 98a60133e2..1320a147bb 100644
--- a/test/CodeGenObjC/fragile-arc.m
+++ b/test/CodeGenObjC/fragile-arc.m
@@ -37,7 +37,7 @@
// CHECK-NEXT: [[IVAR:%.*]] = bitcast i8* [[T1]] to [[OPAQUE]]**
// CHECK-NEXT: [[T0:%.*]] = load [[OPAQUE]]*, [[OPAQUE]]** [[IVAR]]
// CHECK-NEXT: [[T1:%.*]] = bitcast [[OPAQUE]]* [[T0]] to i8*
-// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retain(i8* [[T1]])
+// CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retain(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[OPAQUE]]*
// CHECK-NEXT: store [[OPAQUE]]* [[T3]], [[OPAQUE]]** [[X]]
Opaque *x = strong;
@@ -48,10 +48,10 @@
// CHECK-NEXT: [[IVAR:%.*]] = bitcast i8* [[T1]] to [[OPAQUE]]**
// CHECK-NEXT: [[T0:%.*]] = bitcast [[OPAQUE]]** [[IVAR]] to i8**
// CHECK-NEXT: [[T1:%.*]] = bitcast [[OPAQUE]]* [[VALUE]] to i8*
-// CHECK-NEXT: call void @objc_storeStrong(i8** [[T0]], i8* [[T1]])
+// CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[T0]], i8* [[T1]])
strong = x;
// CHECK-NEXT: [[T0:%.*]] = bitcast [[OPAQUE]]** [[X]] to i8**
-// CHECK-NEXT: call void @objc_storeStrong(i8** [[T0]], i8* null)
+// CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[T0]], i8* null)
// CHECK-NEXT: ret void
}
@@ -64,7 +64,7 @@
// CHECK-NEXT: [[T1:%.*]] = getelementptr inbounds i8, i8* [[T0]], i32 8
// CHECK-NEXT: [[IVAR:%.*]] = bitcast i8* [[T1]] to [[OPAQUE]]**
// CHECK-NEXT: [[T0:%.*]] = bitcast [[OPAQUE]]** [[IVAR]] to i8**
-// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_loadWeakRetained(i8** [[T0]])
+// CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.loadWeakRetained(i8** [[T0]])
// CHECK-NEXT: [[T2:%.*]] = bitcast i8* [[T1]] to [[OPAQUE]]*
// CHECK-NEXT: store [[OPAQUE]]* [[T2]], [[OPAQUE]]** [[X]]
Opaque *x = weak;
@@ -75,10 +75,10 @@
// CHECK-NEXT: [[IVAR:%.*]] = bitcast i8* [[T1]] to [[OPAQUE]]**
// CHECK-NEXT: [[T0:%.*]] = bitcast [[OPAQUE]]** [[IVAR]] to i8**
// CHECK-NEXT: [[T1:%.*]] = bitcast [[OPAQUE]]* [[VALUE]] to i8*
-// CHECK-NEXT: call i8* @objc_storeWeak(i8** [[T0]], i8* [[T1]])
+// CHECK-NEXT: call i8* @llvm.objc.storeWeak(i8** [[T0]], i8* [[T1]])
weak = x;
// CHECK-NEXT: [[T0:%.*]] = bitcast [[OPAQUE]]** [[X]] to i8**
-// CHECK-NEXT: call void @objc_storeStrong(i8** [[T0]], i8* null)
+// CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[T0]], i8* null)
// CHECK-NEXT: ret void
}
@@ -89,12 +89,12 @@
// CHECK-NEXT: [[T1:%.*]] = getelementptr inbounds i8, i8* [[T0]], i32 8
// CHECK-NEXT: [[IVAR:%.*]] = bitcast i8* [[T1]] to [[OPAQUE]]**
// CHECK-NEXT: [[T0:%.*]] = bitcast [[OPAQUE]]** [[IVAR]] to i8**
-// CHECK-NEXT: call void @objc_destroyWeak(i8** [[T0]])
+// CHECK-NEXT: call void @llvm.objc.destroyWeak(i8** [[T0]])
// CHECK-NEXT: [[T0:%.*]] = bitcast [[A]]* [[SELF]] to i8*
// CHECK-NEXT: [[T1:%.*]] = getelementptr inbounds i8, i8* [[T0]], i32 4
// CHECK-NEXT: [[IVAR:%.*]] = bitcast i8* [[T1]] to [[OPAQUE]]**
// CHECK-NEXT: [[T0:%.*]] = bitcast [[OPAQUE]]** [[IVAR]] to i8**
-// CHECK-NEXT: call void @objc_storeStrong(i8** [[T0]], i8* null)
+// CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[T0]], i8* null)
// CHECK-NEXT: ret void
@end
@@ -151,17 +151,17 @@ void testBlockLayoutWeak(__weak id x) {
// CHECK: br i1
// CHECK: [[T0:%.*]] = bitcast i8* [[EXN]] to [[A]]*
// CHECK: [[T1:%.*]] = bitcast [[A]]* [[T0]] to i8*
-// CHECK: [[T2:%.*]] = call i8* @objc_retain(i8* [[T1]])
+// CHECK: [[T2:%.*]] = call i8* @llvm.objc.retain(i8* [[T1]])
// CHECK: [[T3:%.*]] = bitcast i8* [[T2]] to [[A]]*
// CHECK: store [[A]]* [[T3]], [[A]]** [[X]]
// CHECK: call void @checkpoint(i32 1)
// CHECK: [[T0:%.*]] = bitcast [[A]]** [[X]] to i8**
-// CHECK: call void @objc_storeStrong(i8** [[T0]], i8* null)
+// CHECK: call void @llvm.objc.storeStrong(i8** [[T0]], i8* null)
// CHECK: br label
-// CHECK: [[T0:%.*]] = call i8* @objc_retain(i8* [[EXN]])
+// CHECK: [[T0:%.*]] = call i8* @llvm.objc.retain(i8* [[EXN]])
// CHECK: store i8* [[T0]], i8** [[Y]]
// CHECK: call void @checkpoint(i32 2)
-// CHECK: call void @objc_storeStrong(i8** [[Y]], i8* null)
+// CHECK: call void @llvm.objc.storeStrong(i8** [[Y]], i8* null)
extern void checkpoint(int n);
void testCatch() {
@try {
diff --git a/test/CodeGenObjC/mrc-weak.m b/test/CodeGenObjC/mrc-weak.m
index f77b945617..3a8cd2fd75 100644
--- a/test/CodeGenObjC/mrc-weak.m
+++ b/test/CodeGenObjC/mrc-weak.m
@@ -46,15 +46,15 @@
@implementation Foo
// CHECK-LABEL: define internal void @"\01-[Foo .cxx_destruct]"
-// CHECK: call void @objc_destroyWeak
+// CHECK: call void @llvm.objc.destroyWeak
@end
void test1(__weak id x) {}
// CHECK-LABEL: define void @test1
// CHECK: [[X:%.*]] = alloca i8*,
-// CHECK-NEXT: objc_initWeak
-// CHECK-NEXT: objc_destroyWeak
+// CHECK-NEXT: @llvm.objc.initWeak
+// CHECK-NEXT: @llvm.objc.destroyWeak
// CHECK-NEXT: ret void
void test2(id y) {
@@ -65,8 +65,8 @@ void test2(id y) {
// CHECK-NEXT: [[Z:%.*]] = alloca i8*,
// CHECK-NEXT: store
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[Y]]
-// CHECK-NEXT: call i8* @objc_initWeak(i8** [[Z]], i8* [[T0]])
-// CHECK-NEXT: call void @objc_destroyWeak(i8** [[Z]])
+// CHECK-NEXT: call i8* @llvm.objc.initWeak(i8** [[Z]], i8* [[T0]])
+// CHECK-NEXT: call void @llvm.objc.destroyWeak(i8** [[Z]])
// CHECK-NEXT: ret void
void test3(id y) {
@@ -79,8 +79,8 @@ void test3(id y) {
// CHECK-NEXT: store
// CHECK-NEXT: store i8* null, i8** [[Z]]
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[Y]]
-// CHECK-NEXT: call i8* @objc_storeWeak(i8** [[Z]], i8* [[T0]])
-// CHECK-NEXT: call void @objc_destroyWeak(i8** [[Z]])
+// CHECK-NEXT: call i8* @llvm.objc.storeWeak(i8** [[Z]], i8* [[T0]])
+// CHECK-NEXT: call void @llvm.objc.destroyWeak(i8** [[Z]])
// CHECK-NEXT: ret void
void test4(__weak id *p) {
@@ -91,7 +91,7 @@ void test4(__weak id *p) {
// CHECK-NEXT: [[Y:%.*]] = alloca i8*,
// CHECK-NEXT: store
// CHECK-NEXT: [[T0:%.*]] = load i8**, i8*** [[P]]
-// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_loadWeak(i8** [[T0]])
+// CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.loadWeak(i8** [[T0]])
// CHECK-NEXT: store i8* [[T1]], i8** [[Y]]
// CHECK-NEXT: ret void
@@ -103,7 +103,7 @@ void test5(__weak id *p) {
// CHECK-NEXT: [[Y:%.*]] = alloca i8*,
// CHECK-NEXT: store
// CHECK-NEXT: [[T0:%.*]] = load i8**, i8*** [[P]]
-// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_loadWeakRetained(i8** [[T0]])
+// CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.loadWeakRetained(i8** [[T0]])
// CHECK-NEXT: store i8* [[T1]], i8** [[Y]]
// CHECK-NEXT: ret void
@@ -116,7 +116,7 @@ void test6(__weak Foo **p) {
// CHECK-NEXT: store
// CHECK-NEXT: [[T0:%.*]] = load [[FOO]]**, [[FOO]]*** [[P]]
// CHECK-NEXT: [[T1:%.*]] = bitcast [[FOO]]** [[T0]] to i8**
-// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_loadWeakRetained(i8** [[T1]])
+// CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.loadWeakRetained(i8** [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[FOO]]*
// CHECK-NEXT: store [[FOO]]* [[T3]], [[FOO]]** [[Y]]
// CHECK-NEXT: ret void
@@ -134,32 +134,32 @@ void test7(void) {
// CHECK-NEXT: [[T1:%.*]] = bitcast i8* [[T0]] to [[FOO]]*
// CHECK-NEXT: [[T2:%.*]] = bitcast [[FOO]]** [[P]] to i8**
// CHECK-NEXT: [[T3:%.*]] = bitcast [[FOO]]* [[T1]] to i8*
-// CHECK-NEXT: call i8* @objc_initWeak(i8** [[T2]], i8* [[T3]])
-// CHECK: call void @objc_copyWeak
+// CHECK-NEXT: call i8* @llvm.objc.initWeak(i8** [[T2]], i8* [[T3]])
+// CHECK: call void @llvm.objc.copyWeak
// CHECK: call void @use_block
-// CHECK: call void @objc_destroyWeak
+// CHECK: call void @llvm.objc.destroyWeak
// CHECK-LABEL: define linkonce_odr hidden void @__copy_helper_block
-// CHECK: @objc_copyWeak
+// CHECK: @llvm.objc.copyWeak
// CHECK-LABEL: define linkonce_odr hidden void @__destroy_helper_block
-// CHECK: @objc_destroyWeak
+// CHECK: @llvm.objc.destroyWeak
void test8(void) {
__block __weak Foo *p = get_object();
use_block(^{ [p run ]; });
}
// CHECK-LABEL: define void @test8
-// CHECK: call i8* @objc_initWeak
-// CHECK-NOT: call void @objc_copyWeak
+// CHECK: call i8* @llvm.objc.initWeak
+// CHECK-NOT: call void @llvm.objc.copyWeak
// CHECK: call void @use_block
-// CHECK: call void @objc_destroyWeak
+// CHECK: call void @llvm.objc.destroyWeak
// CHECK-LABEL: define internal void @__Block_byref_object_copy
-// CHECK: call void @objc_moveWeak
+// CHECK: call void @llvm.objc.moveWeak
// CHECK-LABEL: define internal void @__Block_byref_object_dispose
-// CHECK: call void @objc_destroyWeak
+// CHECK: call void @llvm.objc.destroyWeak
// CHECK-LABEL: define void @test9_baseline()
// CHECK: define linkonce_odr hidden void @__copy_helper
diff --git a/test/CodeGenObjC/noescape.m b/test/CodeGenObjC/noescape.m
index c7624f24fb..0c4f3ddddf 100644
--- a/test/CodeGenObjC/noescape.m
+++ b/test/CodeGenObjC/noescape.m
@@ -94,7 +94,7 @@ void test5(BlockTy2 b, int *p) {
// CHECK: %[[BLOCK:.*]] = alloca <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>, align 8
// CHECK-NOARC: store i8* %[[B]], i8** %[[B_ADDR]], align 8
// CHECK-ARC: store i8* null, i8** %[[B_ADDR]], align 8
-// CHECK-ARC: call void @objc_storeStrong(i8** %[[B_ADDR]], i8* %[[B]])
+// CHECK-ARC: call void @llvm.objc.storeStrong(i8** %[[B_ADDR]], i8* %[[B]])
// CHECK-ARC: %[[V0:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>, <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>* %[[BLOCK]], i32 0, i32 5
// CHECK: %[[BLOCK_ISA:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>, <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>* %[[BLOCK]], i32 0, i32 0
// CHECK: store i8* bitcast (i8** @_NSConcreteGlobalBlock to i8*), i8** %[[BLOCK_ISA]], align 8
@@ -106,11 +106,11 @@ void test5(BlockTy2 b, int *p) {
// CHECK-NOARC: %[[V1:.*]] = load i8*, i8** %[[B_ADDR]], align 8
// CHECK-NOARC: store i8* %[[V1]], i8** %[[BLOCK_CAPTURED]], align 8
// CHECK-ARC: %[[V2:.*]] = load i8*, i8** %[[B_ADDR]], align 8
-// CHECK-ARC: %[[V3:.*]] = call i8* @objc_retain(i8* %[[V2]])
+// CHECK-ARC: %[[V3:.*]] = call i8* @llvm.objc.retain(i8* %[[V2]])
// CHECK-ARC: store i8* %[[V3]], i8** %[[BLOCK_CAPTURED]], align 8
// CHECK: call void @noescapeFunc0(
-// CHECK-ARC: call void @objc_storeStrong(i8** %[[V0]], i8* null)
-// CHECK-ARC: call void @objc_storeStrong(i8** %[[B_ADDR]], i8* null)
+// CHECK-ARC: call void @llvm.objc.storeStrong(i8** %[[V0]], i8* null)
+// CHECK-ARC: call void @llvm.objc.storeStrong(i8** %[[B_ADDR]], i8* null)
// Non-escaping blocks don't need copy/dispose helper functions.
diff --git a/test/CodeGenObjC/ns_consume_null_check.m b/test/CodeGenObjC/ns_consume_null_check.m
index 777659f268..292dfeedb9 100644
--- a/test/CodeGenObjC/ns_consume_null_check.m
+++ b/test/CodeGenObjC/ns_consume_null_check.m
@@ -17,7 +17,7 @@ void test0(void) {
[x isEqual : obj];
}
// CHECK-LABEL: define void @test0()
-// CHECK: [[FIVE:%.*]] = call i8* @objc_retain
+// CHECK: [[FIVE:%.*]] = call i8* @llvm.objc.retain
// CHECK-NEXT: [[SIX:%.*]] = bitcast
// CHECK-NEXT: [[SEVEN:%.*]] = icmp eq i8* [[SIX]], null
// CHECK-NEXT: br i1 [[SEVEN]], label [[NULLINIT:%.*]], label [[CALL_LABEL:%.*]]
@@ -25,7 +25,7 @@ void test0(void) {
// CHECK-NEXT: [[EIGHT:%.*]] = bitcast i8* [[FN]]
// CHECK-NEXT: [[CALL:%.*]] = call signext i8 [[EIGHT]]
// CHECK-NEXT: br label [[CONT:%.*]]
-// CHECK: call void @objc_release(i8* [[FIVE]]) [[NUW:#[0-9]+]]
+// CHECK: call void @llvm.objc.release(i8* [[FIVE]]) [[NUW:#[0-9]+]]
// CHECK-NEXT: br label [[CONT]]
// CHECK: phi i8 [ [[CALL]], {{%.*}} ], [ 0, {{%.*}} ]
@@ -44,11 +44,11 @@ void test1(void) {
// CHECK: [[T0:%.*]] = call i8* bitcast (
// CHECK-NEXT: store i8* [[T0]], i8** [[OBJ]]
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[OBJ]]
-// CHECK-NEXT: call i8* @objc_initWeak(i8** [[WEAKOBJ]], i8* [[T0]]) [[NUW]]
+// CHECK-NEXT: call i8* @llvm.objc.initWeak(i8** [[WEAKOBJ]], i8* [[T0]]) [[NUW]]
// Okay, start the message-send.
// CHECK-NEXT: [[T0:%.*]] = load [[MYOBJECT:%.*]]*, [[MYOBJECT:%.*]]** @x
// CHECK-NEXT: [[ARG:%.*]] = load i8*, i8** [[OBJ]]
-// CHECK-NEXT: [[ARG_RETAINED:%.*]] = call i8* @objc_retain(i8* [[ARG]])
+// CHECK-NEXT: [[ARG_RETAINED:%.*]] = call i8* @llvm.objc.retain(i8* [[ARG]])
// CHECK-NEXT: load i8*, i8** @
// CHECK-NEXT: [[SELF:%.*]] = bitcast [[MYOBJECT]]* [[T0]] to i8*
// Null check.
@@ -65,7 +65,7 @@ void test1(void) {
// CHECK-NEXT: [[IMAGCALL:%.*]] = load float, float* [[T0]]
// CHECK-NEXT: br label [[CONT:%.*]]{{$}}
// Null path.
-// CHECK: call void @objc_release(i8* [[ARG_RETAINED]]) [[NUW]]
+// CHECK: call void @llvm.objc.release(i8* [[ARG_RETAINED]]) [[NUW]]
// CHECK-NEXT: br label [[CONT]]
// Join point.
// CHECK: [[REAL:%.*]] = phi float [ [[REALCALL]], [[INVOKE_CONT]] ], [ 0.000000e+00, [[FORNULL]] ]
@@ -75,11 +75,11 @@ void test1(void) {
// CHECK-NEXT: store float [[REAL]], float* [[T0]]
// CHECK-NEXT: store float [[IMAG]], float* [[T1]]
// Epilogue.
-// CHECK-NEXT: call void @objc_destroyWeak(i8** [[WEAKOBJ]]) [[NUW]]
-// CHECK-NEXT: call void @objc_storeStrong(i8** [[OBJ]], i8* null) [[NUW]]
+// CHECK-NEXT: call void @llvm.objc.destroyWeak(i8** [[WEAKOBJ]]) [[NUW]]
+// CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[OBJ]], i8* null) [[NUW]]
// CHECK-NEXT: ret void
// Cleanup.
// CHECK: landingpad
-// CHECK: call void @objc_destroyWeak(i8** [[WEAKOBJ]]) [[NUW]]
+// CHECK: call void @llvm.objc.destroyWeak(i8** [[WEAKOBJ]]) [[NUW]]
// CHECK: attributes [[NUW]] = { nounwind }
diff --git a/test/CodeGenObjC/nsvalue-objc-boxable-ios-arc.m b/test/CodeGenObjC/nsvalue-objc-boxable-ios-arc.m
index bab6e27bb3..4ca5adf1ca 100644
--- a/test/CodeGenObjC/nsvalue-objc-boxable-ios-arc.m
+++ b/test/CodeGenObjC/nsvalue-objc-boxable-ios-arc.m
@@ -25,9 +25,9 @@ void doRange() {
// CHECK: [[RECV:%.*]] = bitcast %struct._class_t* [[RECV_PTR]] to i8*
NSRange ns_range = { .location = 0, .length = 42 };
// CHECK: call {{.*objc_msgSend.*}}(i8* [[RECV]], i8* [[SEL]], i8* [[PARAM_CAST]], i8* {{.*}}[[RANGE_STR]]{{.*}})
- // CHECK: call i8* @objc_retainAutoreleasedReturnValue
+ // CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
NSValue *range = @(ns_range);
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: ret void
}
@@ -44,9 +44,9 @@ void doPoint() {
// CHECK: [[RECV:%.*]] = bitcast %struct._class_t* [[RECV_PTR]] to i8*
CGPoint cg_point = { .x = 42, .y = 24 };
// CHECK: call {{.*objc_msgSend.*}}(i8* [[RECV]], i8* [[SEL]], i8* [[PARAM_CAST]], i8* {{.*}}[[POINT_STR]]{{.*}})
- // CHECK: call i8* @objc_retainAutoreleasedReturnValue
+ // CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
NSValue *point = @(cg_point);
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: ret void
}
@@ -63,9 +63,9 @@ void doSize() {
// CHECK: [[RECV:%.*]] = bitcast %struct._class_t* [[RECV_PTR]] to i8*
CGSize cg_size = { .width = 42, .height = 24 };
// CHECK: call {{.*objc_msgSend.*}}(i8* [[RECV]], i8* [[SEL]], i8* [[PARAM_CAST]], i8* {{.*}}[[SIZE_STR]]{{.*}})
- // CHECK: call i8* @objc_retainAutoreleasedReturnValue
+ // CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
NSValue *size = @(cg_size);
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: ret void
}
@@ -84,9 +84,9 @@ void doRect() {
CGSize cg_size = { .width = 42, .height = 24 };
CGRect cg_rect = { .origin = cg_point, .size = cg_size };
// CHECK: call {{.*objc_msgSend.*}}(i8* [[RECV]], i8* [[SEL]], i8* [[PARAM_CAST]], i8*{{.*}}[[RECT_STR]]{{.*}})
- // CHECK: call i8* @objc_retainAutoreleasedReturnValue
+ // CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
NSValue *rect = @(cg_rect);
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: ret void
}
@@ -103,9 +103,9 @@ void doNSEdgeInsets() {
// CHECK: [[RECV:%.*]] = bitcast %struct._class_t* [[RECV_PTR]] to i8*
NSEdgeInsets ns_edge_insets;
// CHECK: call {{.*objc_msgSend.*}}(i8* [[RECV]], i8* [[SEL]], i8* [[PARAM_CAST]], i8*{{.*}}[[EDGE_STR]]{{.*}})
- // CHECK: call i8* @objc_retainAutoreleasedReturnValue
+ // CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
NSValue *edge_insets = @(ns_edge_insets);
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: ret void
}
@@ -118,9 +118,9 @@ void doRangeRValue() {
// CHECK: [[SEL:%.*]] = load i8*, i8** [[VALUE_SEL]]
// CHECK: [[RECV:%.*]] = bitcast %struct._class_t* [[RECV_PTR]] to i8*
// CHECK: call {{.*objc_msgSend.*}}(i8* [[RECV]], i8* [[SEL]], i8* [[COERCE_CAST]], i8* {{.*}}[[RANGE_STR]]{{.*}})
- // CHECK: call i8* @objc_retainAutoreleasedReturnValue
+ // CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
NSValue *range_rvalue = @(getRange());
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: ret void
}
diff --git a/test/CodeGenObjC/nsvalue-objc-boxable-mac-arc.m b/test/CodeGenObjC/nsvalue-objc-boxable-mac-arc.m
index a2b4dfd6d9..041f03873b 100644
--- a/test/CodeGenObjC/nsvalue-objc-boxable-mac-arc.m
+++ b/test/CodeGenObjC/nsvalue-objc-boxable-mac-arc.m
@@ -25,9 +25,9 @@ void doRange() {
// CHECK: [[RECV:%.*]] = bitcast %struct._class_t* [[RECV_PTR]] to i8*
NSRange ns_range = { .location = 0, .length = 42 };
// CHECK: call {{.*objc_msgSend.*}}(i8* [[RECV]], i8* [[SEL]], i8* [[PARAM_CAST]], i8* {{.*}}[[RANGE_STR]]{{.*}})
- // CHECK: call i8* @objc_retainAutoreleasedReturnValue
+ // CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
NSValue *range = @(ns_range);
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: ret void
}
@@ -44,9 +44,9 @@ void doPoint() {
// CHECK: [[RECV:%.*]] = bitcast %struct._class_t* [[RECV_PTR]] to i8*
NSPoint ns_point = { .x = 42, .y = 24 };
// CHECK: call {{.*objc_msgSend.*}}(i8* [[RECV]], i8* [[SEL]], i8* [[PARAM_CAST]], i8* {{.*}}[[POINT_STR]]{{.*}})
- // CHECK: call i8* @objc_retainAutoreleasedReturnValue
+ // CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
NSValue *point = @(ns_point);
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: ret void
}
@@ -63,9 +63,9 @@ void doSize() {
// CHECK: [[RECV:%.*]] = bitcast %struct._class_t* [[RECV_PTR]] to i8*
NSSize ns_size = { .width = 42, .height = 24 };
// CHECK: call {{.*objc_msgSend.*}}(i8* [[RECV]], i8* [[SEL]], i8* [[PARAM_CAST]], i8* {{.*}}[[SIZE_STR]]{{.*}})
- // CHECK: call i8* @objc_retainAutoreleasedReturnValue
+ // CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
NSValue *size = @(ns_size);
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: ret void
}
@@ -84,9 +84,9 @@ void doRect() {
NSSize ns_size = { .width = 42, .height = 24 };
NSRect ns_rect = { .origin = ns_point, .size = ns_size };
// CHECK: call {{.*objc_msgSend.*}}(i8* [[RECV]], i8* [[SEL]], i8* [[PARAM_CAST]], i8*{{.*}}[[RECT_STR]]{{.*}})
- // CHECK: call i8* @objc_retainAutoreleasedReturnValue
+ // CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
NSValue *rect = @(ns_rect);
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: ret void
}
@@ -103,9 +103,9 @@ void doNSEdgeInsets() {
// CHECK: [[RECV:%.*]] = bitcast %struct._class_t* [[RECV_PTR]] to i8*
NSEdgeInsets ns_edge_insets;
// CHECK: call {{.*objc_msgSend.*}}(i8* [[RECV]], i8* [[SEL]], i8* [[PARAM_CAST]], i8*{{.*}}[[EDGE_STR]]{{.*}})
- // CHECK: call i8* @objc_retainAutoreleasedReturnValue
+ // CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
NSValue *edge_insets = @(ns_edge_insets);
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: ret void
}
@@ -122,9 +122,9 @@ void doRangeRValue() {
// CHECK: [[SEL:%.*]] = load i8*, i8** [[VALUE_SEL]]
// CHECK: [[RECV:%.*]] = bitcast %struct._class_t* [[RECV_PTR]] to i8*
// CHECK: call {{.*objc_msgSend.*}}(i8* [[RECV]], i8* [[SEL]], i8* [[COERCE_CAST]], i8* {{.*}}[[RANGE_STR]]{{.*}})
- // CHECK: call i8* @objc_retainAutoreleasedReturnValue
+ // CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
NSValue *range_rvalue = @(getRange());
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: ret void
}
diff --git a/test/CodeGenObjC/objc-arc-container-subscripting.m b/test/CodeGenObjC/objc-arc-container-subscripting.m
index 182456221c..339415e3c0 100644
--- a/test/CodeGenObjC/objc-arc-container-subscripting.m
+++ b/test/CodeGenObjC/objc-arc-container-subscripting.m
@@ -12,10 +12,10 @@ id func() {
}
// CHECK: [[call:%.*]] = call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
-// CHECK: [[SIX:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[call]]) [[NUW:#[0-9]+]]
+// CHECK: [[SIX:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[call]]) [[NUW:#[0-9]+]]
// CHECK: [[ARRAY_CASTED:%.*]] = bitcast %0** {{%.*}} to i8**
-// CHECK: call void @objc_storeStrong(i8** [[ARRAY_CASTED]], i8* null)
-// CHECK: [[EIGHT:%.*]] = tail call i8* @objc_autoreleaseReturnValue(i8* [[SIX]]) [[NUW]]
+// CHECK: call void @llvm.objc.storeStrong(i8** [[ARRAY_CASTED]], i8* null)
+// CHECK: [[EIGHT:%.*]] = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* [[SIX]]) [[NUW]]
// CHECK: ret i8* [[EIGHT]]
// CHECK: attributes [[NUW]] = { nounwind }
diff --git a/test/CodeGenObjC/os_log.m b/test/CodeGenObjC/os_log.m
index 1cf0c9f1f3..34b62c7c33 100644
--- a/test/CodeGenObjC/os_log.m
+++ b/test/CodeGenObjC/os_log.m
@@ -21,7 +21,7 @@ void *test_builtin_os_log(void *buf) {
// CHECK: %[[CALL:.*]] = tail call %[[TY0:.*]]* (...) @GenString()
// CHECK: %[[V0:.*]] = bitcast %[[TY0]]* %[[CALL]] to i8*
- // CHECK: %[[V1:.*]] = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %[[V0]])
+ // CHECK: %[[V1:.*]] = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %[[V0]])
// CHECK: %[[V2:.*]] = ptrtoint %[[TY0]]* %[[CALL]] to i64
// CHECK: store i8 2, i8* %[[BUF]], align 1
// CHECK: %[[NUMARGS_I:.*]] = getelementptr i8, i8* %[[BUF]], i64 1
@@ -34,7 +34,7 @@ void *test_builtin_os_log(void *buf) {
// CHECK: %[[ARGDATACAST_I:.*]] = bitcast i8* %[[ARGDATA_I]] to i64*
// CHECK: store i64 %[[V2]], i64* %[[ARGDATACAST_I]], align 1
// CHECK: tail call void (...) @clang.arc.use(%[[TY0]]* %[[CALL]])
- // CHECK: tail call void @objc_release(i8* %[[V0]])
+ // CHECK: tail call void @llvm.objc.release(i8* %[[V0]])
// CHECK: ret i8* %[[BUF]]
// clang.arc.use is used and removed in IR optimizations. At O0, we should not
@@ -45,13 +45,13 @@ void *test_builtin_os_log(void *buf) {
// CHECK-O0: %[[V0:.*]] = load i8*, i8** %[[BUF_ADDR]], align 8
// CHECK-O0: %[[CALL:.*]] = call %[[TY0:.*]]* (...) @GenString()
// CHECK-O0: %[[V1:.*]] = bitcast %[[TY0]]* %[[CALL]] to i8*
- // CHECK-O0: %[[V2:.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* %[[V1]])
+ // CHECK-O0: %[[V2:.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %[[V1]])
// CHECK-O0: %[[V3:.*]] = bitcast i8* %[[V2]] to %[[TY0]]*
// CHECK-O0: %[[V4:.*]] = ptrtoint %[[TY0]]* %[[V3]] to i64
// CHECK-O0: call void @__os_log_helper_1_2_1_8_64(i8* %[[V0]], i64 %[[V4]])
// CHECK-O0: %[[V5:.*]] = bitcast %[[TY0]]* %[[V3]] to i8*
// CHECK-O0-NOT call void (...) @clang.arc.use({{.*}}
- // CHECK-O0: call void @objc_release(i8* %[[V5]])
+ // CHECK-O0: call void @llvm.objc.release(i8* %[[V5]])
// CHECK-O0: ret i8* %[[V0]]
}
diff --git a/test/CodeGenObjC/parameterized_classes.m b/test/CodeGenObjC/parameterized_classes.m
index 34aca35af3..c2ddb5b551 100644
--- a/test/CodeGenObjC/parameterized_classes.m
+++ b/test/CodeGenObjC/parameterized_classes.m
@@ -61,11 +61,11 @@ void printMe(NSString *name) { }
// CHECK-LABEL: define void @blockTest
void blockTest(NSMutableArray<void (^)(void)> *array, NSString *name) {
// CHECK-NOT: ret void
- // CHECK: call i8* @objc_retainBlock
+ // CHECK: call i8* @llvm.objc.retainBlock
[array addObject: ^ { printMe(name); }];
// CHECK-NOT: ret void
array[0] = ^ { printMe(name); };
- // CHECK: call i8* @objc_retainBlock
+ // CHECK: call i8* @llvm.objc.retainBlock
// CHECK: ret void
}
@@ -80,7 +80,7 @@ void blockTest(NSMutableArray<void (^)(void)> *array, NSString *name) {
// CHECK: %[[V5:.*]] = bitcast i8* %[[ADDPTR]] to %[[IVARTY]]**
// CHECK: %[[V6:.*]] = bitcast %[[IVARTY]]** %[[V5]] to i8**
// CHECK: %[[V7:.*]] = bitcast %[[IVARTY]]* %[[V2]] to i8*
-// CHECK: call void @objc_storeStrong(i8** %[[V6]], i8* %[[V7]])
+// CHECK: call void @llvm.objc.storeStrong(i8** %[[V6]], i8* %[[V7]])
@interface Base<DestType> : NSObject {
DestType _destination;
diff --git a/test/CodeGenObjC/stret-lifetime.m b/test/CodeGenObjC/stret-lifetime.m
index d81ef34aee..837014d4e6 100644
--- a/test/CodeGenObjC/stret-lifetime.m
+++ b/test/CodeGenObjC/stret-lifetime.m
@@ -27,7 +27,7 @@ void foo(id o, id p) {
// CHECK: @llvm.lifetime.end
// ARC: br label
- // ARC: call void @objc_release
+ // ARC: call void @llvm.objc.release
// ARC: br label
// CHECK-NOT: call void @llvm.memset
diff --git a/test/CodeGenObjC/strong-in-c-struct.m b/test/CodeGenObjC/strong-in-c-struct.m
index 494b3b26fb..999b89dd60 100644
--- a/test/CodeGenObjC/strong-in-c-struct.m
+++ b/test/CodeGenObjC/strong-in-c-struct.m
@@ -125,7 +125,7 @@ void func(Strong *);
// CHECK: %[[V1:.*]] = bitcast i8** %[[V0]] to i8*
// CHECK: %[[V2:.*]] = getelementptr inbounds i8, i8* %[[V1]], i64 24
// CHECK: %[[V3:.*]] = bitcast i8* %[[V2]] to i8**
-// CHECK: call void @objc_storeStrong(i8** %[[V3]], i8* null)
+// CHECK: call void @llvm.objc.storeStrong(i8** %[[V3]], i8* null)
// CHECK: ret void
// CHECK: define linkonce_odr hidden void @__destructor_8_s16(i8** %[[DST:.*]])
@@ -135,7 +135,7 @@ void func(Strong *);
// CHECK: %[[V1:.*]] = bitcast i8** %[[V0]] to i8*
// CHECK: %[[V2:.*]] = getelementptr inbounds i8, i8* %[[V1]], i64 16
// CHECK: %[[V3:.*]] = bitcast i8* %[[V2]] to i8**
-// CHECK: call void @objc_storeStrong(i8** %[[V3]], i8* null)
+// CHECK: call void @llvm.objc.storeStrong(i8** %[[V3]], i8* null)
// CHECK: ret void
void test_constructor_destructor_StrongOuter(void) {
@@ -169,7 +169,7 @@ void test_constructor_destructor_StrongOuter(void) {
// CHECK: %[[V6:.*]] = getelementptr inbounds i8, i8* %[[V5]], i64 24
// CHECK: %[[V7:.*]] = bitcast i8* %[[V6]] to i8**
// CHECK: %[[V8:.*]] = load i8*, i8** %[[V7]], align 8
-// CHECK: %[[V9:.*]] = call i8* @objc_retain(i8* %[[V8]])
+// CHECK: %[[V9:.*]] = call i8* @llvm.objc.retain(i8* %[[V8]])
// CHECK: store i8* %[[V9]], i8** %[[V4]], align 8
// CHECK: %[[V10:.*]] = bitcast i8** %[[V0]] to i8*
// CHECK: %[[V11:.*]] = getelementptr inbounds i8, i8* %[[V10]], i64 32
@@ -200,7 +200,7 @@ void test_constructor_destructor_StrongOuter(void) {
// CHECK: %[[V8:.*]] = getelementptr inbounds i8, i8* %[[V7]], i64 16
// CHECK: %[[V9:.*]] = bitcast i8* %[[V8]] to i8**
// CHECK: %[[V10:.*]] = load i8*, i8** %[[V9]], align 8
-// CHECK: %[[V11:.*]] = call i8* @objc_retain(i8* %[[V10]])
+// CHECK: %[[V11:.*]] = call i8* @llvm.objc.retain(i8* %[[V10]])
// CHECK: store i8* %[[V11]], i8** %[[V6]], align 8
// CHECK: ret void
@@ -222,7 +222,7 @@ void test_copy_constructor_StrongOuter(StrongOuter *s) {
// CHECK: %[[V6:.*]] = getelementptr inbounds i8, i8* %[[V5]], i64 24
// CHECK: %[[V7:.*]] = bitcast i8* %[[V6]] to i8**
// CHECK: %[[V8:.*]] = load i8*, i8** %[[V7]], align 8
-// CHECK: call void @objc_storeStrong(i8** %[[V4]], i8* %[[V8]])
+// CHECK: call void @llvm.objc.storeStrong(i8** %[[V4]], i8* %[[V8]])
void test_copy_assignment_StrongOuter(StrongOuter *d, StrongOuter *s) {
*d = *s;
@@ -283,7 +283,7 @@ void test_move_constructor_StrongOuter(void) {
// CHECK: store i8* null, i8** %[[V7]], align 8
// CHECK: %[[V9:.*]] = load i8*, i8** %[[V4]], align 8
// CHECK: store i8* %[[V8]], i8** %[[V4]], align 8
-// CHECK: call void @objc_release(i8* %[[V9]])
+// CHECK: call void @llvm.objc.release(i8* %[[V9]])
void test_move_assignment_StrongOuter(StrongOuter *p) {
*p = getStrongOuter();
@@ -363,7 +363,7 @@ void test_destructor_ignored_result(void) {
// CHECK: %[[V0:.*]] = load i8**, i8*** %[[DST_ADDR]], align 8
// CHECK: %[[V1:.*]] = load i8**, i8*** %[[SRC_ADDR]], align 8
// CHECK: %[[V2:.*]] = load i8*, i8** %[[V1]], align 8
-// CHECK: %[[V3:.*]] = call i8* @objc_retainBlock(i8* %[[V2]])
+// CHECK: %[[V3:.*]] = call i8* @llvm.objc.retainBlock(i8* %[[V2]])
// CHECK: store i8* %[[V3]], i8** %[[V0]], align 8
// CHECK: ret void
@@ -382,10 +382,10 @@ void test_copy_constructor_StrongBlock(StrongBlock *s) {
// CHECK: %[[V0:.*]] = load i8**, i8*** %[[DST_ADDR]], align 8
// CHECK: %[[V1:.*]] = load i8**, i8*** %[[SRC_ADDR]], align 8
// CHECK: %[[V2:.*]] = load i8*, i8** %[[V1]], align 8
-// CHECK: %[[V3:.*]] = call i8* @objc_retainBlock(i8* %[[V2]])
+// CHECK: %[[V3:.*]] = call i8* @llvm.objc.retainBlock(i8* %[[V2]])
// CHECK: %[[V4:.*]] = load i8*, i8** %[[V0]], align 8
// CHECK: store i8* %[[V3]], i8** %[[V0]], align 8
-// CHECK: call void @objc_release(i8* %[[V4]])
+// CHECK: call void @llvm.objc.release(i8* %[[V4]])
// CHECK: ret void
void test_copy_assignment_StrongBlock(StrongBlock *d, StrongBlock *s) {
@@ -398,7 +398,7 @@ void test_copy_assignment_StrongBlock(StrongBlock *d, StrongBlock *s) {
// CHECK: define linkonce_odr hidden void @__copy_constructor_8_8_t0w4_sv8(
// CHECK: %[[V8:.*]] = load volatile i8*, i8** %{{.*}}, align 8
-// CHECK: %[[V9:.*]] = call i8* @objc_retain(i8* %[[V8]])
+// CHECK: %[[V9:.*]] = call i8* @llvm.objc.retain(i8* %[[V8]])
// CHECK: store volatile i8* %[[V9]], i8** %{{.*}}, align 8
void test_copy_constructor_StrongVolatile0(StrongVolatile *s) {
diff --git a/test/CodeGenObjC/weak-in-c-struct.m b/test/CodeGenObjC/weak-in-c-struct.m
index b0f4c08510..1b2d860fc3 100644
--- a/test/CodeGenObjC/weak-in-c-struct.m
+++ b/test/CodeGenObjC/weak-in-c-struct.m
@@ -40,7 +40,7 @@ void calleeWeak(Weak);
// ARM64: %[[V1:.*]] = bitcast i8** %[[V0]] to i8*
// ARM64: %[[V2:.*]] = getelementptr inbounds i8, i8* %[[V1]], i64 8
// ARM64: %[[V3:.*]] = bitcast i8* %[[V2]] to i8**
-// ARM64: call void @objc_destroyWeak(i8** %[[V3]])
+// ARM64: call void @llvm.objc.destroyWeak(i8** %[[V3]])
void test_constructor_destructor_Weak(void) {
Weak t;
@@ -67,7 +67,7 @@ void test_constructor_destructor_Weak(void) {
// ARM64: %[[V8:.*]] = bitcast i8** %[[V1]] to i8*
// ARM64: %[[V9:.*]] = getelementptr inbounds i8, i8* %[[V8]], i64 8
// ARM64: %[[V10:.*]] = bitcast i8* %[[V9]] to i8**
-// ARM64: call void @objc_copyWeak(i8** %[[V7]], i8** %[[V10]])
+// ARM64: call void @llvm.objc.copyWeak(i8** %[[V7]], i8** %[[V10]])
void test_copy_constructor_Weak(Weak *s) {
Weak t = *s;
@@ -93,9 +93,9 @@ void test_copy_constructor_Weak(Weak *s) {
// ARM64: %[[V8:.*]] = bitcast i8** %[[V1]] to i8*
// ARM64: %[[V9:.*]] = getelementptr inbounds i8, i8* %[[V8]], i64 8
// ARM64: %[[V10:.*]] = bitcast i8* %[[V9]] to i8**
-// ARM64: %[[V11:.*]] = call i8* @objc_loadWeakRetained(i8** %[[V10]])
-// ARM64: %[[V12:.*]] = call i8* @objc_storeWeak(i8** %[[V7]], i8* %[[V11]])
-// ARM64: call void @objc_release(i8* %[[V11]])
+// ARM64: %[[V11:.*]] = call i8* @llvm.objc.loadWeakRetained(i8** %[[V10]])
+// ARM64: %[[V12:.*]] = call i8* @llvm.objc.storeWeak(i8** %[[V7]], i8* %[[V11]])
+// ARM64: call void @llvm.objc.release(i8* %[[V11]])
void test_copy_assignment_Weak(Weak *d, Weak *s) {
*d = *s;
@@ -121,7 +121,7 @@ void test_copy_assignment_Weak(Weak *d, Weak *s) {
// ARM64: %[[V8:.*]] = bitcast i8** %[[V1]] to i8*
// ARM64: %[[V9:.*]] = getelementptr inbounds i8, i8* %[[V8]], i64 8
// ARM64: %[[V10:.*]] = bitcast i8* %[[V9]] to i8**
-// ARM64: call void @objc_moveWeak(i8** %[[V7]], i8** %[[V10]])
+// ARM64: call void @llvm.objc.moveWeak(i8** %[[V7]], i8** %[[V10]])
void test_move_constructor_Weak(void) {
__block Weak t;
@@ -148,10 +148,10 @@ void test_move_constructor_Weak(void) {
// ARM64: %[[V8:.*]] = bitcast i8** %[[V1]] to i8*
// ARM64: %[[V9:.*]] = getelementptr inbounds i8, i8* %[[V8]], i64 8
// ARM64: %[[V10:.*]] = bitcast i8* %[[V9]] to i8**
-// ARM64: %[[V11:.*]] = call i8* @objc_loadWeakRetained(i8** %[[V10]])
-// ARM64: %[[V12:.*]] = call i8* @objc_storeWeak(i8** %[[V7]], i8* %[[V11]])
-// ARM64: call void @objc_destroyWeak(i8** %[[V10]])
-// ARM64: call void @objc_release(i8* %[[V11]])
+// ARM64: %[[V11:.*]] = call i8* @llvm.objc.loadWeakRetained(i8** %[[V10]])
+// ARM64: %[[V12:.*]] = call i8* @llvm.objc.storeWeak(i8** %[[V7]], i8* %[[V11]])
+// ARM64: call void @llvm.objc.destroyWeak(i8** %[[V10]])
+// ARM64: call void @llvm.objc.release(i8* %[[V11]])
void test_move_assignment_Weak(Weak *p) {
*p = getWeak();
diff --git a/test/CodeGenObjCXX/arc-attrs.mm b/test/CodeGenObjCXX/arc-attrs.mm
index 0b64d77566..5ab7a69de2 100644
--- a/test/CodeGenObjCXX/arc-attrs.mm
+++ b/test/CodeGenObjCXX/arc-attrs.mm
@@ -15,7 +15,7 @@ void sanityTest() {
// CHECK-NEXT: call void @_Z13releaseObjectP11objc_object(i8* [[OBJ2]])
releaseObject(makeObject2());
- // CHECK-NEXT: call void @objc_storeStrong(i8** [[X]], i8* null)
+ // CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[X]], i8* null)
// CHECK-NEXT: ret void
}
@@ -43,7 +43,7 @@ void templateTest() {
// CHECK-NEXT: call void @_Z14releaseObjectTIU8__strongP11objc_objectEvT_(i8* [[OBJ3]])
releaseObjectT(makeObject1());
- // CHECK-NEXT: call void @objc_storeStrong(i8** [[X]], i8* null)
+ // CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[X]], i8* null)
// CHECK-NEXT: ret void
}
@@ -58,7 +58,7 @@ ForwardConsumed::ForwardConsumed(__attribute__((ns_consumed)) id x) {}
// CHECK-NOT: objc_retain
// CHECK: store i8* {{.*}}, i8** [[X:%.*]],
// CHECK-NOT: [[X]]
-// CHECK: call void @objc_storeStrong(i8** [[X]], i8* null)
+// CHECK: call void @llvm.objc.storeStrong(i8** [[X]], i8* null)
// CHECK: define void @_ZN15ForwardConsumedC1EP11objc_object(
// CHECK-NOT: objc_retain
@@ -66,4 +66,4 @@ ForwardConsumed::ForwardConsumed(__attribute__((ns_consumed)) id x) {}
// CHECK: [[T0:%.*]] = load i8*, i8** [[X]],
// CHECK-NEXT: store i8* null, i8** [[X]],
// CHECK-NEXT: call void @_ZN15ForwardConsumedC2EP11objc_object({{.*}}, i8* [[T0]])
-// CHECK: call void @objc_storeStrong(i8** [[X]], i8* null)
+// CHECK: call void @llvm.objc.storeStrong(i8** [[X]], i8* null)
diff --git a/test/CodeGenObjCXX/arc-blocks.mm b/test/CodeGenObjCXX/arc-blocks.mm
index 4791aff0b3..ec0c12456a 100644
--- a/test/CodeGenObjCXX/arc-blocks.mm
+++ b/test/CodeGenObjCXX/arc-blocks.mm
@@ -72,7 +72,7 @@ namespace test1 {
// CHECK: %[[V10:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8*, %[[STRUCT_TEST1_S0]], %[[STRUCT_TEST1_S0]], %[[STRUCT_TRIVIAL_INTERNAL]] }>, <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8*, %[[STRUCT_TEST1_S0]], %[[STRUCT_TEST1_S0]], %[[STRUCT_TRIVIAL_INTERNAL]] }>* %[[BLOCK_DEST]], i32 0, i32 5
// CHECK: %[[BLOCKCOPY_SRC2:.*]] = load i8*, i8** %[[V9]], align 8
// CHECK: store i8* null, i8** %[[V10]], align 8
-// CHECK: call void @objc_storeStrong(i8** %[[V10]], i8* %[[BLOCKCOPY_SRC2]])
+// CHECK: call void @llvm.objc.storeStrong(i8** %[[V10]], i8* %[[BLOCKCOPY_SRC2]])
// CHECK: %[[V4:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8*, %[[STRUCT_TEST1_S0]], %[[STRUCT_TEST1_S0]], %[[STRUCT_TRIVIAL_INTERNAL]] }>, <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8*, %[[STRUCT_TEST1_S0]], %[[STRUCT_TEST1_S0]], %[[STRUCT_TRIVIAL_INTERNAL]] }>* %[[BLOCK_SOURCE]], i32 0, i32 6
// CHECK: %[[V5:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8*, %[[STRUCT_TEST1_S0]], %[[STRUCT_TEST1_S0]], %[[STRUCT_TRIVIAL_INTERNAL]] }>, <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8*, %[[STRUCT_TEST1_S0]], %[[STRUCT_TEST1_S0]], %[[STRUCT_TRIVIAL_INTERNAL]] }>* %[[BLOCK_DEST]], i32 0, i32 6
@@ -82,7 +82,7 @@ namespace test1 {
// CHECK: %[[V7:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8*, %[[STRUCT_TEST1_S0]], %[[STRUCT_TEST1_S0]], %[[STRUCT_TRIVIAL_INTERNAL]] }>, <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8*, %[[STRUCT_TEST1_S0]], %[[STRUCT_TEST1_S0]], %[[STRUCT_TRIVIAL_INTERNAL]] }>* %[[BLOCK_SOURCE]], i32 0, i32 7
// CHECK: %[[V8:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8*, %[[STRUCT_TEST1_S0]], %[[STRUCT_TEST1_S0]], %[[STRUCT_TRIVIAL_INTERNAL]] }>, <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8*, %[[STRUCT_TEST1_S0]], %[[STRUCT_TEST1_S0]], %[[STRUCT_TRIVIAL_INTERNAL]] }>* %[[BLOCK_DEST]], i32 0, i32 7
-// CHECK: call void @objc_copyWeak(i8** %[[V8]], i8** %[[V7]])
+// CHECK: call void @llvm.objc.copyWeak(i8** %[[V8]], i8** %[[V7]])
// CHECK: %[[V11:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8*, %[[STRUCT_TEST1_S0]], %[[STRUCT_TEST1_S0]], %[[STRUCT_TRIVIAL_INTERNAL]] }>, <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8*, %[[STRUCT_TEST1_S0]], %[[STRUCT_TEST1_S0]], %[[STRUCT_TRIVIAL_INTERNAL]] }>* %[[BLOCK_SOURCE]], i32 0, i32 8
// CHECK: %[[V12:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8*, %[[STRUCT_TEST1_S0]], %[[STRUCT_TEST1_S0]], %[[STRUCT_TRIVIAL_INTERNAL]] }>, <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8*, %[[STRUCT_TEST1_S0]], %[[STRUCT_TEST1_S0]], %[[STRUCT_TRIVIAL_INTERNAL]] }>* %[[BLOCK_DEST]], i32 0, i32 8
@@ -109,10 +109,10 @@ namespace test1 {
// CHECK: br label %[[EHCLEANUP]]
// CHECK: [[EHCLEANUP]]:
-// CHECK: call void @objc_destroyWeak(i8** %[[V8]])
+// CHECK: call void @llvm.objc.destroyWeak(i8** %[[V8]])
// CHECK: %[[V21:.*]] = load i8*, i8** %[[V5]], align 8
// CHECK: call void @_Block_object_dispose(i8* %[[V21]], i32 8)
-// CHECK: call void @objc_storeStrong(i8** %[[V10]], i8* null)
+// CHECK: call void @llvm.objc.storeStrong(i8** %[[V10]], i8* null)
// CHECK: br label %[[EH_RESUME:.*]]
// CHECK: [[EH_RESUME]]:
@@ -122,7 +122,7 @@ namespace test1 {
// CHECK: call void @__clang_call_terminate(
// CHECK-O1-LABEL: define linkonce_odr hidden void @__copy_helper_block_ea8_32s40r48w56c15_ZTSN5test12S0E60c15_ZTSN5test12S0E(
-// CHECK-O1: tail call void @objc_release({{.*}}) {{.*}} !clang.imprecise_release
+// CHECK-O1: tail call void @llvm.objc.release({{.*}}) {{.*}} !clang.imprecise_release
// CHECK-NOEXCP: define linkonce_odr hidden void @__copy_helper_block_8_32s40r48w56c15_ZTSN5test12S0E60c15_ZTSN5test12S0E(
// CHECK: define linkonce_odr hidden void @__destroy_helper_block_ea8_32s40r48w56c15_ZTSN5test12S0E60c15_ZTSN5test12S0E(
@@ -140,10 +140,10 @@ namespace test1 {
// CHECK: to label %[[INVOKE_CONT2:.*]] unwind label %[[LPAD1:.*]]
// CHECK: [[INVOKE_CONT2]]:
-// CHECK: call void @objc_destroyWeak(i8** %[[V3]])
+// CHECK: call void @llvm.objc.destroyWeak(i8** %[[V3]])
// CHECK: %[[V7:.*]] = load i8*, i8** %[[V2]], align 8
// CHECK: call void @_Block_object_dispose(i8* %[[V7]], i32 8)
-// CHECK: call void @objc_storeStrong(i8** %[[V4]], i8* null)
+// CHECK: call void @llvm.objc.storeStrong(i8** %[[V4]], i8* null)
// CHECK: ret void
// CHECK: [[LPAD]]:
@@ -157,10 +157,10 @@ namespace test1 {
// CHECK: br label %[[EHCLEANUP]]
// CHECK: [[EHCLEANUP]]:
-// CHECK: call void @objc_destroyWeak(i8** %[[V3]])
+// CHECK: call void @llvm.objc.destroyWeak(i8** %[[V3]])
// CHECK: %[[V14:.*]] = load i8*, i8** %[[V2]], align 8
// CHECK: call void @_Block_object_dispose(i8* %[[V14]], i32 8)
-// CHECK: call void @objc_storeStrong(i8** %[[V4]], i8* null)
+// CHECK: call void @llvm.objc.storeStrong(i8** %[[V4]], i8* null)
// CHECK: br label %[[EH_RESUME:.*]]
// CHECK: [[EH_RESUME]]:
@@ -170,8 +170,8 @@ namespace test1 {
// CHECK: call void @__clang_call_terminate(
// CHECK-O1-LABEL: define linkonce_odr hidden void @__destroy_helper_block_ea8_32s40r48w56c15_ZTSN5test12S0E60c15_ZTSN5test12S0E(
-// CHECK-O1: tail call void @objc_release({{.*}}) {{.*}} !clang.imprecise_release
-// CHECK-O1: tail call void @objc_release({{.*}}) {{.*}} !clang.imprecise_release
+// CHECK-O1: tail call void @llvm.objc.release({{.*}}) {{.*}} !clang.imprecise_release
+// CHECK-O1: tail call void @llvm.objc.release({{.*}}) {{.*}} !clang.imprecise_release
// CHECK-NOEXCP: define linkonce_odr hidden void @__destroy_helper_block_8_32s40r48w56c15_ZTSN5test12S0E60c15_ZTSN5test12S0E(
namespace {
diff --git a/test/CodeGenObjCXX/arc-constexpr.mm b/test/CodeGenObjCXX/arc-constexpr.mm
index b12ff57a06..42fafcf2a4 100644
--- a/test/CodeGenObjCXX/arc-constexpr.mm
+++ b/test/CodeGenObjCXX/arc-constexpr.mm
@@ -6,11 +6,11 @@
// CHECK-LABEL: define void @_Z5test1v
// CHECK: %[[ALLOCA:[A-Z]+]] = alloca %[[TYPE]]*
-// CHECK: %[[V0:[0-9]+]] = call i8* @objc_retain(i8* bitcast (%struct.__NSConstantString_tag* @[[CFSTRING]]
+// CHECK: %[[V0:[0-9]+]] = call i8* @llvm.objc.retain(i8* bitcast (%struct.__NSConstantString_tag* @[[CFSTRING]]
// CHECK: %[[V1:[0-9]+]] = bitcast i8* %[[V0]] to %[[TYPE]]*
// CHECK: store %[[TYPE]]* %[[V1]], %[[TYPE]]** %[[ALLOCA]]
// CHECK: %[[V2:[0-9]+]] = bitcast %[[TYPE]]** %[[ALLOCA]]
-// CHECK: call void @objc_storeStrong(i8** %[[V2]], i8* null)
+// CHECK: call void @llvm.objc.storeStrong(i8** %[[V2]], i8* null)
void test1() {
constexpr NSString *S = @"abc";
}
@@ -18,16 +18,16 @@ void test1() {
// CHECK-LABEL: define void @_Z5test2v
// CHECK: %[[CONST:[a-zA-Z]+]] = alloca %[[TYPE]]*
// CHECK: %[[REF_CONST:[a-zA-Z]+]] = alloca %[[TYPE]]*
-// CHECK: %[[V0:[0-9]+]] = call i8* @objc_retain(i8* bitcast (%struct.__NSConstantString_tag* @[[CFSTRING]]
+// CHECK: %[[V0:[0-9]+]] = call i8* @llvm.objc.retain(i8* bitcast (%struct.__NSConstantString_tag* @[[CFSTRING]]
// CHECK-NEXT: %[[V1:[0-9]+]] = bitcast i8* %[[V0]] to %[[TYPE]]*
// CHECK-NEXT: store %[[TYPE]]* %[[V1]], %[[TYPE]]** %[[CONST]]
-// CHECK: %[[V2:[0-9]+]] = call i8* @objc_retain(i8* bitcast (%struct.__NSConstantString_tag* @[[CFSTRING]]
+// CHECK: %[[V2:[0-9]+]] = call i8* @llvm.objc.retain(i8* bitcast (%struct.__NSConstantString_tag* @[[CFSTRING]]
// CHECK-NEXT: %[[V3:[0-9]+]] = bitcast i8* %[[V2]] to %[[TYPE]]*
// CHECK-NEXT: store %[[TYPE]]* %[[V3]], %[[TYPE]]** %[[REF_CONST]]
// CHECK: %[[V4:[0-9]+]] = bitcast %[[TYPE]]** %[[REF_CONST]]
-// CHECK-NEXT: call void @objc_storeStrong(i8** %[[V4]], i8* null)
+// CHECK-NEXT: call void @llvm.objc.storeStrong(i8** %[[V4]], i8* null)
// CHECK: %[[V5:[0-9]+]] = bitcast %[[TYPE]]** %[[CONST]]
-// CHECK-NEXT: call void @objc_storeStrong(i8** %[[V5]], i8* null)
+// CHECK-NEXT: call void @llvm.objc.storeStrong(i8** %[[V5]], i8* null)
void test2() {
constexpr NSString *Const = @"abc";
// In IR RefConst should be initialized with Const initializer instead of
@@ -39,12 +39,12 @@ void test2() {
// CHECK: %[[WEAK_CONST:[a-zA-Z]+]] = alloca %[[TYPE]]*
// CHECK: %[[REF_WEAK_CONST:[a-zA-Z]+]] = alloca %[[TYPE]]*
// CHECK: %[[V0:[0-9]+]] = bitcast %[[TYPE]]** %[[WEAK_CONST]]
-// CHECK-NEXT: %[[V1:[0-9]+]] = call i8* @objc_initWeak(i8** %[[V0]], i8* bitcast (%struct.__NSConstantString_tag* @[[CFSTRING]]
+// CHECK-NEXT: %[[V1:[0-9]+]] = call i8* @llvm.objc.initWeak(i8** %[[V0]], i8* bitcast (%struct.__NSConstantString_tag* @[[CFSTRING]]
// CHECK: store %[[TYPE]]* bitcast (%struct.__NSConstantString_tag* @[[CFSTRING]] to %[[TYPE]]*), %[[TYPE]]** %[[REF_WEAK_CONST]]
// CHECK: %[[V2:[0-9]+]] = bitcast %[[TYPE]]** %[[REF_WEAK_CONST]]
-// CHECK-NEXT: call void @objc_storeStrong(i8** %[[V2]], i8* null)
+// CHECK-NEXT: call void @llvm.objc.storeStrong(i8** %[[V2]], i8* null)
// CHECK: %[[V3:[0-9]+]] = bitcast %[[TYPE]]** %[[WEAK_CONST]]
-// CHECK-NEXT: call void @objc_destroyWeak(i8** %[[V3]])
+// CHECK-NEXT: call void @llvm.objc.destroyWeak(i8** %[[V3]])
void test3() {
__weak constexpr NSString *WeakConst = @"abc";
NSString* RefWeakConst = WeakConst;
diff --git a/test/CodeGenObjCXX/arc-cxx11-init-list.mm b/test/CodeGenObjCXX/arc-cxx11-init-list.mm
index af607654e1..2c70f64d20 100644
--- a/test/CodeGenObjCXX/arc-cxx11-init-list.mm
+++ b/test/CodeGenObjCXX/arc-cxx11-init-list.mm
@@ -29,14 +29,14 @@ extern "C" void single() { function({ [I new] }); }
// CHECK: [[INSTANCE:%.*]] = {{.*}} call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* {{.*}}, i8* {{.*}})
// CHECK-NEXT: [[CAST:%.*]] = bitcast [{{[0-9]+}} x %0*]* %{{.*}} to i8**
// CHECK-NEXT: store i8* [[INSTANCE]], i8** [[CAST]],
-// CHECK: call void @objc_release(i8* {{.*}})
+// CHECK: call void @llvm.objc.release(i8* {{.*}})
extern "C" void multiple() { function({ [I new], [I new] }); }
// CHECK: [[INSTANCE:%.*]] = {{.*}} call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* {{.*}}, i8* {{.*}})
// CHECK-NEXT: [[CAST:%.*]] = bitcast [{{[0-9]+}} x %0*]* %{{.*}} to i8**
// CHECK-NEXT: store i8* [[INSTANCE]], i8** [[CAST]],
-// CHECK: call void @objc_release(i8* {{.*}})
+// CHECK: call void @llvm.objc.release(i8* {{.*}})
std::initializer_list<id> foo1() {
return {@"str0", @"str1"};
@@ -58,11 +58,11 @@ extern "C" void extended() {
// CHECK: [[INSTANCE:%.*]] = {{.*}} call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* {{.*}}, i8* {{.*}})
// CHECK: {{.*}} call void @_Z8externalv()
-// CHECK: {{.*}} call void @objc_release(i8* {{.*}})
+// CHECK: {{.*}} call void @llvm.objc.release(i8* {{.*}})
std::initializer_list<I *> il = { [I new] };
-// CHECK: [[POOL:%.*]] = {{.*}} call i8* @objc_autoreleasePoolPush()
+// CHECK: [[POOL:%.*]] = {{.*}} call i8* @llvm.objc.autoreleasePoolPush()
// CHECK: [[INSTANCE:%.*]] = {{.*}} call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* {{.*}}, i8* {{.*}})
// CHECK-NEXT: store i8* [[INSTANCE]], i8** bitcast ([1 x %0*]* @_ZGR2il_ to i8**)
-// CHECK: {{.*}} call void @objc_autoreleasePoolPop(i8* [[POOL]])
+// CHECK: {{.*}} call void @llvm.objc.autoreleasePoolPop(i8* [[POOL]])
diff --git a/test/CodeGenObjCXX/arc-exceptions.mm b/test/CodeGenObjCXX/arc-exceptions.mm
index 3d50461350..94e1374c83 100644
--- a/test/CodeGenObjCXX/arc-exceptions.mm
+++ b/test/CodeGenObjCXX/arc-exceptions.mm
@@ -17,11 +17,11 @@ void test0(void) {
// CHECK: [[T0:%.*]] = call i8* @objc_begin_catch(
// CHECK-NEXT: [[T1:%.*]] = bitcast i8* [[T0]] to [[ETY]]*
// CHECK-NEXT: [[T2:%.*]] = bitcast [[ETY]]* [[T1]] to i8*
-// CHECK-NEXT: [[T3:%.*]] = call i8* @objc_retain(i8* [[T2]]) [[NUW:#[0-9]+]]
+// CHECK-NEXT: [[T3:%.*]] = call i8* @llvm.objc.retain(i8* [[T2]]) [[NUW:#[0-9]+]]
// CHECK-NEXT: [[T4:%.*]] = bitcast i8* [[T3]] to [[ETY]]*
// CHECK-NEXT: store [[ETY]]* [[T4]], [[ETY]]** [[E]]
// CHECK-NEXT: [[T0:%.*]] = bitcast [[ETY]]** [[E]] to i8**
-// CHECK-NEXT: call void @objc_storeStrong(i8** [[T0]], i8* null) [[NUW]]
+// CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[T0]], i8* null) [[NUW]]
// CHECK-NEXT: call void @objc_end_catch() [[NUW]]
void test1_helper(void);
@@ -38,9 +38,9 @@ void test1(void) {
// CHECK-NEXT: [[T1:%.*]] = bitcast i8* [[T0]] to [[ETY]]*
// CHECK-NEXT: [[T2:%.*]] = bitcast [[ETY]]** [[E]] to i8**
// CHECK-NEXT: [[T3:%.*]] = bitcast [[ETY]]* [[T1]] to i8*
-// CHECK-NEXT: call i8* @objc_initWeak(i8** [[T2]], i8* [[T3]]) [[NUW]]
+// CHECK-NEXT: call i8* @llvm.objc.initWeak(i8** [[T2]], i8* [[T3]]) [[NUW]]
// CHECK-NEXT: [[T0:%.*]] = bitcast [[ETY]]** [[E]] to i8**
-// CHECK-NEXT: call void @objc_destroyWeak(i8** [[T0]]) [[NUW]]
+// CHECK-NEXT: call void @llvm.objc.destroyWeak(i8** [[T0]]) [[NUW]]
// CHECK-NEXT: call void @objc_end_catch() [[NUW]]
void test2_helper(void);
@@ -56,11 +56,11 @@ void test2(void) {
// CHECK: [[T0:%.*]] = call i8* @__cxa_begin_catch(
// CHECK-NEXT: [[T1:%.*]] = bitcast i8* [[T0]] to [[ETY]]*
// CHECK-NEXT: [[T2:%.*]] = bitcast [[ETY]]* [[T1]] to i8*
-// CHECK-NEXT: [[T3:%.*]] = call i8* @objc_retain(i8* [[T2]]) [[NUW]]
+// CHECK-NEXT: [[T3:%.*]] = call i8* @llvm.objc.retain(i8* [[T2]]) [[NUW]]
// CHECK-NEXT: [[T4:%.*]] = bitcast i8* [[T3]] to [[ETY]]*
// CHECK-NEXT: store [[ETY]]* [[T4]], [[ETY]]** [[E]]
// CHECK-NEXT: [[T0:%.*]] = bitcast [[ETY]]** [[E]] to i8**
-// CHECK-NEXT: call void @objc_storeStrong(i8** [[T0]], i8* null) [[NUW]]
+// CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[T0]], i8* null) [[NUW]]
// CHECK-NEXT: call void @__cxa_end_catch() [[NUW]]
void test3_helper(void);
@@ -77,9 +77,9 @@ void test3(void) {
// CHECK-NEXT: [[T1:%.*]] = bitcast i8* [[T0]] to [[ETY]]*
// CHECK-NEXT: [[T2:%.*]] = bitcast [[ETY]]** [[E]] to i8**
// CHECK-NEXT: [[T3:%.*]] = bitcast [[ETY]]* [[T1]] to i8*
-// CHECK-NEXT: call i8* @objc_initWeak(i8** [[T2]], i8* [[T3]]) [[NUW]]
+// CHECK-NEXT: call i8* @llvm.objc.initWeak(i8** [[T2]], i8* [[T3]]) [[NUW]]
// CHECK-NEXT: [[T0:%.*]] = bitcast [[ETY]]** [[E]] to i8**
-// CHECK-NEXT: call void @objc_destroyWeak(i8** [[T0]]) [[NUW]]
+// CHECK-NEXT: call void @llvm.objc.destroyWeak(i8** [[T0]]) [[NUW]]
// CHECK-NEXT: call void @__cxa_end_catch() [[NUW]]
namespace test4 {
@@ -112,11 +112,11 @@ namespace test4 {
// CHECK-NEXT: br label
// CHECK: [[AFTER:%.*]] = phi i8** [ [[ARRAYEND]], {{%.*}} ], [ [[ELT:%.*]], {{%.*}} ]
// CHECK-NEXT: [[ELT]] = getelementptr inbounds i8*, i8** [[AFTER]], i64 -1
- // CHECK-NEXT: call void @objc_storeStrong(i8** [[ELT]], i8* null) [[NUW]]
+ // CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[ELT]], i8* null) [[NUW]]
// CHECK-NEXT: [[DONE:%.*]] = icmp eq i8** [[ELT]], [[ARRAYBEGIN]]
// CHECK-NEXT: br i1 [[DONE]],
// - Next, destroy single.
- // CHECK: call void @objc_storeStrong(i8** [[SINGLE]], i8* null) [[NUW]]
+ // CHECK: call void @llvm.objc.storeStrong(i8** [[SINGLE]], i8* null) [[NUW]]
// CHECK: br label
// CHECK: resume
}
diff --git a/test/CodeGenObjCXX/arc-forwarded-lambda-call.mm b/test/CodeGenObjCXX/arc-forwarded-lambda-call.mm
index 0a575c7697..5a5cb42067 100644
--- a/test/CodeGenObjCXX/arc-forwarded-lambda-call.mm
+++ b/test/CodeGenObjCXX/arc-forwarded-lambda-call.mm
@@ -5,8 +5,8 @@ void test0(id x) {
test0_helper([=]() { return x; });
// CHECK-LABEL: define internal i8* @___Z5test0P11objc_object_block_invoke
// CHECK: [[T0:%.*]] = call i8* @"_ZZ5test0P11objc_objectENK3$_0clEv"
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
- // CHECK-NEXT: [[T2:%.*]] = tail call i8* @objc_autoreleaseReturnValue(i8* [[T1]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
+ // CHECK-NEXT: [[T2:%.*]] = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* [[T1]])
// CHECK-NEXT: ret i8* [[T2]]
}
@@ -28,8 +28,8 @@ void test1() {
test1_helper([](){ return test1_rv; });
// CHECK-LABEL: define internal i8* @"_ZZ5test1vEN3$_18__invokeEv"
// CHECK: [[T0:%.*]] = call i8* @"_ZZ5test1vENK3$_1clEv"
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
- // CHECK-NEXT: [[T2:%.*]] = tail call i8* @objc_autoreleaseReturnValue(i8* [[T1]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
+ // CHECK-NEXT: [[T2:%.*]] = tail call i8* @llvm.objc.autoreleaseReturnValue(i8* [[T1]])
// CHECK-NEXT: ret i8* [[T2]]
}
diff --git a/test/CodeGenObjCXX/arc-globals.mm b/test/CodeGenObjCXX/arc-globals.mm
index a03ac9948b..d5116ee96c 100644
--- a/test/CodeGenObjCXX/arc-globals.mm
+++ b/test/CodeGenObjCXX/arc-globals.mm
@@ -7,21 +7,21 @@ id getObject();
// CHECK-LABEL: define internal void @__cxx_global_var_init
// CHECK: call i8* @_Z9getObjectv
-// CHECK-NEXT: call i8* @objc_retainAutoreleasedReturnValue
+// CHECK-NEXT: call i8* @llvm.objc.retainAutoreleasedReturnValue
// CHECK-NEXT: {{store i8*.*@global_obj}}
// CHECK-NEXT: ret void
id global_obj = getObject();
// CHECK-LABEL: define internal void @__cxx_global_var_init
// CHECK: call i8* @_Z9getObjectv
-// CHECK-NEXT: call i8* @objc_retainAutoreleasedReturnValue
+// CHECK-NEXT: call i8* @llvm.objc.retainAutoreleasedReturnValue
// CHECK-NEXT: {{store i8*.*@global_obj2}}
// CHECK-NEXT: ret void
id global_obj2 = getObject();
// CHECK-LABEL: define internal void @_GLOBAL__sub_I_arc_globals.mm
-// CHECK: call i8* @objc_autoreleasePoolPush()
+// CHECK: call i8* @llvm.objc.autoreleasePoolPush()
// CHECK-NEXT: call void @__cxx_global_var_init
// CHECK-NEXT: call void @__cxx_global_var_init.1
-// CHECK-NEXT: call void @objc_autoreleasePoolPop(
+// CHECK-NEXT: call void @llvm.objc.autoreleasePoolPop(
// CHECK-NEXT: ret void
diff --git a/test/CodeGenObjCXX/arc-indirect.mm b/test/CodeGenObjCXX/arc-indirect.mm
index 6982bac041..49fdc51e46 100644
--- a/test/CodeGenObjCXX/arc-indirect.mm
+++ b/test/CodeGenObjCXX/arc-indirect.mm
@@ -19,4 +19,4 @@ struct S {
// CHECK-DARWIN: define internal void @"\01-[C object:struct:]"(<{ %0*, i8*, i8*, %struct.S, [3 x i8] }>* inalloca)
// CHECK: %obj = getelementptr inbounds <{ %0*, i8*, i8*, %struct.S, [3 x i8] }>, <{ %0*, i8*, i8*, %struct.S, [3 x i8] }>* %0, i32 0, i32 2
// CHECK: %[[INSTANCE:[0-9]+]] = load i8*, i8** %obj, align 4
-// CHECK: call void @objc_storeStrong(i8** %obj, i8* %[[INSTANCE]])
+// CHECK: call void @llvm.objc.storeStrong(i8** %obj, i8* %[[INSTANCE]])
diff --git a/test/CodeGenObjCXX/arc-move.mm b/test/CodeGenObjCXX/arc-move.mm
index def2cea956..a43b9bc604 100644
--- a/test/CodeGenObjCXX/arc-move.mm
+++ b/test/CodeGenObjCXX/arc-move.mm
@@ -6,7 +6,7 @@ void simple_move(__strong id &x, __strong id &y) {
// CHECK: store i8* null
// CHECK: = load i8*, i8**
// CHECK: store i8*
- // CHECK-NEXT: call void @objc_release
+ // CHECK-NEXT: call void @llvm.objc.release
x = static_cast<__strong id&&>(y);
// CHECK-NEXT: ret void
}
@@ -39,7 +39,7 @@ void library_move(__strong id &x, __strong id &y) {
// CHECK: load i8**, i8***
// CHECK-NEXT: load i8*, i8**
// CHECK-NEXT: store i8*
- // CHECK-NEXT: call void @objc_release
+ // CHECK-NEXT: call void @llvm.objc.release
// CHECK-NEXT: ret void
x = move(y);
}
@@ -66,7 +66,7 @@ void library_move(__strong id &y) {
// CHECK-NEXT: [[IPTR2:%.*]] = bitcast i32* [[I]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 4, i8* [[IPTR2]])
// CHECK-NEXT: [[OBJ:%[a-zA-Z0-9]+]] = load i8*, i8** [[X]]
- // CHECK-NEXT: call void @objc_release(i8* [[OBJ]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[OBJ]])
// CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
@@ -77,9 +77,9 @@ void const_move(const __strong id &x) {
// CHECK: [[Y:%.*]] = alloca i8*,
// CHECK: [[X:%.*]] = call dereferenceable({{[0-9]+}}) i8** @_Z4moveIRU8__strongKP11objc_objectEON16remove_referenceIT_E4typeEOS5_(
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[X]]
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retain(i8* [[T0]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retain(i8* [[T0]])
// CHECK-NEXT: store i8* [[T1]], i8** [[Y]]
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[Y]]
- // CHECK-NEXT: call void @objc_release(i8* [[T0]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]])
id y = move(x);
}
diff --git a/test/CodeGenObjCXX/arc-new-delete.mm b/test/CodeGenObjCXX/arc-new-delete.mm
index 9fb5781990..0f66056be6 100644
--- a/test/CodeGenObjCXX/arc-new-delete.mm
+++ b/test/CodeGenObjCXX/arc-new-delete.mm
@@ -8,8 +8,8 @@ typedef __weak id weak_id;
void test_new(id invalue) {
// CHECK: [[INVALUEADDR:%.*]] = alloca i8*
// UNOPT-NEXT: store i8* null, i8** [[INVALUEADDR]]
- // UNOPT-NEXT: call void @objc_storeStrong(i8** [[INVALUEADDR]], i8* [[INVALUE:%.*]])
- // OPT-NEXT: [[T0:%.*]] = call i8* @objc_retain(i8* [[INVALUE:%.*]])
+ // UNOPT-NEXT: call void @llvm.objc.storeStrong(i8** [[INVALUEADDR]], i8* [[INVALUE:%.*]])
+ // OPT-NEXT: [[T0:%.*]] = call i8* @llvm.objc.retain(i8* [[INVALUE:%.*]])
// OPT-NEXT: store i8* [[T0]], i8** [[INVALUEADDR]]
// CHECK: call i8* @_Znwm
@@ -19,7 +19,7 @@ void test_new(id invalue) {
// CHECK: call i8* @_Znwm
// CHECK-NEXT: {{bitcast i8\*.*to i8\*\*}}
// UNOPT-NEXT: store i8* null, i8**
- // OPT-NEXT: call i8* @objc_initWeak(i8** {{.*}}, i8* null)
+ // OPT-NEXT: call i8* @llvm.objc.initWeak(i8** {{.*}}, i8* null)
new weak_id;
// CHECK: call i8* @_Znwm
@@ -29,20 +29,20 @@ void test_new(id invalue) {
// CHECK: call i8* @_Znwm
// CHECK-NEXT: {{bitcast i8\*.*to i8\*\*}}
// UNOPT-NEXT: store i8* null, i8**
- // OPT-NEXT: call i8* @objc_initWeak(i8** {{.*}}, i8* null)
+ // OPT-NEXT: call i8* @llvm.objc.initWeak(i8** {{.*}}, i8* null)
new __weak id;
// CHECK: call i8* @_Znwm
- // CHECK: call i8* @objc_retain
+ // CHECK: call i8* @llvm.objc.retain
// CHECK: store i8*
new __strong id(invalue);
// CHECK: call i8* @_Znwm
- // CHECK: call i8* @objc_initWeak
+ // CHECK: call i8* @llvm.objc.initWeak
new __weak id(invalue);
- // UNOPT: call void @objc_storeStrong
- // OPT: call void @objc_release
+ // UNOPT: call void @llvm.objc.storeStrong
+ // OPT: call void @llvm.objc.release
// CHECK: ret void
}
@@ -63,13 +63,13 @@ void test_array_new() {
// CHECK-LABEL: define void @_Z11test_deletePU8__strongP11objc_objectPU6__weakS0_
void test_delete(__strong id *sptr, __weak id *wptr) {
// CHECK: br i1
- // UNOPT: call void @objc_storeStrong(i8** {{.*}}, i8* null)
+ // UNOPT: call void @llvm.objc.storeStrong(i8** {{.*}}, i8* null)
// OPT: load i8*, i8**
- // OPT-NEXT: call void @objc_release
+ // OPT-NEXT: call void @llvm.objc.release
// CHECK: call void @_ZdlPv
delete sptr;
- // CHECK: call void @objc_destroyWeak
+ // CHECK: call void @llvm.objc.destroyWeak
// CHECK: call void @_ZdlPv
delete wptr;
@@ -84,9 +84,9 @@ void test_array_delete(__strong id *sptr, __weak id *wptr) {
// CHECK-NEXT: icmp eq i8** [[BEGIN]], [[END]]
// CHECK: [[PAST:%.*]] = phi i8** [ [[END]], {{%.*}} ], [ [[CUR:%.*]],
// CHECK-NEXT: [[CUR]] = getelementptr inbounds i8*, i8** [[PAST]], i64 -1
- // UNOPT-NEXT: call void @objc_storeStrong(i8** [[CUR]], i8* null)
+ // UNOPT-NEXT: call void @llvm.objc.storeStrong(i8** [[CUR]], i8* null)
// OPT-NEXT: [[T0:%.*]] = load i8*, i8** [[CUR]]
- // OPT-NEXT: objc_release(i8* [[T0]])
+ // OPT-NEXT: llvm.objc.release(i8* [[T0]])
// CHECK-NEXT: icmp eq i8** [[CUR]], [[BEGIN]]
// CHECK: call void @_ZdaPv
delete [] sptr;
@@ -97,7 +97,7 @@ void test_array_delete(__strong id *sptr, __weak id *wptr) {
// CHECK-NEXT: icmp eq i8** [[BEGIN]], [[END]]
// CHECK: [[PAST:%.*]] = phi i8** [ [[END]], {{%.*}} ], [ [[CUR:%.*]],
// CHECK-NEXT: [[CUR]] = getelementptr inbounds i8*, i8** [[PAST]], i64 -1
- // CHECK-NEXT: call void @objc_destroyWeak(i8** [[CUR]])
+ // CHECK-NEXT: call void @llvm.objc.destroyWeak(i8** [[CUR]])
// CHECK-NEXT: icmp eq i8** [[CUR]], [[BEGIN]]
// CHECK: call void @_ZdaPv
delete [] wptr;
diff --git a/test/CodeGenObjCXX/arc-pseudo-destructors.mm b/test/CodeGenObjCXX/arc-pseudo-destructors.mm
index b79d9a3447..191712d79c 100644
--- a/test/CodeGenObjCXX/arc-pseudo-destructors.mm
+++ b/test/CodeGenObjCXX/arc-pseudo-destructors.mm
@@ -4,18 +4,18 @@
void test_objc_object_pseudo_dtor(__strong id *ptr, __weak id *wptr) {
// CHECK: load i8**, i8***
// CHECK-NEXT: load i8*, i8**
- // CHECK-NEXT: call void @objc_release
+ // CHECK-NEXT: call void @llvm.objc.release
ptr->~id();
- // CHECK: call void @objc_destroyWeak(i8** {{%.*}})
+ // CHECK: call void @llvm.objc.destroyWeak(i8** {{%.*}})
wptr->~id();
// CHECK: load i8**, i8***
// CHECK-NEXT: load i8*, i8**
- // CHECK-NEXT: call void @objc_release
+ // CHECK-NEXT: call void @llvm.objc.release
(*ptr).~id();
- // CHECK: call void @objc_destroyWeak(i8** {{%.*}})
+ // CHECK: call void @llvm.objc.destroyWeak(i8** {{%.*}})
(*wptr).~id();
// CHECK: ret void
}
diff --git a/test/CodeGenObjCXX/arc-references.mm b/test/CodeGenObjCXX/arc-references.mm
index 983b211dfb..aa0b85f2a0 100644
--- a/test/CodeGenObjCXX/arc-references.mm
+++ b/test/CodeGenObjCXX/arc-references.mm
@@ -10,17 +10,17 @@ void callee();
// CHECK-LABEL: define void @_Z5test0v()
void test0() {
// CHECK: call i8* @_Z9getObjectv
- // CHECK-NEXT: call i8* @objc_retainAutoreleasedReturnValue
+ // CHECK-NEXT: call i8* @llvm.objc.retainAutoreleasedReturnValue
const __strong id &ref1 = getObject();
// CHECK: call void @_Z6calleev
callee();
// CHECK: call i8* @_Z9getObjectv
- // CHECK-NEXT: call i8* @objc_retainAutoreleasedReturnValue
- // CHECK-NEXT: call i8* @objc_autorelease
+ // CHECK-NEXT: call i8* @llvm.objc.retainAutoreleasedReturnValue
+ // CHECK-NEXT: call i8* @llvm.objc.autorelease
const __autoreleasing id &ref2 = getObject();
// CHECK: call void @_Z6calleev
callee();
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: ret
}
@@ -39,12 +39,12 @@ typedef __strong id strong_id;
//CHECK: define void @_Z5test3v
void test3() {
// CHECK: [[REF:%.*]] = alloca i8**, align 8
- // CHECK: call i8* @objc_initWeak
+ // CHECK: call i8* @llvm.objc.initWeak
// CHECK-NEXT: store i8**
const __weak id &ref = strong_id();
// CHECK-NEXT: call void @_Z6calleev()
callee();
- // CHECK-NEXT: call void @objc_destroyWeak
+ // CHECK-NEXT: call void @llvm.objc.destroyWeak
// CHECK-NEXT: [[PTR:%.*]] = bitcast i8*** [[REF]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[PTR]])
// CHECK-NEXT: ret void
@@ -52,11 +52,11 @@ void test3() {
// CHECK-LABEL: define void @_Z5test4RU8__strongP11objc_object
void test4(__strong id &x) {
- // CHECK: call i8* @objc_retain
+ // CHECK: call i8* @llvm.objc.retain
__strong A* const &ar = x;
// CHECK: store i32 17, i32*
int i = 17;
- // CHECK: call void @objc_release(
+ // CHECK: call void @llvm.objc.release(
// CHECK: ret void
}
@@ -66,14 +66,14 @@ void sink(__strong A* &&);
void test5(__strong id &x) {
// CHECK: [[REFTMP:%.*]] = alloca {{%.*}}*, align 8
// CHECK: [[I:%.*]] = alloca i32, align 4
- // CHECK: [[OBJ_ID:%.*]] = call i8* @objc_retain(
+ // CHECK: [[OBJ_ID:%.*]] = call i8* @llvm.objc.retain(
// CHECK-NEXT: [[OBJ_A:%.*]] = bitcast i8* [[OBJ_ID]] to [[A:%[a-zA-Z0-9]+]]*
// CHECK-NEXT: store [[A]]* [[OBJ_A]], [[A]]** [[REFTMP:%[a-zA-Z0-9]+]]
// CHECK-NEXT: call void @_Z4sinkOU8__strongP1A
sink(x);
// CHECK-NEXT: [[OBJ_A:%[a-zA-Z0-9]+]] = load [[A]]*, [[A]]** [[REFTMP]]
// CHECK-NEXT: [[OBJ_ID:%[a-zA-Z0-9]+]] = bitcast [[A]]* [[OBJ_A]] to i8*
- // CHECK-NEXT: call void @objc_release
+ // CHECK-NEXT: call void @llvm.objc.release
// CHECK-NEXT: [[IPTR1:%.*]] = bitcast i32* [[I]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 4, i8* [[IPTR1]])
// CHECK-NEXT: store i32 17, i32
@@ -85,7 +85,7 @@ void test5(__strong id &x) {
// CHECK-LABEL: define internal void @__cxx_global_var_init(
// CHECK: call i8* @_Z9getObjectv
-// CHECK-NEXT: call i8* @objc_retainAutoreleasedReturnValue
+// CHECK-NEXT: call i8* @llvm.objc.retainAutoreleasedReturnValue
const __strong id &global_ref = getObject();
// Note: we intentionally don't release the object.
diff --git a/test/CodeGenObjCXX/arc-returns-inner-reference-ptr.mm b/test/CodeGenObjCXX/arc-returns-inner-reference-ptr.mm
index c4ab34ea0e..fa9b4219f5 100644
--- a/test/CodeGenObjCXX/arc-returns-inner-reference-ptr.mm
+++ b/test/CodeGenObjCXX/arc-returns-inner-reference-ptr.mm
@@ -15,8 +15,8 @@ void foo() {
// CHECK: [[T0:%.*]] = load {{%.*}} {{%.*}}, align 8
// CHECK: [[T1:%.*]] = bitcast {{%.*}} [[T0]] to i8*
-// call i8* @objc_retainAutorelease(i8* [[T1]]) nounwind
+// call i8* @llvm.objc.retainAutorelease(i8* [[T1]]) nounwind
// CHECK: [[T2:%.*]] = load {{%.*}} {{%.*}}, align 8
// CHECK: [[T3:%.*]] = bitcast {{%.*}} [[T2]] to i8*
-// call i8* @objc_retainAutorelease(i8* [[T3]]) nounwind
+// call i8* @llvm.objc.retainAutorelease(i8* [[T3]]) nounwind
diff --git a/test/CodeGenObjCXX/arc-special-member-functions.mm b/test/CodeGenObjCXX/arc-special-member-functions.mm
index d620187d70..04ffbbe021 100644
--- a/test/CodeGenObjCXX/arc-special-member-functions.mm
+++ b/test/CodeGenObjCXX/arc-special-member-functions.mm
@@ -91,7 +91,7 @@ void test_ObjCMember_copy_assign(ObjCMember m1, ObjCMember m2) {
// Implicitly-generated copy assignment operator for ObjCMember
// CHECK: {{define linkonce_odr.*@_ZN10ObjCMemberaSERKS_}}
-// CHECK: call void @objc_storeStrong
+// CHECK: call void @llvm.objc.storeStrong
// CHECK: ret
// CHECK-LABEL: define void @_Z47test_ObjCArrayMember_default_construct_destructv
@@ -120,7 +120,7 @@ void test_ObjCArrayMember_copy_assign(ObjCArrayMember m1, ObjCArrayMember m2) {
// Implicitly-generated copy assignment operator for ObjCArrayMember
// CHECK: {{define linkonce_odr.*@_ZN15ObjCArrayMemberaSERKS_}}
-// CHECK: call void @objc_storeStrong
+// CHECK: call void @llvm.objc.storeStrong
// CHECK-NEXT: br label
// CHECK: ret
@@ -155,13 +155,13 @@ void test_ObjCBlockMember_copy_assign(ObjCBlockMember m1, ObjCBlockMember m2) {
// CHECK: [[T0:%.*]] = getelementptr inbounds [[T:%.*]], [[T:%.*]]* {{%.*}}, i32 0, i32 0
// CHECK-NEXT: [[T1:%.*]] = load i32 (i32)*, i32 (i32)** [[T0]], align 8
// CHECK-NEXT: [[T2:%.*]] = bitcast i32 (i32)* [[T1]] to i8*
-// CHECK-NEXT: [[T3:%.*]] = call i8* @objc_retainBlock(i8* [[T2]])
+// CHECK-NEXT: [[T3:%.*]] = call i8* @llvm.objc.retainBlock(i8* [[T2]])
// CHECK-NEXT: [[T4:%.*]] = bitcast i8* [[T3]] to i32 (i32)*
// CHECK-NEXT: [[T5:%.*]] = getelementptr inbounds [[T]], [[T]]* {{%.*}}, i32 0, i32 0
// CHECK-NEXT: [[T6:%.*]] = load i32 (i32)*, i32 (i32)** [[T5]], align 8
// CHECK-NEXT: store i32 (i32)* [[T4]], i32 (i32)** [[T5]]
// CHECK-NEXT: [[T7:%.*]] = bitcast i32 (i32)* [[T6]] to i8*
-// CHECK-NEXT: call void @objc_release(i8* [[T7]])
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[T7]])
// CHECK-NEXT: ret
// Check that the Weak object passed to this constructor is not destructed after
@@ -179,13 +179,13 @@ void test_ObjCBlockMember_copy_assign(ObjCBlockMember m1, ObjCBlockMember m2) {
// Implicitly-generated destructor for ObjCMember
// CHECK-LABEL: define linkonce_odr void @_ZN10ObjCMemberD2Ev
-// CHECK: call void @objc_storeStrong
+// CHECK: call void @llvm.objc.storeStrong
// CHECK: ret void
// Implicitly-generated copy constructor for ObjCMember
// CHECK-LABEL: define linkonce_odr void @_ZN10ObjCMemberC2ERKS_
// CHECK-NOT: objc_release
-// CHECK: call i8* @objc_retain
+// CHECK: call i8* @llvm.objc.retain
// CHECK-NEXT: store i8*
// CHECK-NEXT: ret void
@@ -201,14 +201,14 @@ void test_ObjCBlockMember_copy_assign(ObjCBlockMember m1, ObjCBlockMember m2) {
// CHECK-NEXT: br label
// CHECK: [[PAST:%.*]] = phi i8** [ [[END]], {{%.*}} ], [ [[CUR:%.*]], {{%.*}} ]
// CHECK-NEXT: [[CUR]] = getelementptr inbounds i8*, i8** [[PAST]], i64 -1
-// CHECK-NEXT: call void @objc_storeStrong(i8** [[CUR]], i8* null)
+// CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[CUR]], i8* null)
// CHECK-NEXT: [[T1:%.*]] = icmp eq i8** [[CUR]], [[BEGIN]]
// CHECK-NEXT: br i1 [[T1]],
// CHECK: ret void
// Implicitly-generated copy constructor for ObjCArrayMember
// CHECK-LABEL: define linkonce_odr void @_ZN15ObjCArrayMemberC2ERKS_
-// CHECK: call i8* @objc_retain
+// CHECK: call i8* @llvm.objc.retain
// CHECK-NEXT: store i8*
// CHECK: br i1
// CHECK: ret
@@ -220,11 +220,11 @@ void test_ObjCBlockMember_copy_assign(ObjCBlockMember m1, ObjCBlockMember m2) {
// Implicitly-generated destructor for ObjCBlockMember
// CHECK-LABEL: define linkonce_odr void @_ZN15ObjCBlockMemberD2Ev
-// CHECK: call void @objc_storeStrong(i8*
+// CHECK: call void @llvm.objc.storeStrong(i8*
// CHECK: ret
// Implicitly-generated copy constructor for ObjCBlockMember
// CHECK-LABEL: define linkonce_odr void @_ZN15ObjCBlockMemberC2ERKS_
-// CHECK: call i8* @objc_retainBlock
+// CHECK: call i8* @llvm.objc.retainBlock
// CHECK: ret
diff --git a/test/CodeGenObjCXX/arc-weak.mm b/test/CodeGenObjCXX/arc-weak.mm
index 8fd03379aa..cb1bc95c93 100644
--- a/test/CodeGenObjCXX/arc-weak.mm
+++ b/test/CodeGenObjCXX/arc-weak.mm
@@ -15,9 +15,9 @@ void test0(__weak B **src) {
// CHECK-NEXT: [[T1:%.*]] = bitcast [[B]]** [[T0]] to [[A]]**
// CHECK-NEXT: [[T2:%.*]] = bitcast [[A]]** [[DEST]] to i8**
// CHECK-NEXT: [[T3:%.*]] = bitcast [[A]]** [[T1]] to i8**
-// CHECK-NEXT: call void @objc_copyWeak(i8** [[T2]], i8** [[T3]])
+// CHECK-NEXT: call void @llvm.objc.copyWeak(i8** [[T2]], i8** [[T3]])
// CHECK-NEXT: [[T0:%.*]] = bitcast [[A]]** [[DEST]] to i8**
-// CHECK: call void @objc_destroyWeak(i8** [[T0]])
+// CHECK: call void @llvm.objc.destroyWeak(i8** [[T0]])
void test1(__weak B **src) {
__weak A *dest = static_cast<__weak B*&&>(*src);
@@ -29,6 +29,6 @@ void test1(__weak B **src) {
// CHECK-NEXT: [[T1:%.*]] = bitcast [[B]]** [[T0]] to [[A]]**
// CHECK-NEXT: [[T2:%.*]] = bitcast [[A]]** [[DEST]] to i8**
// CHECK-NEXT: [[T3:%.*]] = bitcast [[A]]** [[T1]] to i8**
-// CHECK-NEXT: call void @objc_moveWeak(i8** [[T2]], i8** [[T3]])
+// CHECK-NEXT: call void @llvm.objc.moveWeak(i8** [[T2]], i8** [[T3]])
// CHECK-NEXT: [[T0:%.*]] = bitcast [[A]]** [[DEST]] to i8**
-// CHECK: call void @objc_destroyWeak(i8** [[T0]])
+// CHECK: call void @llvm.objc.destroyWeak(i8** [[T0]])
diff --git a/test/CodeGenObjCXX/arc.mm b/test/CodeGenObjCXX/arc.mm
index 5e66206ad5..b7f099d4e8 100644
--- a/test/CodeGenObjCXX/arc.mm
+++ b/test/CodeGenObjCXX/arc.mm
@@ -20,21 +20,21 @@ void test0(__weak id *wp, __weak volatile id *wvp) {
// TODO: in the non-volatile case, we do not need to be reloading.
// CHECK: [[T0:%.*]] = call i8* @_Z12test0_helperv()
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: [[T2:%.*]] = load i8**, i8*** {{%.*}}, align 8
- // CHECK-NEXT: [[T3:%.*]] = call i8* @objc_storeWeak(i8** [[T2]], i8* [[T1]])
- // CHECK-NEXT: [[T4:%.*]] = call i8* @objc_retain(i8* [[T3]])
+ // CHECK-NEXT: [[T3:%.*]] = call i8* @llvm.objc.storeWeak(i8** [[T2]], i8* [[T1]])
+ // CHECK-NEXT: [[T4:%.*]] = call i8* @llvm.objc.retain(i8* [[T3]])
// CHECK-NEXT: store i8* [[T4]], i8**
- // CHECK-NEXT: call void @objc_release(i8* [[T1]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]])
id x = *wp = test0_helper();
// CHECK: [[T0:%.*]] = call i8* @_Z12test0_helperv()
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: [[T2:%.*]] = load i8**, i8*** {{%.*}}, align 8
- // CHECK-NEXT: [[T3:%.*]] = call i8* @objc_storeWeak(i8** [[T2]], i8* [[T1]])
- // CHECK-NEXT: [[T4:%.*]] = call i8* @objc_loadWeakRetained(i8** [[T2]])
+ // CHECK-NEXT: [[T3:%.*]] = call i8* @llvm.objc.storeWeak(i8** [[T2]], i8* [[T1]])
+ // CHECK-NEXT: [[T4:%.*]] = call i8* @llvm.objc.loadWeakRetained(i8** [[T2]])
// CHECK-NEXT: store i8* [[T4]], i8**
- // CHECK-NEXT: call void @objc_release(i8* [[T1]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T1]])
id y = *wvp = test0_helper();
}
@@ -69,7 +69,7 @@ void test34(int cond) {
// CHECK-NEXT: store i8* null, i8** [[STRONG]]
// CHECK-NEXT: [[WEAKP:%.*]] = bitcast i8** [[WEAK]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[WEAKP]])
- // CHECK-NEXT: call i8* @objc_initWeak(i8** [[WEAK]], i8* null)
+ // CHECK-NEXT: call i8* @llvm.objc.initWeak(i8** [[WEAK]], i8* null)
// CHECK-NEXT: [[T0:%.*]] = load i32, i32* [[COND]]
// CHECK-NEXT: [[T1:%.*]] = icmp ne i32 [[T0]], 0
@@ -85,11 +85,11 @@ void test34(int cond) {
// CHECK-NEXT: [[T0:%.*]] = icmp eq i8** [[ARG]], null
// CHECK-NEXT: br i1 [[T0]],
// CHECK: [[T0:%.*]] = load i8*, i8** [[TEMP1]]
- // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retain(i8* [[T0]])
+ // CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.retain(i8* [[T0]])
// CHECK-NEXT: call void (...) @clang.arc.use(i8* [[W0]])
// CHECK-NEXT: [[T2:%.*]] = load i8*, i8** [[ARG]]
// CHECK-NEXT: store i8* [[T1]], i8** [[ARG]]
- // CHECK-NEXT: call void @objc_release(i8* [[T2]])
+ // CHECK-NEXT: call void @llvm.objc.release(i8* [[T2]])
// CHECK-NEXT: br label
// CHECK: [[T0:%.*]] = load i32, i32* [[COND]]
@@ -99,7 +99,7 @@ void test34(int cond) {
// CHECK-NEXT: [[T1:%.*]] = select i1 [[T0]], i8** null, i8** [[TEMP2]]
// CHECK-NEXT: store i1 false, i1* [[CONDCLEANUP]]
// CHECK-NEXT: br i1 [[T0]],
- // CHECK: [[T0:%.*]] = call i8* @objc_loadWeakRetained(i8** [[ARG]])
+ // CHECK: [[T0:%.*]] = call i8* @llvm.objc.loadWeakRetained(i8** [[ARG]])
// CHECK-NEXT: store i8* [[T0]], i8** [[CONDCLEANUPSAVE]]
// CHECK-NEXT: store i1 true, i1* [[CONDCLEANUP]]
// CHECK-NEXT: store i8* [[T0]], i8** [[TEMP2]]
@@ -108,10 +108,10 @@ void test34(int cond) {
// CHECK-NEXT: [[T0:%.*]] = icmp eq i8** [[ARG]], null
// CHECK-NEXT: br i1 [[T0]],
// CHECK: [[T0:%.*]] = load i8*, i8** [[TEMP2]]
- // CHECK-NEXT: call i8* @objc_storeWeak(i8** [[ARG]], i8* [[T0]])
+ // CHECK-NEXT: call i8* @llvm.objc.storeWeak(i8** [[ARG]], i8* [[T0]])
// CHECK-NEXT: br label
- // CHECK: call void @objc_destroyWeak(i8** [[WEAK]])
+ // CHECK: call void @llvm.objc.destroyWeak(i8** [[WEAK]])
// CHECK: ret void
}
@@ -126,36 +126,36 @@ struct Test35_Helper {
void test35(Test35_Helper x0, Test35_Helper *x0p) {
// CHECK: call void @llvm.lifetime.start
// CHECK: call i8* @_ZN13Test35_Helper11makeObject1Ev
- // CHECK-NOT: call i8* @objc_retain
+ // CHECK-NOT: call i8* @llvm.objc.retain
id obj1 = Test35_Helper::makeObject1();
// CHECK: call void @llvm.lifetime.start
// CHECK: call i8* @_ZN13Test35_Helper11makeObject2Ev
- // CHECK-NOT: call i8* @objc_retain
+ // CHECK-NOT: call i8* @llvm.objc.retain
id obj2 = x0.makeObject2();
// CHECK: call void @llvm.lifetime.start
// CHECK: call i8* @_ZN13Test35_Helper11makeObject2Ev
- // CHECK-NOT: call i8* @objc_retain
+ // CHECK-NOT: call i8* @llvm.objc.retain
id obj3 = x0p->makeObject2();
id (Test35_Helper::*pmf)() __attribute__((ns_returns_retained))
= &Test35_Helper::makeObject2;
// CHECK: call void @llvm.lifetime.start
// CHECK: call i8* %
- // CHECK-NOT: call i8* @objc_retain
+ // CHECK-NOT: call i8* @llvm.objc.retain
id obj4 = (x0.*pmf)();
// CHECK: call void @llvm.lifetime.start
// CHECK: call i8* %
- // CHECK-NOT: call i8* @objc_retain
+ // CHECK-NOT: call i8* @llvm.objc.retain
id obj5 = (x0p->*pmf)();
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: call void @llvm.lifetime.end
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: call void @llvm.lifetime.end
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: call void @llvm.lifetime.end
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: call void @llvm.lifetime.end
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: call void @llvm.lifetime.end
// CHECK-NEXT: ret void
}
@@ -164,36 +164,36 @@ void test35(Test35_Helper x0, Test35_Helper *x0p) {
void test35b(Test35_Helper x0, Test35_Helper *x0p) {
// CHECK: call void @llvm.lifetime.start
// CHECK: call i8* @_ZN13Test35_Helper11makeObject3Ev
- // CHECK: call i8* @objc_retain
+ // CHECK: call i8* @llvm.objc.retain
id obj1 = Test35_Helper::makeObject3();
// CHECK: call void @llvm.lifetime.start
// CHECK: call i8* @_ZN13Test35_Helper11makeObject4Ev
- // CHECK: call i8* @objc_retain
+ // CHECK: call i8* @llvm.objc.retain
id obj2 = x0.makeObject4();
// CHECK: call void @llvm.lifetime.start
// CHECK: call i8* @_ZN13Test35_Helper11makeObject4Ev
- // CHECK: call i8* @objc_retain
+ // CHECK: call i8* @llvm.objc.retain
id obj3 = x0p->makeObject4();
id (Test35_Helper::*pmf)() = &Test35_Helper::makeObject4;
// CHECK: call void @llvm.lifetime.start
// CHECK: call i8* %
- // CHECK: call i8* @objc_retain
+ // CHECK: call i8* @llvm.objc.retain
id obj4 = (x0.*pmf)();
// CHECK: call void @llvm.lifetime.start
// CHECK: call i8* %
- // CHECK: call i8* @objc_retain
+ // CHECK: call i8* @llvm.objc.retain
id obj5 = (x0p->*pmf)();
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: call void @llvm.lifetime.end
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: call void @llvm.lifetime.end
// CHECK: call void @llvm.lifetime.end
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: call void @llvm.lifetime.end
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: call void @llvm.lifetime.end
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK: call void @llvm.lifetime.end
// CHECK-NEXT: ret void
}
@@ -201,10 +201,10 @@ void test35b(Test35_Helper x0, Test35_Helper *x0p) {
// rdar://problem/9603128
// CHECK-LABEL: define i8* @_Z6test36P11objc_object(
id test36(id z) {
- // CHECK: objc_retain
- // CHECK: objc_retain
- // CHECK: objc_release
- // CHECK: objc_autoreleaseReturnValue
+ // CHECK: llvm.objc.retain
+ // CHECK: llvm.objc.retain
+ // CHECK: llvm.objc.release
+ // CHECK: llvm.objc.autoreleaseReturnValue
return z;
}
@@ -224,7 +224,7 @@ template void test37<Test37>(Test37 *a);
// CHECK-LABEL: define weak_odr void @_Z6test37I6Test37EvPT_(
// CHECK: [[T0:%.*]] = call [[NSARRAY]]* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to [[NSARRAY]]* (i8*, i8*)*)(
// CHECK-NEXT: [[T1:%.*]] = bitcast [[NSARRAY]]* [[T0]] to i8*
-// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
+// CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: [[COLL:%.*]] = bitcast i8* [[T2]] to [[NSARRAY]]*
// Make sure it's not immediately released before starting the iteration.
@@ -242,7 +242,7 @@ template void test37<Test37>(Test37 *a);
// This bitcast is for the final release.
// CHECK: [[T0:%.*]] = bitcast [[NSARRAY]]* [[COLL]] to i8*
-// CHECK-NEXT: call void @objc_release(i8* [[T0]])
+// CHECK-NEXT: call void @llvm.objc.release(i8* [[T0]])
template<typename T>
void send_release() {
@@ -252,10 +252,10 @@ void send_release() {
// CHECK-LABEL: define weak_odr void @_Z12send_releaseIiEvv(
// CHECK: call %0* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
// CHECK-NEXT: bitcast
-// CHECK-NEXT: call i8* @objc_retainAutoreleasedReturnValue
+// CHECK-NEXT: call i8* @llvm.objc.retainAutoreleasedReturnValue
// CHECK-NEXT: bitcast
// CHECK-NEXT: bitcast
-// CHECK-NEXT: call void @objc_release
+// CHECK-NEXT: call void @llvm.objc.release
// CHECK-NEXT: ret void
template void send_release<int>();
@@ -268,9 +268,9 @@ Test37 *instantiate_init() {
// CHECK-LABEL: define weak_odr %2* @_Z16instantiate_initIiEP6Test37v
// CHECK: call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
// CHECK: call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
-// CHECK: call i8* @objc_retain
-// CHECK: call void @objc_release
-// CHECK: call i8* @objc_autoreleaseReturnValue
+// CHECK: call i8* @llvm.objc.retain
+// CHECK: call void @llvm.objc.release
+// CHECK: call i8* @llvm.objc.autoreleaseReturnValue
template Test37* instantiate_init<int>();
// Just make sure that the AST invariants hold properly here,
@@ -322,7 +322,7 @@ template void test40_helper<int>();
// CHECK-NEXT: store i8* [[T0]], i8** [[TEMP]]
// CHECK: @objc_msgSend
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[TEMP]]
-// CHECK-NEXT: call i8* @objc_retain(i8* [[T0]])
+// CHECK-NEXT: call i8* @llvm.objc.retain(i8* [[T0]])
// Check that moves out of __weak variables are compiled to use objc_moveWeak.
void test41(__weak id &&x) {
@@ -332,5 +332,5 @@ void test41(__weak id &&x) {
// CHECK: [[X:%.*]] = alloca i8**
// CHECK: [[Y:%.*]] = alloca i8*
// CHECK: [[T0:%.*]] = load i8**, i8*** [[X]]
-// CHECK-NEXT: call void @objc_moveWeak(i8** [[Y]], i8** [[T0]])
-// CHECK-NEXT: call void @objc_destroyWeak(i8** [[Y]])
+// CHECK-NEXT: call void @llvm.objc.moveWeak(i8** [[Y]], i8** [[T0]])
+// CHECK-NEXT: call void @llvm.objc.destroyWeak(i8** [[Y]])
diff --git a/test/CodeGenObjCXX/block-nested-in-lambda.mm b/test/CodeGenObjCXX/block-nested-in-lambda.mm
index a538d1bd2b..4122d89e8f 100644
--- a/test/CodeGenObjCXX/block-nested-in-lambda.mm
+++ b/test/CodeGenObjCXX/block-nested-in-lambda.mm
@@ -51,27 +51,27 @@ void test0() {
// CHECK: store %[[STRUCT_BLOCK_DESCRIPTOR]]* bitcast ({ i64, i64, i8*, i8*, i8*, i64 }* @"__block_descriptor_56_8_32s40s_e5_v8@?0l" to %[[STRUCT_BLOCK_DESCRIPTOR]]*), %[[STRUCT_BLOCK_DESCRIPTOR]]** %[[BLOCK_DESCRIPTOR]], align 8
// CHECK-LABEL: define linkonce_odr hidden void @__copy_helper_block_8_32s40s(
-// CHECK-NOT: call void @objc_storeStrong(
+// CHECK-NOT: call void @llvm.objc.storeStrong(
// CHECK: %[[V4:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8** }>, <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8** }>* %{{.*}}, i32 0, i32 5
// CHECK: %[[V5:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8** }>, <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8** }>* %{{.*}}, i32 0, i32 5
// CHECK: %[[BLOCKCOPY_SRC:.*]] = load i8*, i8** %[[V4]], align 8
// CHECK: store i8* null, i8** %[[V5]], align 8
-// CHECK: call void @objc_storeStrong(i8** %[[V5]], i8* %[[BLOCKCOPY_SRC]])
+// CHECK: call void @llvm.objc.storeStrong(i8** %[[V5]], i8* %[[BLOCKCOPY_SRC]])
// CHECK: %[[V6:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8** }>, <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8** }>* %{{.*}}, i32 0, i32 6
// CHECK: %[[V7:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8** }>, <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8** }>* %{{.*}}, i32 0, i32 6
// CHECK: %[[BLOCKCOPY_SRC2:.*]] = load i8*, i8** %[[V6]], align 8
// CHECK: store i8* null, i8** %[[V7]], align 8
-// CHECK: call void @objc_storeStrong(i8** %[[V7]], i8* %[[BLOCKCOPY_SRC2]])
-// CHECK-NOT: call void @objc_storeStrong(
+// CHECK: call void @llvm.objc.storeStrong(i8** %[[V7]], i8* %[[BLOCKCOPY_SRC2]])
+// CHECK-NOT: call void @llvm.objc.storeStrong(
// CHECK: ret void
// CHECK-LABEL: define linkonce_odr hidden void @__destroy_helper_block_8_32s40s(
// CHECK: %[[V2:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8** }>, <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8** }>* %{{.*}}, i32 0, i32 5
// CHECK: %[[V3:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8** }>, <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8*, i8*, i8** }>* %{{.*}}, i32 0, i32 6
-// CHECK-NOT: call void @objc_storeStrong(
-// CHECK: call void @objc_storeStrong(i8** %[[V3]], i8* null)
-// CHECK: call void @objc_storeStrong(i8** %[[V2]], i8* null)
-// CHECK-NOT: call void @objc_storeStrong(
+// CHECK-NOT: call void @llvm.objc.storeStrong(
+// CHECK: call void @llvm.objc.storeStrong(i8** %[[V3]], i8* null)
+// CHECK: call void @llvm.objc.storeStrong(i8** %[[V2]], i8* null)
+// CHECK-NOT: call void @llvm.objc.storeStrong(
// CHECK: ret void
void test1() {
diff --git a/test/CodeGenObjCXX/destroy.mm b/test/CodeGenObjCXX/destroy.mm
index 371f729afa..4a0451ec94 100644
--- a/test/CodeGenObjCXX/destroy.mm
+++ b/test/CodeGenObjCXX/destroy.mm
@@ -44,7 +44,7 @@ void test4() {
// CHECK: call void @_ZN8tderivedIiED1Ev
// CHECK-LABEL: define linkonce_odr void @_ZN7derivedD2Ev
-// CHECK: call void @objc_storeStrong(i8** {{.*}}, i8* null)
+// CHECK: call void @llvm.objc.storeStrong(i8** {{.*}}, i8* null)
// CHECK-LABEL: define linkonce_odr void @_ZN8tderivedIiED2Ev
-// CHECK: call void @objc_storeStrong(i8** {{.*}}, i8* null)
+// CHECK: call void @llvm.objc.storeStrong(i8** {{.*}}, i8* null)
diff --git a/test/CodeGenObjCXX/lambda-expressions.mm b/test/CodeGenObjCXX/lambda-expressions.mm
index f60655c61b..ff7450f206 100644
--- a/test/CodeGenObjCXX/lambda-expressions.mm
+++ b/test/CodeGenObjCXX/lambda-expressions.mm
@@ -20,8 +20,8 @@ fp f() { auto x = []{ return 3; }; return x; }
// ARC-LABEL: define internal i32 ()* @"_ZZ1fvENK3$_0cvU13block_pointerFivEEv"
// ARC: store i8* bitcast (i8** @_NSConcreteStackBlock to i8*)
// ARC: store i8* bitcast (i32 (i8*)* @"___ZZ1fvENK3$_0cvU13block_pointerFivEEv_block_invoke" to i8*)
-// ARC: call i8* @objc_retainBlock
-// ARC: call i8* @objc_autoreleaseReturnValue
+// ARC: call i8* @llvm.objc.retainBlock
+// ARC: call i8* @llvm.objc.autoreleaseReturnValue
typedef int (^fp)();
fp global;
@@ -35,8 +35,8 @@ void f2() { global = []{ return 3; }; }
// ARC: define void @_Z2f2v() [[NUW:#[0-9]+]] {
// ARC: store i8* bitcast (i32 (i8*)* @___Z2f2v_block_invoke to i8*),
-// ARC: call i8* @objc_retainBlock
-// ARC: call void @objc_release
+// ARC: call i8* @llvm.objc.retainBlock
+// ARC: call void @llvm.objc.release
// ARC-LABEL: define internal i32 @___Z2f2v_block_invoke
// ARC: call i32 @"_ZZ2f2vENK3$_1clEv
@@ -72,7 +72,7 @@ void take_block(void (^block)()) { block(); }
// ARC: store i32 %{{.*}}, i32* %[[CAPTURE1]]
// ARC-LABEL: define internal void @"_ZZ10-[Foo foo]ENK3$_4clEv"(
-// ARC-NOT: @objc_storeStrong(
+// ARC-NOT: @llvm.objc.storeStrong(
// ARC: ret void
// ARC: define internal void @"___ZZN13LambdaCapture4foo1ERiENK3$_3clEv_block_invoke"
diff --git a/test/CodeGenObjCXX/literals.mm b/test/CodeGenObjCXX/literals.mm
index a42070b00c..0a14d330bd 100644
--- a/test/CodeGenObjCXX/literals.mm
+++ b/test/CodeGenObjCXX/literals.mm
@@ -29,7 +29,7 @@ void test_array() {
// CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 1, i8* [[TMP_CAST]])
// CHECK-NEXT: call void @_ZN1XC1Ev({{.*}} [[TMPX]])
// CHECK-NEXT: [[OBJECT0:%[a-zA-Z0-9.]+]] = invoke i8* @_ZNK1XcvP11objc_objectEv
- // CHECK: [[RET0:%[a-zA-Z0-9.]+]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[OBJECT0]])
+ // CHECK: [[RET0:%[a-zA-Z0-9.]+]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[OBJECT0]])
// CHECK: store i8* [[RET0]], i8** [[ELEMENT0]]
// Initializing the second element
@@ -38,36 +38,36 @@ void test_array() {
// CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 1, i8* [[TMP_CAST]])
// CHECK-NEXT: invoke void @_ZN1YC1Ev({{.*}} [[TMPY]])
// CHECK: [[OBJECT1:%[a-zA-Z0-9.]+]] = invoke i8* @_ZNK1YcvP11objc_objectEv
- // CHECK: [[RET1:%[a-zA-Z0-9.]+]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[OBJECT1]])
+ // CHECK: [[RET1:%[a-zA-Z0-9.]+]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[OBJECT1]])
// CHECK: store i8* [[RET1]], i8** [[ELEMENT1]]
// Build the array
// CHECK: {{invoke.*@objc_msgSend}}
- // CHECK: call i8* @objc_retainAutoreleasedReturnValue
+ // CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
id arr = @[ X(), Y() ];
// Destroy temporaries
// CHECK-NOT: ret void
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK-NOT: ret void
// CHECK: invoke void @_ZN1YD1Ev
// CHECK-NOT: ret void
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK-NEXT: call void @_ZN1XD1Ev
// CHECK-NOT: ret void
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK-NEXT: [[PTR2:%.*]] = bitcast i8** [[ARR]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[PTR2]])
// CHECK-NEXT: ret void
// Check cleanups
- // CHECK: call void @objc_release
- // CHECK-NOT: call void @objc_release
+ // CHECK: call void @llvm.objc.release
+ // CHECK-NOT: call void @llvm.objc.release
// CHECK: invoke void @_ZN1YD1Ev
- // CHECK: call void @objc_release
- // CHECK-NOT: call void @objc_release
+ // CHECK: call void @llvm.objc.release
+ // CHECK-NOT: call void @llvm.objc.release
// CHECK: invoke void @_ZN1XD1Ev
- // CHECK-NOT: call void @objc_release
+ // CHECK-NOT: call void @llvm.objc.release
// CHECK: unreachable
}
@@ -83,43 +83,43 @@ void test_array_instantiation() {
// CHECK: [[ELEMENT0:%[a-zA-Z0-9.]+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[OBJECTS]], i64 0, i64 0
// CHECK: call void @_ZN1XC1Ev
// CHECK-NEXT: [[OBJECT0:%[a-zA-Z0-9.]+]] = invoke i8* @_ZNK1XcvP11objc_objectEv
- // CHECK: [[RET0:%[a-zA-Z0-9.]+]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[OBJECT0]])
+ // CHECK: [[RET0:%[a-zA-Z0-9.]+]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[OBJECT0]])
// CHECK: store i8* [[RET0]], i8** [[ELEMENT0]]
// Initializing the second element
// CHECK: [[ELEMENT1:%[a-zA-Z0-9.]+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[OBJECTS]], i64 0, i64 1
// CHECK: invoke void @_ZN1YC1Ev
// CHECK: [[OBJECT1:%[a-zA-Z0-9.]+]] = invoke i8* @_ZNK1YcvP11objc_objectEv
- // CHECK: [[RET1:%[a-zA-Z0-9.]+]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[OBJECT1]])
+ // CHECK: [[RET1:%[a-zA-Z0-9.]+]] = call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[OBJECT1]])
// CHECK: store i8* [[RET1]], i8** [[ELEMENT1]]
// Build the array
// CHECK: {{invoke.*@objc_msgSend}}
- // CHECK: call i8* @objc_retainAutoreleasedReturnValue
+ // CHECK: call i8* @llvm.objc.retainAutoreleasedReturnValue
id arr = @[ X(), Y() ];
// Destroy temporaries
// CHECK-NOT: ret void
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK-NOT: ret void
// CHECK: invoke void @_ZN1YD1Ev
// CHECK-NOT: ret void
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK-NEXT: call void @_ZN1XD1Ev
// CHECK-NOT: ret void
- // CHECK: call void @objc_release
+ // CHECK: call void @llvm.objc.release
// CHECK-NEXT: [[PTR2]] = bitcast i8** [[ARR]] to i8*
// CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 8, i8* [[PTR2]])
// CHECK-NEXT: ret void
// Check cleanups
- // CHECK: call void @objc_release
- // CHECK-NOT: call void @objc_release
+ // CHECK: call void @llvm.objc.release
+ // CHECK-NOT: call void @llvm.objc.release
// CHECK: invoke void @_ZN1YD1Ev
- // CHECK: call void @objc_release
- // CHECK-NOT: call void @objc_release
+ // CHECK: call void @llvm.objc.release
+ // CHECK-NOT: call void @llvm.objc.release
// CHECK: invoke void @_ZN1XD1Ev
- // CHECK-NOT: call void @objc_release
+ // CHECK-NOT: call void @llvm.objc.release
// CHECK: unreachable
}
diff --git a/test/CodeGenObjCXX/microsoft-abi-arc-param-order.mm b/test/CodeGenObjCXX/microsoft-abi-arc-param-order.mm
index 910a7db734..50c2e4aa41 100644
--- a/test/CodeGenObjCXX/microsoft-abi-arc-param-order.mm
+++ b/test/CodeGenObjCXX/microsoft-abi-arc-param-order.mm
@@ -13,8 +13,8 @@ struct A {
// CHECK: (<{ %struct.A, i8*, %struct.A, i8* }>* inalloca)
void test_arc_order(A a, id __attribute__((ns_consumed)) b , A c, id __attribute__((ns_consumed)) d) {
// CHECK: call x86_thiscallcc void @"??1A@@QAE@XZ"(%struct.A* %{{.*}})
- // CHECK: call void @objc_storeStrong(i8** %{{.*}}, i8* null)
+ // CHECK: call void @llvm.objc.storeStrong(i8** %{{.*}}, i8* null)
// CHECK: call x86_thiscallcc void @"??1A@@QAE@XZ"(%struct.A* %{{.*}})
- // CHECK: call void @objc_storeStrong(i8** %{{.*}}, i8* null)
+ // CHECK: call void @llvm.objc.storeStrong(i8** %{{.*}}, i8* null)
// CHECK: ret void
}
diff --git a/test/CodeGenObjCXX/mrc-weak.mm b/test/CodeGenObjCXX/mrc-weak.mm
index 1cb191fe30..b89d76cf47 100644
--- a/test/CodeGenObjCXX/mrc-weak.mm
+++ b/test/CodeGenObjCXX/mrc-weak.mm
@@ -26,15 +26,15 @@
@implementation Foo
// CHECK-LABEL: define internal void @"\01-[Foo .cxx_destruct]"
-// CHECK: call void @objc_destroyWeak
+// CHECK: call void @llvm.objc.destroyWeak
@end
void test1(__weak id x) {}
// CHECK-LABEL: define void @_Z5test1P11objc_object(
// CHECK: [[X:%.*]] = alloca i8*,
-// CHECK-NEXT: objc_initWeak
-// CHECK-NEXT: objc_destroyWeak
+// CHECK-NEXT: llvm.objc.initWeak
+// CHECK-NEXT: llvm.objc.destroyWeak
// CHECK-NEXT: ret void
void test2(id y) {
@@ -45,8 +45,8 @@ void test2(id y) {
// CHECK-NEXT: [[Z:%.*]] = alloca i8*,
// CHECK-NEXT: store
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[Y]]
-// CHECK-NEXT: call i8* @objc_initWeak(i8** [[Z]], i8* [[T0]])
-// CHECK-NEXT: call void @objc_destroyWeak(i8** [[Z]])
+// CHECK-NEXT: call i8* @llvm.objc.initWeak(i8** [[Z]], i8* [[T0]])
+// CHECK-NEXT: call void @llvm.objc.destroyWeak(i8** [[Z]])
// CHECK-NEXT: ret void
void test3(id y) {
@@ -59,8 +59,8 @@ void test3(id y) {
// CHECK-NEXT: store
// CHECK-NEXT: store i8* null, i8** [[Z]]
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[Y]]
-// CHECK-NEXT: call i8* @objc_storeWeak(i8** [[Z]], i8* [[T0]])
-// CHECK-NEXT: call void @objc_destroyWeak(i8** [[Z]])
+// CHECK-NEXT: call i8* @llvm.objc.storeWeak(i8** [[Z]], i8* [[T0]])
+// CHECK-NEXT: call void @llvm.objc.destroyWeak(i8** [[Z]])
// CHECK-NEXT: ret void
void test4(__weak id *p) {
@@ -71,7 +71,7 @@ void test4(__weak id *p) {
// CHECK-NEXT: [[Y:%.*]] = alloca i8*,
// CHECK-NEXT: store
// CHECK-NEXT: [[T0:%.*]] = load i8**, i8*** [[P]]
-// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_loadWeak(i8** [[T0]])
+// CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.loadWeak(i8** [[T0]])
// CHECK-NEXT: store i8* [[T1]], i8** [[Y]]
// CHECK-NEXT: ret void
@@ -83,7 +83,7 @@ void test5(__weak id *p) {
// CHECK-NEXT: [[Y:%.*]] = alloca i8*,
// CHECK-NEXT: store
// CHECK-NEXT: [[T0:%.*]] = load i8**, i8*** [[P]]
-// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_loadWeakRetained(i8** [[T0]])
+// CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.loadWeakRetained(i8** [[T0]])
// CHECK-NEXT: store i8* [[T1]], i8** [[Y]]
// CHECK-NEXT: ret void
@@ -96,7 +96,7 @@ void test6(__weak Foo **p) {
// CHECK-NEXT: store
// CHECK-NEXT: [[T0:%.*]] = load [[FOO]]**, [[FOO]]*** [[P]]
// CHECK-NEXT: [[T1:%.*]] = bitcast [[FOO]]** [[T0]] to i8**
-// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_loadWeakRetained(i8** [[T1]])
+// CHECK-NEXT: [[T2:%.*]] = call i8* @llvm.objc.loadWeakRetained(i8** [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[FOO]]*
// CHECK-NEXT: store [[FOO]]* [[T3]], [[FOO]]** [[Y]]
// CHECK-NEXT: ret void
@@ -114,32 +114,32 @@ void test7(void) {
// CHECK-NEXT: [[T1:%.*]] = bitcast i8* [[T0]] to [[FOO]]*
// CHECK-NEXT: [[T2:%.*]] = bitcast [[FOO]]** [[P]] to i8**
// CHECK-NEXT: [[T3:%.*]] = bitcast [[FOO]]* [[T1]] to i8*
-// CHECK-NEXT: call i8* @objc_initWeak(i8** [[T2]], i8* [[T3]])
-// CHECK: call void @objc_copyWeak
+// CHECK-NEXT: call i8* @llvm.objc.initWeak(i8** [[T2]], i8* [[T3]])
+// CHECK: call void @llvm.objc.copyWeak
// CHECK: call void @use_block
-// CHECK: call void @objc_destroyWeak
+// CHECK: call void @llvm.objc.destroyWeak
// CHECK-LABEL: define linkonce_odr hidden void @__copy_helper_block
-// CHECK: @objc_copyWeak
+// CHECK: @llvm.objc.copyWeak
// CHECK-LABEL: define linkonce_odr hidden void @__destroy_helper_block
-// CHECK: @objc_destroyWeak
+// CHECK: @llvm.objc.destroyWeak
void test8(void) {
__block __weak Foo *p = get_object();
use_block(^{ [p run ]; });
}
// CHECK-LABEL: define void @_Z5test8v
-// CHECK: call i8* @objc_initWeak
-// CHECK-NOT: call void @objc_copyWeak
+// CHECK: call i8* @llvm.objc.initWeak
+// CHECK-NOT: call void @llvm.objc.copyWeak
// CHECK: call void @use_block
-// CHECK: call void @objc_destroyWeak
+// CHECK: call void @llvm.objc.destroyWeak
// CHECK-LABEL: define internal void @__Block_byref_object_copy
-// CHECK: call void @objc_moveWeak
+// CHECK: call void @llvm.objc.moveWeak
// CHECK-LABEL: define internal void @__Block_byref_object_dispose
-// CHECK: call void @objc_destroyWeak
+// CHECK: call void @llvm.objc.destroyWeak
// CHECK-LABEL: define void @_Z14test9_baselinev()
// CHECK: define linkonce_odr hidden void @__copy_helper
diff --git a/test/CodeGenObjCXX/objc-weak.mm b/test/CodeGenObjCXX/objc-weak.mm
index 68c2d46111..afccc81106 100644
--- a/test/CodeGenObjCXX/objc-weak.mm
+++ b/test/CodeGenObjCXX/objc-weak.mm
@@ -18,9 +18,9 @@ id test0() {
// CHECK: [[THIS:%this.*]] = load [[A]]*, [[A]]** [[THISADDR]]
// CHECK: [[OBJECT:%.*]] = load [[A]]*, [[A]]** [[OBJECTADDR]]
// CHECK: [[T0:%.*]] = getelementptr inbounds [[A]], [[A]]* [[OBJECT]], i32 0, i32 0
-// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_loadWeak(i8** [[T0]])
+// CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.loadWeak(i8** [[T0]])
// CHECK-NEXT: [[T2:%.*]] = getelementptr inbounds [[A]], [[A]]* [[THIS]], i32 0, i32 0
-// CHECK-NEXT: [[T3:%.*]] = call i8* @objc_storeWeak(i8** [[T2]], i8* [[T1]])
+// CHECK-NEXT: [[T3:%.*]] = call i8* @llvm.objc.storeWeak(i8** [[T2]], i8* [[T1]])
// Move Assignment Operator
// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.A* @_ZN1AaSEOS_(
@@ -29,9 +29,9 @@ id test0() {
// CHECK: [[THIS:%this.*]] = load [[A]]*, [[A]]** [[THISADDR]]
// CHECK: [[OBJECT:%.*]] = load [[A]]*, [[A]]** [[OBJECTADDR]]
// CHECK: [[T0:%.*]] = getelementptr inbounds [[A]], [[A]]* [[OBJECT]], i32 0, i32 0
-// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_loadWeak(i8** [[T0]])
+// CHECK-NEXT: [[T1:%.*]] = call i8* @llvm.objc.loadWeak(i8** [[T0]])
// CHECK-NEXT: [[T2:%.*]] = getelementptr inbounds [[A]], [[A]]* [[THIS]], i32 0, i32 0
-// CHECK-NEXT: [[T3:%.*]] = call i8* @objc_storeWeak(i8** [[T2]], i8* [[T1]])
+// CHECK-NEXT: [[T3:%.*]] = call i8* @llvm.objc.storeWeak(i8** [[T2]], i8* [[T1]])
// Default Constructor
// CHECK-LABEL: define linkonce_odr void @_ZN1AC2Ev(
@@ -48,7 +48,7 @@ id test0() {
// CHECK: [[T0:%.*]] = getelementptr inbounds [[A]], [[A]]* [[THIS]], i32 0, i32 0
// CHECK-NEXT: [[OBJECT:%.*]] = load [[A]]*, [[A]]** [[OBJECTADDR]]
// CHECK-NEXT: [[T1:%.*]] = getelementptr inbounds [[A]], [[A]]* [[OBJECT]], i32 0, i32 0
-// CHECK-NEXT: call void @objc_copyWeak(i8** [[T0]], i8** [[T1]])
+// CHECK-NEXT: call void @llvm.objc.copyWeak(i8** [[T0]], i8** [[T1]])
// Move Constructor
// CHECK-LABEL: define linkonce_odr void @_ZN1AC2EOS_(
@@ -58,12 +58,12 @@ id test0() {
// CHECK: [[T0:%.*]] = getelementptr inbounds [[A]], [[A]]* [[THIS]], i32 0, i32 0
// CHECK-NEXT: [[OBJECT:%.*]] = load [[A]]*, [[A]]** [[OBJECTADDR]]
// CHECK-NEXT: [[T1:%.*]] = getelementptr inbounds [[A]], [[A]]* [[OBJECT]], i32 0, i32 0
-// CHECK-NEXT: call void @objc_moveWeak(i8** [[T0]], i8** [[T1]])
+// CHECK-NEXT: call void @llvm.objc.moveWeak(i8** [[T0]], i8** [[T1]])
// Destructor
// CHECK-LABEL: define linkonce_odr void @_ZN1AD2Ev(
// CHECK: [[THISADDR:%this.*]] = alloca [[A:.*]]*
// CHECK: [[THIS:%this.*]] = load [[A]]*, [[A]]** [[THISADDR]]
// CHECK-NEXT: [[T0:%.*]] = getelementptr inbounds [[A]], [[A]]* [[THIS]], i32 0, i32 0
-// CHECK-NEXT: call void @objc_destroyWeak(i8** [[T0]])
+// CHECK-NEXT: call void @llvm.objc.destroyWeak(i8** [[T0]])
diff --git a/test/SemaObjC/arc-objc-lifetime-conflict.m b/test/SemaObjC/arc-objc-lifetime-conflict.m
index 218950ca7b..e8064b110c 100644
--- a/test/SemaObjC/arc-objc-lifetime-conflict.m
+++ b/test/SemaObjC/arc-objc-lifetime-conflict.m
@@ -1,19 +1,19 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fobjc-arc -fobjc-runtime-has-weak %s -emit-llvm -o - | FileCheck %s
// CHECK: bitcast {{.*}} %self_weak_s_w_s
-// CHECK-NEXT: objc_destroyWeak
+// CHECK-NEXT: llvm.objc.destroyWeak
// CHECK-NEXT: bitcast {{.*}} %self_strong_w_s
-// CHECK-NEXT: objc_storeStrong
+// CHECK-NEXT: llvm.objc.storeStrong
// CHECK-NEXT: bitcast {{.*}} %self_weak_s
-// CHECK-NEXT: objc_destroyWeak
+// CHECK-NEXT: llvm.objc.destroyWeak
// CHECK-NEXT: bitcast {{.*}} %self_weak_s3
-// CHECK-NEXT: objc_destroyWeak
+// CHECK-NEXT: llvm.objc.destroyWeak
// CHECK-NEXT: bitcast {{.*}} %self_strong3
-// CHECK-NEXT: objc_storeStrong
+// CHECK-NEXT: llvm.objc.storeStrong
// CHECK-NEXT: bitcast {{.*}} %self_strong2
-// CHECK-NEXT: objc_storeStrong
+// CHECK-NEXT: llvm.objc.storeStrong
// CHECK-NEXT: bitcast {{.*}} %self_strong
-// CHECK-NEXT: objc_storeStrong
+// CHECK-NEXT: llvm.objc.storeStrong
@interface NSObject
@end
@interface A : NSObject