summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/JIT/JIT.cpp
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2009-11-04 14:58:56 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2009-11-04 14:58:56 +0000
commit36bf506ad3c99a309ca8bd73bd03563d8d068ac0 (patch)
treeb4dc751bcee540346911aa4115729eff2f991657 /lib/ExecutionEngine/JIT/JIT.cpp
parentf9666f9b3a3d26810deae8cd54feb6e47ecee61a (diff)
Notes
Diffstat (limited to 'lib/ExecutionEngine/JIT/JIT.cpp')
-rw-r--r--lib/ExecutionEngine/JIT/JIT.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp
index b2a268bce8b74..e21d7607c3010 100644
--- a/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/lib/ExecutionEngine/JIT/JIT.cpp
@@ -556,10 +556,10 @@ void JIT::NotifyFunctionEmitted(
}
}
-void JIT::NotifyFreeingMachineCode(const Function &F, void *OldPtr) {
+void JIT::NotifyFreeingMachineCode(void *OldPtr) {
MutexGuard locked(lock);
for (unsigned I = 0, S = EventListeners.size(); I < S; ++I) {
- EventListeners[I]->NotifyFreeingMachineCode(F, OldPtr);
+ EventListeners[I]->NotifyFreeingMachineCode(OldPtr);
}
}
@@ -599,7 +599,7 @@ void JIT::runJITOnFunctionUnlocked(Function *F, const MutexGuard &locked) {
isAlreadyCodeGenerating = false;
// If the function referred to another function that had not yet been
- // read from bitcode, but we are jitting non-lazily, emit it now.
+ // read from bitcode, and we are jitting non-lazily, emit it now.
while (!jitstate->getPendingFunctions(locked).empty()) {
Function *PF = jitstate->getPendingFunctions(locked).back();
jitstate->getPendingFunctions(locked).pop_back();
@@ -616,7 +616,7 @@ void JIT::runJITOnFunctionUnlocked(Function *F, const MutexGuard &locked) {
// If the JIT is configured to emit info so that dlsym can be used to
// rewrite stubs to external globals, do so now.
- if (areDlsymStubsEnabled() && isLazyCompilationDisabled())
+ if (areDlsymStubsEnabled() && !isCompilingLazily())
updateDlsymStubTable();
}
@@ -659,7 +659,7 @@ void *JIT::getPointerToFunction(Function *F) {
return Addr;
}
- if (F->isDeclaration()) {
+ if (F->isDeclaration() || F->hasAvailableExternallyLinkage()) {
bool AbortOnFailure =
!areDlsymStubsEnabled() && !F->hasExternalWeakLinkage();
void *Addr = getPointerToNamedFunction(F->getName(), AbortOnFailure);