Skip to content

Commit eefed17

Browse files
authored
Merge pull request #875 from lhames/st-file-symbols-fix
[ORC] Skip ST_File symbols in MaterializationUnit interfaces / resolu…
2 parents 21fb474 + 2406bb4 commit eefed17

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)