[llvm-commits] CVS: llvm/lib/Transforms/Utils/ValueMapper.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Apr 17 22:51:03 PDT 2003


Changes in directory llvm/lib/Transforms/Utils:

ValueMapper.cpp updated: 1.3 -> 1.4

---
Log message:

New const_cast instead of c style cast


---
Diffs of the changes:

Index: llvm/lib/Transforms/Utils/ValueMapper.cpp
diff -u llvm/lib/Transforms/Utils/ValueMapper.cpp:1.3 llvm/lib/Transforms/Utils/ValueMapper.cpp:1.4
--- llvm/lib/Transforms/Utils/ValueMapper.cpp:1.3	Sun Jan 12 18:52:25 2003
+++ llvm/lib/Transforms/Utils/ValueMapper.cpp	Thu Apr 17 22:49:49 2003
@@ -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





More information about the llvm-commits mailing list