mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-08 19:25:47 +00:00
Add const qualifiers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95582 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -37,7 +37,7 @@ Constant *ConstantFoldInstruction(Instruction *I, const TargetData *TD = 0);
|
|||||||
/// ConstantFoldConstantExpression - Attempt to fold the constant expression
|
/// ConstantFoldConstantExpression - Attempt to fold the constant expression
|
||||||
/// using the specified TargetData. If successful, the constant result is
|
/// using the specified TargetData. If successful, the constant result is
|
||||||
/// result is returned, if not, null is returned.
|
/// result is returned, if not, null is returned.
|
||||||
Constant *ConstantFoldConstantExpression(ConstantExpr *CE,
|
Constant *ConstantFoldConstantExpression(const ConstantExpr *CE,
|
||||||
const TargetData *TD = 0);
|
const TargetData *TD = 0);
|
||||||
|
|
||||||
/// ConstantFoldInstOperands - Attempt to constant fold an instruction with the
|
/// ConstantFoldInstOperands - Attempt to constant fold an instruction with the
|
||||||
|
@@ -712,10 +712,10 @@ Constant *llvm::ConstantFoldInstruction(Instruction *I, const TargetData *TD) {
|
|||||||
/// ConstantFoldConstantExpression - Attempt to fold the constant expression
|
/// ConstantFoldConstantExpression - Attempt to fold the constant expression
|
||||||
/// using the specified TargetData. If successful, the constant result is
|
/// using the specified TargetData. If successful, the constant result is
|
||||||
/// result is returned, if not, null is returned.
|
/// result is returned, if not, null is returned.
|
||||||
Constant *llvm::ConstantFoldConstantExpression(ConstantExpr *CE,
|
Constant *llvm::ConstantFoldConstantExpression(const ConstantExpr *CE,
|
||||||
const TargetData *TD) {
|
const TargetData *TD) {
|
||||||
SmallVector<Constant*, 8> Ops;
|
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);
|
Constant *NewC = cast<Constant>(*i);
|
||||||
// Recursively fold the ConstantExpr's operands.
|
// Recursively fold the ConstantExpr's operands.
|
||||||
if (ConstantExpr *NewCE = dyn_cast<ConstantExpr>(NewC))
|
if (ConstantExpr *NewCE = dyn_cast<ConstantExpr>(NewC))
|
||||||
|
Reference in New Issue
Block a user