mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
[LTO] Handle null GV in Symbol object
Similar to other Symbol methods, have Symbol::getComdat handle a null GV gracefully. Fixes PR30326. llvm-svn: 281134
This commit is contained in:
parent
28d3201799
commit
420dade831
@ -165,6 +165,8 @@ public:
|
||||
return GV && llvm::canBeOmittedFromSymbolTable(GV);
|
||||
}
|
||||
Expected<const Comdat *> getComdat() const {
|
||||
if (!GV)
|
||||
return nullptr;
|
||||
const GlobalObject *GO;
|
||||
if (auto *GA = dyn_cast<GlobalAlias>(GV)) {
|
||||
GO = GA->getBaseObject();
|
||||
|
Loading…
Reference in New Issue
Block a user