mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 02:29:18 +00:00
A function with no Module owner isn't materializable. This fixes F->dump() for
functions not embedded within modules. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96272 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ebd024fc4e
commit
936c43bb23
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user