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
diff --git a/lib/Transforms/Utils/ValueMapper.cpp b/lib/Transforms/Utils/ValueMapper.cpp
index b54a1a0..484765a 100644
--- a/lib/Transforms/Utils/ValueMapper.cpp
+++ b/lib/Transforms/Utils/ValueMapper.cpp
@@ -13,7 +13,7 @@
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