Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp
Show First 20 Lines • Show All 214 Lines • ▼ Show 20 Lines | if (void *Addr = Dylib.getAddressOfSymbol(Tmp.c_str())) { | ||||
NewSymbols[Name] = JITEvaluatedSymbol( | NewSymbols[Name] = JITEvaluatedSymbol( | ||||
static_cast<JITTargetAddress>(reinterpret_cast<uintptr_t>(Addr)), | static_cast<JITTargetAddress>(reinterpret_cast<uintptr_t>(Addr)), | ||||
JITSymbolFlags::Exported); | JITSymbolFlags::Exported); | ||||
} | } | ||||
} | } | ||||
// Add any new symbols to JD. Since the generator is only called for symbols | // Add any new symbols to JD. Since the generator is only called for symbols | ||||
// that are not already defined, this will never trigger a duplicate | // that are not already defined, this will never trigger a duplicate | ||||
// definition error, so we can wrap this call in a 'cantFail'. | // definition error, so we can wrap this call in a 'llvm_cantFail'. | ||||
if (!NewSymbols.empty()) | if (!NewSymbols.empty()) | ||||
cantFail(JD.define(absoluteSymbols(std::move(NewSymbols)))); | llvm_cantFail(JD.define(absoluteSymbols(std::move(NewSymbols)))); | ||||
return Added; | return Added; | ||||
} | } | ||||
Expected<std::unique_ptr<StaticLibraryDefinitionGenerator>> | Expected<std::unique_ptr<StaticLibraryDefinitionGenerator>> | ||||
StaticLibraryDefinitionGenerator::Load(ObjectLayer &L, const char *FileName) { | StaticLibraryDefinitionGenerator::Load(ObjectLayer &L, const char *FileName) { | ||||
auto ArchiveBuffer = errorOrToExpected(MemoryBuffer::getFile(FileName)); | auto ArchiveBuffer = errorOrToExpected(MemoryBuffer::getFile(FileName)); | ||||
▲ Show 20 Lines • Show All 75 Lines • Show Last 20 Lines |