aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/ValueMapper.cpp
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
commit15faa8498cda80828e292e6954e4bfe648d78572 (patch)
tree9f41022f7bf094e459175f07bef6335770d6d320 /lib/Transforms/Utils/ValueMapper.cpp
parenta107e5f11cf7aa362d2fdd5cebc7e64bb09ed22d (diff)
New const_cast instead of c style cast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5805 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/ValueMapper.cpp')
-rw-r--r--lib/Transforms/Utils/ValueMapper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/ValueMapper.cpp b/lib/Transforms/Utils/ValueMapper.cpp
index b54a1a0e42..484765a7e2 100644
--- a/lib/Transforms/Utils/ValueMapper.cpp
+++ b/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