File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -726,7 +726,7 @@ JuliaOJIT::JuliaOJIT(TargetMachine &TM, LLVMContext *LLVMCtx)
726
726
static void *atomic_hdl = jl_load_dynamic_library (libatomic, JL_RTLD_LOCAL, 0 );
727
727
if (atomic_hdl != NULL ) {
728
728
GlobalJD.addGenerator (
729
- std::move (* orc::DynamicLibrarySearchGenerator::Load (
729
+ cantFail ( orc::DynamicLibrarySearchGenerator::Load (
730
730
libatomic,
731
731
DL.getGlobalPrefix (),
732
732
[&](const orc::SymbolStringPtr &S) {
@@ -814,13 +814,21 @@ JL_JITSymbol JuliaOJIT::findUnmangledSymbol(StringRef Name)
814
814
uint64_t JuliaOJIT::getGlobalValueAddress (StringRef Name)
815
815
{
816
816
auto addr = findSymbol (getMangledName (Name), false );
817
- return addr ? cantFail (addr.getAddress ()) : 0 ;
817
+ if (!addr) {
818
+ consumeError (addr.takeError ());
819
+ return 0 ;
820
+ }
821
+ return cantFail (addr.getAddress ());
818
822
}
819
823
820
824
uint64_t JuliaOJIT::getFunctionAddress (StringRef Name)
821
825
{
822
826
auto addr = findSymbol (getMangledName (Name), false );
823
- return addr ? cantFail (addr.getAddress ()) : 0 ;
827
+ if (!addr) {
828
+ consumeError (addr.takeError ());
829
+ return 0 ;
830
+ }
831
+ return cantFail (addr.getAddress ());
824
832
}
825
833
826
834
static int globalUniqueGeneratedNames;
You can’t perform that action at this time.
0 commit comments