Make sure lli compiles all code before invalidating instruction caches.

Patch from Amara Emerson.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164296 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tim Northover 2012-09-20 08:46:30 +00:00
parent aa258442b9
commit a668b46733

View File

@ -656,6 +656,9 @@ int main(int argc, char **argv, char * const *envp) {
Target.stop();
} else {
// Trigger compilation separately so code regions that need to be
// invalidated will be known.
(void)EE->getPointerToFunction(EntryFn);
// Clear instruction cache before code will be executed.
if (JMM)
static_cast<LLIMCJITMemoryManager*>(JMM)->invalidateInstructionCache();