summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-04-18 03:49:49 +0000
committerChris Lattner <sabre@nondot.org>2003-04-18 03:49:49 +0000
commitde6f87ba073e3a9eb918ca42acb20c460865a331 (patch)
tree9d321dbad4ab7d839ced30b9681a26d11841c050 /llvm/lib/Transforms/Utils
parent55cdd161f8620fabcbff48436075385d24abb50f (diff)
downloadbcm5719-llvm-de6f87ba073e3a9eb918ca42acb20c460865a331.tar.gz
bcm5719-llvm-de6f87ba073e3a9eb918ca42acb20c460865a331.zip
New const_cast instead of c style cast
llvm-svn: 5805
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r--llvm/lib/Transforms/Utils/ValueMapper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/ValueMapper.cpp b/llvm/lib/Transforms/Utils/ValueMapper.cpp
index b54a1a0e42a..484765a7e25 100644
--- a/llvm/lib/Transforms/Utils/ValueMapper.cpp
+++ b/llvm/lib/Transforms/Utils/ValueMapper.cpp
@@ -13,7 +13,7 @@ Value *MapValue(const Value *V, std::map<const Value*, Value*> &VM) {
Value *&VMSlot = VM[V];
if (VMSlot) return VMSlot; // Does it exist in the map yet?
- if (Constant *C = (Constant*)dyn_cast<Constant>(V)) {
+ if (Constant *C = const_cast<Constant*>(dyn_cast<Constant>(V))) {
if (isa<ConstantIntegral>(C) || isa<ConstantFP>(C) ||
isa<ConstantPointerNull>(C))
return VMSlot = C; // Primitive constants map directly
OpenPOWER on IntegriCloud