mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
[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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user