[llvm-commits] [llvm] r96272 - /llvm/trunk/lib/VMCore/Globals.cpp
Nick Lewycky
nicholas at mxc.ca
Mon Feb 15 13:27:20 PST 2010
Author: nicholas
Date: Mon Feb 15 15:27:20 2010
New Revision: 96272
URL: http://llvm.org/viewvc/llvm-project?rev=96272&view=rev
Log:
A function with no Module owner isn't materializable. This fixes F->dump() for
functions not embedded within modules.
Modified:
llvm/trunk/lib/VMCore/Globals.cpp
Modified: llvm/trunk/lib/VMCore/Globals.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Globals.cpp?rev=96272&r1=96271&r2=96272&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Globals.cpp (original)
+++ llvm/trunk/lib/VMCore/Globals.cpp Mon Feb 15 15:27:20 2010
@@ -44,10 +44,10 @@
}
bool GlobalValue::isMaterializable() const {
- return getParent()->isMaterializable(this);
+ return getParent() && getParent()->isMaterializable(this);
}
bool GlobalValue::isDematerializable() const {
- return getParent()->isDematerializable(this);
+ return getParent() && getParent()->isDematerializable(this);
}
bool GlobalValue::Materialize(std::string *ErrInfo) {
return getParent()->Materialize(this, ErrInfo);
More information about the llvm-commits
mailing list