aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis/ScalarEvolutionExpressions.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-04-18 17:56:28 +0000
committerDan Gohman <gohman@apple.com>2009-04-18 17:56:28 +0000
commit890f92b744fb074465bc2b7006ee753a181f62a4 (patch)
tree0300a386e2f78a01341f5351e32841c9f4349db0 /include/llvm/Analysis/ScalarEvolutionExpressions.h
parentf34c921713111fb327623400cf8c23d322513790 (diff)
downloadexternal_llvm-890f92b744fb074465bc2b7006ee753a181f62a4.zip
external_llvm-890f92b744fb074465bc2b7006ee753a181f62a4.tar.gz
external_llvm-890f92b744fb074465bc2b7006ee753a181f62a4.tar.bz2
Use more const qualifiers with SCEV interfaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69450 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/ScalarEvolutionExpressions.h')
-rw-r--r--include/llvm/Analysis/ScalarEvolutionExpressions.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/include/llvm/Analysis/ScalarEvolutionExpressions.h b/include/llvm/Analysis/ScalarEvolutionExpressions.h
index 61bb25a..c160eb9 100644
--- a/include/llvm/Analysis/ScalarEvolutionExpressions.h
+++ b/include/llvm/Analysis/ScalarEvolutionExpressions.h
@@ -552,39 +552,39 @@ namespace llvm {
/// for various SCEV analysis purposes.
template<typename SC, typename RetVal=void>
struct SCEVVisitor {
- RetVal visit(SCEV *S) {
+ RetVal visit(const SCEV *S) {
switch (S->getSCEVType()) {
case scConstant:
- return ((SC*)this)->visitConstant((SCEVConstant*)S);
+ return ((SC*)this)->visitConstant((const SCEVConstant*)S);
case scTruncate:
- return ((SC*)this)->visitTruncateExpr((SCEVTruncateExpr*)S);
+ return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S);
case scZeroExtend:
- return ((SC*)this)->visitZeroExtendExpr((SCEVZeroExtendExpr*)S);
+ return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S);
case scSignExtend:
- return ((SC*)this)->visitSignExtendExpr((SCEVSignExtendExpr*)S);
+ return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S);
case scAddExpr:
- return ((SC*)this)->visitAddExpr((SCEVAddExpr*)S);
+ return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S);
case scMulExpr:
- return ((SC*)this)->visitMulExpr((SCEVMulExpr*)S);
+ return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S);
case scUDivExpr:
- return ((SC*)this)->visitUDivExpr((SCEVUDivExpr*)S);
+ return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S);
case scAddRecExpr:
- return ((SC*)this)->visitAddRecExpr((SCEVAddRecExpr*)S);
+ return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S);
case scSMaxExpr:
- return ((SC*)this)->visitSMaxExpr((SCEVSMaxExpr*)S);
+ return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S);
case scUMaxExpr:
- return ((SC*)this)->visitUMaxExpr((SCEVUMaxExpr*)S);
+ return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S);
case scUnknown:
- return ((SC*)this)->visitUnknown((SCEVUnknown*)S);
+ return ((SC*)this)->visitUnknown((const SCEVUnknown*)S);
case scCouldNotCompute:
- return ((SC*)this)->visitCouldNotCompute((SCEVCouldNotCompute*)S);
+ return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S);
default:
assert(0 && "Unknown SCEV type!");
abort();
}
}
- RetVal visitCouldNotCompute(SCEVCouldNotCompute *S) {
+ RetVal visitCouldNotCompute(const SCEVCouldNotCompute *S) {
assert(0 && "Invalid use of SCEVCouldNotCompute!");
abort();
return RetVal();