diff options
| author | Chandler Carruth <chandlerc@gmail.com> | 2014-03-05 10:21:48 +0000 |
|---|---|---|
| committer | Chandler Carruth <chandlerc@gmail.com> | 2014-03-05 10:21:48 +0000 |
| commit | 64e9aa5c93d54bd26d0e8d337a2fb48979eaafa2 (patch) | |
| tree | f4cb397461a63ca9ced0a07d0cc1e90087eaa941 /llvm/lib/Transforms/Scalar | |
| parent | 96c9d95f5174bebe02583e40683fd6e05b649d59 (diff) | |
| download | bcm5719-llvm-64e9aa5c93d54bd26d0e8d337a2fb48979eaafa2.tar.gz bcm5719-llvm-64e9aa5c93d54bd26d0e8d337a2fb48979eaafa2.zip | |
[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.
llvm-svn: 202958
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp b/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp index fad4e0a6a3d..bf49f814f63 100644 --- a/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp +++ b/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp @@ -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; |

