From 15faa8498cda80828e292e6954e4bfe648d78572 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 18 Apr 2003 03:49:49 +0000 Subject: [PATCH] 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 --- lib/Transforms/Utils/ValueMapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/Utils/ValueMapper.cpp b/lib/Transforms/Utils/ValueMapper.cpp index b54a1a0e42a..484765a7e25 100644 --- a/lib/Transforms/Utils/ValueMapper.cpp +++ b/lib/Transforms/Utils/ValueMapper.cpp @@ -13,7 +13,7 @@ Value *MapValue(const Value *V, std::map &VM) { Value *&VMSlot = VM[V]; if (VMSlot) return VMSlot; // Does it exist in the map yet? - if (Constant *C = (Constant*)dyn_cast(V)) { + if (Constant *C = const_cast(dyn_cast(V))) { if (isa(C) || isa(C) || isa(C)) return VMSlot = C; // Primitive constants map directly