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:
parent
17200af63c
commit
5403f79db0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user