Don't fail to load runtime if running LLI from the current directory
authorChris Lattner <sabre@nondot.org>
Tue, 30 Oct 2001 16:40:37 +0000 (16:40 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 30 Oct 2001 16:40:37 +0000 (16:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1044 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/Interpreter/UserInput.cpp

index 97bba9cf7dcdfe30e6605311d952be225fccdeed..49fd5e4bc17a4d20038cb44e04b488afffe29ed5 100644 (file)
@@ -154,7 +154,10 @@ void Interpreter::loadModule(const string &Filename) {
     return;
   }
 
-  string RuntimeLib = getCurrentExecutablePath() + "/RuntimeLib.bc";
+  string RuntimeLib = getCurrentExecutablePath();
+  if (!RuntimeLib.empty()) RuntimeLib += "/";
+  RuntimeLib += "RuntimeLib.bc";
+
   if (Module *SupportLib = ParseBytecodeFile(RuntimeLib, &ErrorMsg)) {
     if (LinkModules(CurMod, SupportLib, &ErrorMsg))
       cerr << "Error Linking runtime library into current module: "