Skip to content

Commit 0051515

Browse files
author
git apple-llvm automerger
committed
Merge commit 'eefed175ce6d' from apple/stable/20200108 into swift/master
2 parents d1d4623 + eefed17 commit 0051515

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,18 @@ void RTDyldObjectLinkingLayer::emit(MaterializationResponsibility R,
115115
auto InternalSymbols = std::make_shared<std::set<StringRef>>();
116116
{
117117
for (auto &Sym : (*Obj)->symbols()) {
118+
119+
// Skip file symbols.
120+
if (auto SymType = Sym.getType()) {
121+
if (*SymType == object::SymbolRef::ST_File)
122+
continue;
123+
} else {
124+
ES.reportError(SymType.takeError());
125+
R.failMaterialization();
126+
return;
127+
}
128+
129+
// Don't include symbols that aren't global.
118130
if (!(Sym.getFlags() & object::BasicSymbolRef::SF_Global)) {
119131
if (auto SymName = Sym.getName())
120132
InternalSymbols->insert(*SymName);

0 commit comments

Comments
 (0)