[ObjCARC] Take BlockColors by const reference. NFC

llvm-svn: 330489
This commit is contained in:
Shoaib Meenai 2018-04-20 22:14:45 +00:00
parent c8f5c05d41
commit 106df7dd20
2 changed files with 8 additions and 9 deletions

View File

@ -75,13 +75,12 @@ namespace {
SmallPtrSet<CallInst *, 8> StoreStrongCalls;
/// Returns true if we eliminated Inst.
bool
tryToPeepholeInstruction(Function &F, Instruction *Inst,
inst_iterator &Iter,
bool tryToPeepholeInstruction(
Function &F, Instruction *Inst, inst_iterator &Iter,
SmallPtrSetImpl<Instruction *> &DepInsts,
SmallPtrSetImpl<const BasicBlock *> &Visited,
bool &TailOkForStoreStrong,
DenseMap<BasicBlock *, ColorVector> &BlockColors);
const DenseMap<BasicBlock *, ColorVector> &BlockColors);
bool optimizeRetainCall(Function &F, Instruction *Retain);
@ -431,7 +430,7 @@ bool ObjCARCContract::tryToPeepholeInstruction(
SmallPtrSetImpl<Instruction *> &DependingInsts,
SmallPtrSetImpl<const BasicBlock *> &Visited,
bool &TailOkForStoreStrongs,
DenseMap<BasicBlock *, ColorVector> &BlockColors) {
const DenseMap<BasicBlock *, ColorVector> &BlockColors) {
// Only these library routines return their argument. In particular,
// objc_retainBlock does not necessarily return its argument.
ARCInstKind Class = GetBasicARCInstKind(Inst);

View File

@ -688,7 +688,7 @@ void ObjCARCOpt::OptimizeAutoreleaseRVCall(Function &F,
namespace {
Instruction *
CloneCallInstForBB(CallInst &CI, BasicBlock &BB,
DenseMap<BasicBlock *, ColorVector> &BlockColors) {
const DenseMap<BasicBlock *, ColorVector> &BlockColors) {
SmallVector<OperandBundleDef, 1> OpBundles;
for (unsigned I = 0, E = CI.getNumOperandBundles(); I != E; ++I) {
auto Bundle = CI.getOperandBundleAt(I);