[CaptureTracking] Fixup const correctness of DomTree arg (NFC)

Summary:
The PointerMayBeCapturedBefore function's DomTree arg should be
const instead of non-const. There are no non-const uses of it
in the function.

llvm-svn: 330769
This commit is contained in:
Daniel Neilson 2018-04-24 21:12:45 +00:00
parent db811f479f
commit 66dd709dc3
2 changed files with 4 additions and 4 deletions

View File

@ -46,7 +46,7 @@ namespace llvm {
/// to speed up capture-tracker queries.
bool PointerMayBeCapturedBefore(const Value *V, bool ReturnCaptures,
bool StoreCaptures, const Instruction *I,
DominatorTree *DT, bool IncludeI = false,
const DominatorTree *DT, bool IncludeI = false,
OrderedBasicBlock *OBB = nullptr);
/// This callback is used in conjunction with PointerMayBeCaptured. In

View File

@ -60,7 +60,7 @@ namespace {
/// as the given instruction and the use.
struct CapturesBefore : public CaptureTracker {
CapturesBefore(bool ReturnCaptures, const Instruction *I, DominatorTree *DT,
CapturesBefore(bool ReturnCaptures, const Instruction *I, const DominatorTree *DT,
bool IncludeI, OrderedBasicBlock *IC)
: OrderedBB(IC), BeforeHere(I), DT(DT),
ReturnCaptures(ReturnCaptures), IncludeI(IncludeI), Captured(false) {}
@ -140,7 +140,7 @@ namespace {
OrderedBasicBlock *OrderedBB;
const Instruction *BeforeHere;
DominatorTree *DT;
const DominatorTree *DT;
bool ReturnCaptures;
bool IncludeI;
@ -184,7 +184,7 @@ bool llvm::PointerMayBeCaptured(const Value *V,
/// queries about relative order among instructions in the same basic block.
bool llvm::PointerMayBeCapturedBefore(const Value *V, bool ReturnCaptures,
bool StoreCaptures, const Instruction *I,
DominatorTree *DT, bool IncludeI,
const DominatorTree *DT, bool IncludeI,
OrderedBasicBlock *OBB) {
assert(!isa<GlobalValue>(V) &&
"It doesn't make sense to ask whether a global is captured.");