diff options
author | Pete Cooper <peter_cooper@apple.com> | 2018-12-20 18:05:41 +0000 |
---|---|---|
committer | Pete Cooper <peter_cooper@apple.com> | 2018-12-20 18:05:41 +0000 |
commit | 6c47f54df8bc545ae9c81253523b81beaf00b597 (patch) | |
tree | 0ac46b37976dda3b1be7f70cd1cdb1b53888da49 /clang/lib/CodeGen/CGObjC.cpp | |
parent | 9adf3fc405178fd733d354a226391e1c504ab885 (diff) | |
download | bcm5719-llvm-6c47f54df8bc545ae9c81253523b81beaf00b597.tar.gz bcm5719-llvm-6c47f54df8bc545ae9c81253523b81beaf00b597.zip |
Use @llvm.objc.clang.arc.use intrinsic instead of clang.arc.use function.
Calls to this function are deleted in the ARC optimizer. However when the ARC
optimizer was updated to use intrinsics instead of functions (r349534), the corresponding
clang change (r349535) to use intrinsics missed this one so it wasn't being deleted.
llvm-svn: 349782
Diffstat (limited to 'clang/lib/CodeGen/CGObjC.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGObjC.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp index 3747f4920a8..bfb31337b2c 100644 --- a/clang/lib/CodeGen/CGObjC.cpp +++ b/clang/lib/CodeGen/CGObjC.cpp @@ -1862,11 +1862,8 @@ llvm::Value *CodeGenFunction::EmitObjCExtendObjectLifetime(QualType type, /// being intrinsically used up until this point in the program. void CodeGenFunction::EmitARCIntrinsicUse(ArrayRef<llvm::Value*> values) { llvm::Constant *&fn = CGM.getObjCEntrypoints().clang_arc_use; - if (!fn) { - llvm::FunctionType *fnType = - llvm::FunctionType::get(CGM.VoidTy, None, true); - fn = CGM.CreateRuntimeFunction(fnType, "clang.arc.use"); - } + if (!fn) + fn = CGM.getIntrinsic(llvm::Intrinsic::objc_clang_arc_use); // This isn't really a "runtime" function, but as an intrinsic it // doesn't really matter as long as we align things up. |