Don't overwrite previous value, if it succeeded.
llvm-svn: 99886
This commit is contained in:
parent
61b798a5ac
commit
cc1db61180
|
@ -265,7 +265,8 @@ GenericValue Interpreter::callExternalFunction(Function *F,
|
|||
if (RF == RawFunctions->end()) {
|
||||
RawFn = (RawFunc)(intptr_t)
|
||||
sys::DynamicLibrary::SearchForAddressOfSymbol(F->getName());
|
||||
RawFn = (RawFunc)(intptr_t)getPointerToGlobalIfAvailable(F);
|
||||
if (!RawnFn)
|
||||
RawFn = (RawFunc)(intptr_t)getPointerToGlobalIfAvailable(F);
|
||||
if (RawFn != 0)
|
||||
RawFunctions->insert(std::make_pair(F, RawFn)); // Cache for later
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue