diff options
Diffstat (limited to 'llvm/lib/Object/ModuleSymbolTable.cpp')
-rw-r--r-- | llvm/lib/Object/ModuleSymbolTable.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Object/ModuleSymbolTable.cpp b/llvm/lib/Object/ModuleSymbolTable.cpp index cbe9c69..954d1f0 100644 --- a/llvm/lib/Object/ModuleSymbolTable.cpp +++ b/llvm/lib/Object/ModuleSymbolTable.cpp @@ -204,8 +204,9 @@ uint32_t ModuleSymbolTable::getSymbolFlags(Symbol S) const { if (GVar->isConstant()) Res |= BasicSymbolRef::SF_Const; } - if (isa_and_nonnull<Function>(GV->getAliaseeObject()) || isa<GlobalIFunc>(GV)) - Res |= BasicSymbolRef::SF_Executable; + if (const GlobalObject *GO = GV->getAliaseeObject()) + if (isa<Function>(GO) || isa<GlobalIFunc>(GO)) + Res |= BasicSymbolRef::SF_Executable; if (isa<GlobalAlias>(GV)) Res |= BasicSymbolRef::SF_Indirect; if (GV->hasPrivateLinkage()) |