[llvm] r327351 - ObjCARC: address review comments from majnemer
Saleem Abdulrasool via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 12 16:48:21 PDT 2018
Author: compnerd
Date: Mon Mar 12 16:48:20 2018
New Revision: 327351
URL: http://llvm.org/viewvc/llvm-project?rev=327351&view=rev
Log:
ObjCARC: address review comments from majnemer
I forgot to incorporate these comments into the original revision. This
is just code cleanup addressing the feedback, NFC.
Modified:
llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
Modified: llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp?rev=327351&r1=327350&r2=327351&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp (original)
+++ llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp Mon Mar 12 16:48:20 2018
@@ -687,15 +687,12 @@ void ObjCARCOpt::OptimizeAutoreleaseRVCa
namespace {
Instruction *
-CloneCallInstForBB(Instruction &I, BasicBlock &BB,
+CloneCallInstForBB(CallInst &CI, BasicBlock &BB,
DenseMap<BasicBlock *, ColorVector> &BlockColors) {
- auto *CI = dyn_cast<CallInst>(&I);
- assert(CI && "CloneCallInst must receive a CallInst");
-
SmallVector<OperandBundleDef, 1> OpBundles;
- for (unsigned I = 0, E = CI->getNumOperandBundles(); I != E; ++I) {
- auto Bundle = CI->getOperandBundleAt(I);
- // funclets will be reassociated in the future
+ for (unsigned I = 0, E = CI.getNumOperandBundles(); I != E; ++I) {
+ auto Bundle = CI.getOperandBundleAt(I);
+ // Funclets will be reassociated in the future.
if (Bundle.getTagID() == LLVMContext::OB_funclet)
continue;
OpBundles.emplace_back(Bundle);
@@ -709,7 +706,7 @@ CloneCallInstForBB(Instruction &I, Basic
OpBundles.emplace_back("funclet", EHPad);
}
- return CallInst::Create(CI, OpBundles);
+ return CallInst::Create(&CI, OpBundles);
}
}
More information about the llvm-commits
mailing list