mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
[ThinLTO][Legacy] Fix StringRef assertion from ThinLTO bots
This is a presumed fix for FireFox thinLTO bot fix which hits assertion failure for invalid index when access StringRef. Techinically, `IRName` in the symtab should not be empty string for the entries we cared about but this will help to fix the bot before more information can be provided. Otherwise, NFCI.
This commit is contained in:
parent
6d8dce72a6
commit
a48b964bbb
@ -276,7 +276,7 @@ static void computeGUIDPreservedSymbols(const lto::InputFile &File,
|
||||
// Iterate the symbols in the input file and if the input has preserved symbol
|
||||
// compute the GUID for the symbol.
|
||||
for (const auto &Sym : File.symbols()) {
|
||||
if (PreservedSymbols.count(Sym.getName()))
|
||||
if (PreservedSymbols.count(Sym.getName()) && !Sym.getIRName().empty())
|
||||
GUIDs.insert(GlobalValue::getGUID(GlobalValue::getGlobalIdentifier(
|
||||
Sym.getIRName(), GlobalValue::ExternalLinkage, "")));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user