1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 11:33:24 +02:00

New const_cast instead of c style cast

llvm-svn: 5805
This commit is contained in:
Chris Lattner 2003-04-18 03:49:49 +00:00
parent 17200af63c
commit 5403f79db0

View File

@ -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