aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Globals.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/Globals.cpp')
-rw-r--r--lib/VMCore/Globals.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VMCore/Globals.cpp b/lib/VMCore/Globals.cpp
index f149c44..489ec65 100644
--- a/lib/VMCore/Globals.cpp
+++ b/lib/VMCore/Globals.cpp
@@ -44,10 +44,10 @@ static bool removeDeadUsersOfConstant(const Constant *C) {
}
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);