[llvm-commits] CVS: llvm/lib/Analysis/IPA/Andersens.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Mar 29 09:22:10 PST 2005
Changes in directory llvm/lib/Analysis/IPA:
Andersens.cpp updated: 1.18 -> 1.19
---
Log message:
Fix a major problem with global variable initializers. This could cause
us to have stuff pointing to the null pointer, which makes no sense
(the null ptr is an ssa value, not the null object)
---
Diffs of the changes: (+2 -1)
Andersens.cpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)
Index: llvm/lib/Analysis/IPA/Andersens.cpp
diff -u llvm/lib/Analysis/IPA/Andersens.cpp:1.18 llvm/lib/Analysis/IPA/Andersens.cpp:1.19
--- llvm/lib/Analysis/IPA/Andersens.cpp:1.18 Tue Mar 29 00:52:20 2005
+++ llvm/lib/Analysis/IPA/Andersens.cpp Tue Mar 29 11:21:53 2005
@@ -578,7 +578,8 @@
void Andersens::AddGlobalInitializerConstraints(Node *N, Constant *C) {
if (C->getType()->isFirstClassType()) {
if (isa<PointerType>(C->getType()))
- N->addPointerTo(getNodeForConstantPointer(C));
+ N->copyFrom(getNodeForConstantPointer(C));
+
} else if (C->isNullValue()) {
N->addPointerTo(&GraphNodes[NullObject]);
return;
More information about the llvm-commits
mailing list