forked from OSchip/llvm-project
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
0e881d61c1
commit
2ee1874aa8
|
@ -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