projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a107e5f
)
New const_cast instead of c style cast
author
Chris Lattner
<sabre@nondot.org>
Fri, 18 Apr 2003 03:49:49 +0000
(
03:49
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 18 Apr 2003 03:49:49 +0000
(
03:49
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5805
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Utils/ValueMapper.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Utils/ValueMapper.cpp
b/lib/Transforms/Utils/ValueMapper.cpp
index b54a1a0e42a86f1f222e063f6536de2b80f88459..484765a7e25a19b0d51db3a005e016f88c8fd404 100644
(file)
--- 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