[C++11] Make this interface accept const Use pointers and use override

to ensure we don't mess up any of the overrides. Necessary for cleaning
up the Value use iterators and enabling range-based traversing of use
lists.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202958 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chandler Carruth
2014-03-05 10:21:48 +00:00
parent 1a6eca243f
commit 2e816f0d56
5 changed files with 12 additions and 12 deletions
@@ -151,14 +151,14 @@ struct AllocaCaptureTracker : public CaptureTracker {
void tooManyUses() override { Captured = true; }
bool shouldExplore(Use *U) override {
bool shouldExplore(const Use *U) override {
Value *V = U->getUser();
if (isa<CallInst>(V) || isa<InvokeInst>(V))
UsesAlloca.insert(V);
return true;
}
bool captured(Use *U) override {
bool captured(const Use *U) override {
if (isa<ReturnInst>(U->getUser()))
return false;
Captured = true;