mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-28 14:36:34 +00:00
Fix problems running the HowToUseJIT on powerpc, and probably problems with
ANY program that does not have all functions internalized. llvm-svn: 20258
This commit is contained in:
parent
91e04e17a7
commit
68c342b28f
@ -180,14 +180,14 @@ void *JITResolver::getFunctionStub(Function *F) {
|
||||
// Call the lazy resolver function unless we already KNOW it is an external
|
||||
// function, in which case we just skip the lazy resolution step.
|
||||
void *Actual = (void*)LazyResolverFn;
|
||||
if (F->hasExternalLinkage())
|
||||
if (F->isExternal() && F->hasExternalLinkage())
|
||||
Actual = TheJIT->getPointerToFunction(F);
|
||||
|
||||
// Otherwise, codegen a new stub. For now, the stub will call the lazy
|
||||
// resolver function.
|
||||
Stub = TheJIT->getJITInfo().emitFunctionStub(Actual, MCE);
|
||||
|
||||
if (F->hasExternalLinkage()) {
|
||||
if (Actual != (void*)LazyResolverFn) {
|
||||
// If we are getting the stub for an external function, we really want the
|
||||
// address of the stub in the GlobalAddressMap for the JIT, not the address
|
||||
// of the external function.
|
||||
|
Loading…
Reference in New Issue
Block a user