summaryrefslogtreecommitdiff
path: root/lib/VMCore/ConstantFold.h
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2009-09-20 01:35:59 +0000
committerNick Lewycky <nicholas@mxc.ca>2009-09-20 01:35:59 +0000
commit33c06adcf10d3ef7bbfc70f09f4966eec2e6c85e (patch)
treec62a6d970b39f6083b0a32247f933859e17937e5 /lib/VMCore/ConstantFold.h
parentb7b71a37a1bb88ef88c387f8a31bfc10dd816e83 (diff)
downloadllvm-33c06adcf10d3ef7bbfc70f09f4966eec2e6c85e.tar.gz
llvm-33c06adcf10d3ef7bbfc70f09f4966eec2e6c85e.tar.bz2
llvm-33c06adcf10d3ef7bbfc70f09f4966eec2e6c85e.tar.xz
Value* were never meant to be const. Removing constness from the constant
folder removes a lot of const_casting and requires no changes to clang or llvm-gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82349 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/ConstantFold.h')
-rw-r--r--lib/VMCore/ConstantFold.h40
1 files changed, 19 insertions, 21 deletions
diff --git a/lib/VMCore/ConstantFold.h b/lib/VMCore/ConstantFold.h
index f4452c98bc..cc97001e3c 100644
--- a/lib/VMCore/ConstantFold.h
+++ b/lib/VMCore/ConstantFold.h
@@ -29,41 +29,39 @@ namespace llvm {
Constant *ConstantFoldCastInstruction(
LLVMContext &Context,
unsigned opcode, ///< The opcode of the cast
- const Constant *V, ///< The source constant
+ Constant *V, ///< The source constant
const Type *DestTy ///< The destination type
);
Constant *ConstantFoldSelectInstruction(LLVMContext &Context,
- const Constant *Cond,
- const Constant *V1,
- const Constant *V2);
+ Constant *Cond,
+ Constant *V1, Constant *V2);
Constant *ConstantFoldExtractElementInstruction(LLVMContext &Context,
- const Constant *Val,
- const Constant *Idx);
+ Constant *Val,
+ Constant *Idx);
Constant *ConstantFoldInsertElementInstruction(LLVMContext &Context,
- const Constant *Val,
- const Constant *Elt,
- const Constant *Idx);
+ Constant *Val,
+ Constant *Elt,
+ Constant *Idx);
Constant *ConstantFoldShuffleVectorInstruction(LLVMContext &Context,
- const Constant *V1,
- const Constant *V2,
- const Constant *Mask);
+ Constant *V1,
+ Constant *V2,
+ Constant *Mask);
Constant *ConstantFoldExtractValueInstruction(LLVMContext &Context,
- const Constant *Agg,
+ Constant *Agg,
const unsigned *Idxs,
unsigned NumIdx);
Constant *ConstantFoldInsertValueInstruction(LLVMContext &Context,
- const Constant *Agg,
- const Constant *Val,
- const unsigned* Idxs,
+ Constant *Agg,
+ Constant *Val,
+ const unsigned *Idxs,
unsigned NumIdx);
Constant *ConstantFoldBinaryInstruction(LLVMContext &Context,
- unsigned Opcode, const Constant *V1,
- const Constant *V2);
+ unsigned Opcode, Constant *V1,
+ Constant *V2);
Constant *ConstantFoldCompareInstruction(LLVMContext &Context,
unsigned short predicate,
- const Constant *C1,
- const Constant *C2);
- Constant *ConstantFoldGetElementPtr(LLVMContext &Context, const Constant *C,
+ Constant *C1, Constant *C2);
+ Constant *ConstantFoldGetElementPtr(LLVMContext &Context, Constant *C,
bool inBounds,
Constant* const *Idxs, unsigned NumIdx);
} // End llvm namespace