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 | c85ee99b42cab17f43bde123c909bcf13be8baf1 (patch) | |
tree | 9842f367c1e987612d46db9030f4b32f8badcfb7 /llvm/lib/ExecutionEngine | |
parent | ff2a07f4df0501cb93fc63397b8e274cb6c2389d (diff) | |
download | bcm5719-llvm-c85ee99b42cab17f43bde123c909bcf13be8baf1.tar.gz bcm5719-llvm-c85ee99b42cab17f43bde123c909bcf13be8baf1.zip |
Don't fail to load runtime if running LLI from the current directory
llvm-svn: 1044
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r-- | llvm/lib/ExecutionEngine/Interpreter/UserInput.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/UserInput.cpp b/llvm/lib/ExecutionEngine/Interpreter/UserInput.cpp index 97bba9cf7dc..49fd5e4bc17 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/UserInput.cpp +++ b/llvm/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: " |