diff --git a/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp b/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp index 741f07ecb4ad..e6dd69d6b589 100644 --- a/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp +++ b/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp @@ -75,13 +75,12 @@ namespace { SmallPtrSet StoreStrongCalls; /// Returns true if we eliminated Inst. - bool - tryToPeepholeInstruction(Function &F, Instruction *Inst, - inst_iterator &Iter, - SmallPtrSetImpl &DepInsts, - SmallPtrSetImpl &Visited, - bool &TailOkForStoreStrong, - DenseMap &BlockColors); + bool tryToPeepholeInstruction( + Function &F, Instruction *Inst, inst_iterator &Iter, + SmallPtrSetImpl &DepInsts, + SmallPtrSetImpl &Visited, + bool &TailOkForStoreStrong, + const DenseMap &BlockColors); bool optimizeRetainCall(Function &F, Instruction *Retain); @@ -431,7 +430,7 @@ bool ObjCARCContract::tryToPeepholeInstruction( SmallPtrSetImpl &DependingInsts, SmallPtrSetImpl &Visited, bool &TailOkForStoreStrongs, - DenseMap &BlockColors) { + const DenseMap &BlockColors) { // Only these library routines return their argument. In particular, // objc_retainBlock does not necessarily return its argument. ARCInstKind Class = GetBasicARCInstKind(Inst); diff --git a/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp b/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp index 23e6811f79df..b28cbe295882 100644 --- a/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp +++ b/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp @@ -688,7 +688,7 @@ void ObjCARCOpt::OptimizeAutoreleaseRVCall(Function &F, namespace { Instruction * CloneCallInstForBB(CallInst &CI, BasicBlock &BB, - DenseMap &BlockColors) { + const DenseMap &BlockColors) { SmallVector OpBundles; for (unsigned I = 0, E = CI.getNumOperandBundles(); I != E; ++I) { auto Bundle = CI.getOperandBundleAt(I);