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:
28fc440
)
Fix problem with last checkin.
author
Chris Lattner
<sabre@nondot.org>
Sun, 25 May 2003 16:15:32 +0000
(16:15 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Sun, 25 May 2003 16:15:32 +0000
(16:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6328
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Constants.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Constants.cpp
b/lib/VMCore/Constants.cpp
index 76904ad3f97bacc1c20b5881c4678c12bcd8b811..8fa5342ff3b45a87a63e22471370826f3ec88d5a 100644
(file)
--- a/
lib/VMCore/Constants.cpp
+++ b/
lib/VMCore/Constants.cpp
@@
-668,10
+668,12
@@
void ConstantPointerNull::refineAbstractType(const DerivedType *OldTy,
Value::refineAbstractType(OldTy, NewTy);
// Make everyone now use a constant of the new type...
- replaceAllUsesWith(ConstantPointerNull::get(cast<PointerType>(NewTy)));
-
- // This constant is now dead, destroy it.
- destroyConstant();
+ if (NewTy != OldTy) {
+ replaceAllUsesWith(ConstantPointerNull::get(cast<PointerType>(NewTy)));
+
+ // This constant is now dead, destroy it.
+ destroyConstant();
+ }
}