mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-12 13:55:57 +03:00
Adapt dynamic-compile/JIT stuff for LLVM 11
This commit is contained in:
parent
4b7f14f58d
commit
7aea2e73e9
7 changed files with 57 additions and 18 deletions
|
@ -202,7 +202,12 @@ std::shared_ptr<llvm::orc::SymbolResolver>
|
|||
DynamicCompilerContext::createResolver() {
|
||||
return llvm::orc::createLegacyLookupResolver(
|
||||
execSession,
|
||||
#if LDC_LLVM_VER >= 1100
|
||||
[this](llvm::StringRef name_) -> llvm::JITSymbol {
|
||||
const std::string name = name_.str();
|
||||
#else
|
||||
[this](const std::string &name) -> llvm::JITSymbol {
|
||||
#endif
|
||||
if (auto Sym = compileLayer.findSymbol(name, false)) {
|
||||
return Sym;
|
||||
} else if (auto Err = Sym.takeError()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue