diff options
Diffstat (limited to 'lib/Transforms/Utils/ValueMapper.cpp')
-rw-r--r-- | lib/Transforms/Utils/ValueMapper.cpp | 2 |
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 |