diff options
author | Dan Gohman <gohman@apple.com> | 2010-02-08 22:00:06 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-02-08 22:00:06 +0000 |
commit | 6f9646e1c5a0299cf76e93c804ac401d7e6e7f9f (patch) | |
tree | af6e8f476c6e10f7c419d66fd74c71c987264d3a /llvm | |
parent | 120cfe23a779a5a36d68e02d695f0c2ea9981454 (diff) | |
download | bcm5719-llvm-6f9646e1c5a0299cf76e93c804ac401d7e6e7f9f.tar.gz bcm5719-llvm-6f9646e1c5a0299cf76e93c804ac401d7e6e7f9f.zip |
Add const qualifiers.
llvm-svn: 95582
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/include/llvm/Analysis/ConstantFolding.h | 2 | ||||
-rw-r--r-- | llvm/lib/Analysis/ConstantFolding.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/llvm/include/llvm/Analysis/ConstantFolding.h b/llvm/include/llvm/Analysis/ConstantFolding.h index 06951c7e457..e2675eb2d4f 100644 --- a/llvm/include/llvm/Analysis/ConstantFolding.h +++ b/llvm/include/llvm/Analysis/ConstantFolding.h @@ -37,7 +37,7 @@ Constant *ConstantFoldInstruction(Instruction *I, const TargetData *TD = 0); /// ConstantFoldConstantExpression - Attempt to fold the constant expression /// using the specified TargetData. If successful, the constant result is /// result is returned, if not, null is returned. -Constant *ConstantFoldConstantExpression(ConstantExpr *CE, +Constant *ConstantFoldConstantExpression(const ConstantExpr *CE, const TargetData *TD = 0); /// ConstantFoldInstOperands - Attempt to constant fold an instruction with the diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp index b8e84014bc3..ba87040c80f 100644 --- a/llvm/lib/Analysis/ConstantFolding.cpp +++ b/llvm/lib/Analysis/ConstantFolding.cpp @@ -712,10 +712,10 @@ Constant *llvm::ConstantFoldInstruction(Instruction *I, const TargetData *TD) { /// ConstantFoldConstantExpression - Attempt to fold the constant expression /// using the specified TargetData. If successful, the constant result is /// result is returned, if not, null is returned. -Constant *llvm::ConstantFoldConstantExpression(ConstantExpr *CE, +Constant *llvm::ConstantFoldConstantExpression(const ConstantExpr *CE, const TargetData *TD) { SmallVector<Constant*, 8> Ops; - for (User::op_iterator i = CE->op_begin(), e = CE->op_end(); i != e; ++i) { + for (User::const_op_iterator i = CE->op_begin(), e = CE->op_end(); i != e; ++i) { Constant *NewC = cast<Constant>(*i); // Recursively fold the ConstantExpr's operands. if (ConstantExpr *NewCE = dyn_cast<ConstantExpr>(NewC)) |