diff options
author | Chris Lattner <sabre@nondot.org> | 2001-10-30 16:40:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-10-30 16:40:37 +0000 |
commit | a5637fc46617afea65d16625ea6508f1eceacba2 (patch) | |
tree | 4df035fb32512b5215b7cccfd04b6a8b1978cc89 /lib/ExecutionEngine/Interpreter/UserInput.cpp | |
parent | 55fd998ce7bcc09a0f4b54aec425773cd12028a4 (diff) |
Don't fail to load runtime if running LLI from the current directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1044 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/Interpreter/UserInput.cpp')
-rw-r--r-- | lib/ExecutionEngine/Interpreter/UserInput.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ExecutionEngine/Interpreter/UserInput.cpp b/lib/ExecutionEngine/Interpreter/UserInput.cpp index 97bba9cf7d..49fd5e4bc1 100644 --- a/lib/ExecutionEngine/Interpreter/UserInput.cpp +++ b/lib/ExecutionEngine/Interpreter/UserInput.cpp @@ -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: " |