mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-12 22:17:47 +00:00
LTOCodeGenerator: handle correctly "unnamed" symbol
This should fix the assertions in a clang LTO bootstrap we're seeing. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 268658
This commit is contained in:
parent
45444fa103
commit
bcc2b51dd7
@ -364,7 +364,7 @@ static void preserveDiscardableGVs(
|
||||
}
|
||||
llvm::Type *i8PTy = llvm::Type::getInt8PtrTy(TheModule.getContext());
|
||||
auto mayPreserveGlobal = [&](GlobalValue &GV) {
|
||||
if (!GV.isDiscardableIfUnused() || GV.isDeclaration())
|
||||
if (!GV.isDiscardableIfUnused() || GV.isDeclaration() || !GV.hasName())
|
||||
return;
|
||||
if (!mustPreserveGV(GV))
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user