[llvm-commits] [llvm] r111240 - /llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp

Nick Lewycky nicholas at mxc.ca
Tue Aug 17 09:19:18 PDT 2010


Author: nicholas
Date: Tue Aug 17 11:19:18 2010
New Revision: 111240

URL: http://llvm.org/viewvc/llvm-project?rev=111240&view=rev
Log:
When creating a JIT, try to load the program so that we can resolve symbols
against it. This affects Windows.

Modified:
    llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp

Modified: llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp?rev=111240&r1=111239&r2=111240&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp Tue Aug 17 11:19:18 2010
@@ -219,6 +219,9 @@
                                 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;





More information about the llvm-commits mailing list