diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2010-08-17 16:19:18 +0000 |
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2010-08-17 16:19:18 +0000 |
| commit | 5251599820e75ec0255f10ce302efed04afcd0fb (patch) | |
| tree | d637a7242e86af8211ab29a765916a50f1a60983 /lib | |
| parent | a2f2ef1cc7ecaa6d7633dfaf8edc5d49194bd410 (diff) | |
| download | external_llvm-5251599820e75ec0255f10ce302efed04afcd0fb.zip external_llvm-5251599820e75ec0255f10ce302efed04afcd0fb.tar.gz external_llvm-5251599820e75ec0255f10ce302efed04afcd0fb.tar.bz2 | |
When creating a JIT, try to load the program so that we can resolve symbols
against it. This affects Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111240 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/ExecutionEngine/JIT/JIT.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp index 677feb2..63125b7 100644 --- a/lib/ExecutionEngine/JIT/JIT.cpp +++ b/lib/ExecutionEngine/JIT/JIT.cpp @@ -219,6 +219,9 @@ ExecutionEngine *JIT::createJIT(Module *M, StringRef MArch, StringRef MCPU, const SmallVectorImpl<std::string>& MAttrs) { + // Try to register the program as a source of symbols to resolve against. + sys::DynamicLibrary::LoadLibraryPermanently(0, NULL); + // Pick a target either via -march or by guessing the native arch. TargetMachine *TM = JIT::selectTarget(M, MArch, MCPU, MAttrs, ErrorStr); if (!TM || (ErrorStr && ErrorStr->length() > 0)) return 0; |
