diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2003-05-23 20:28:07 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2003-05-23 20:28:07 +0000 |
commit | 6ae73dc98f2b1177b3e1a8c462111deab79c9e4c (patch) | |
tree | 652e08d429b26c18ca4b89a203a53dd7a07d395f | |
parent | 69a79600cb782c18715c4cf1cbb7ed5b0df799c1 (diff) | |
download | external_llvm-6ae73dc98f2b1177b3e1a8c462111deab79c9e4c.zip external_llvm-6ae73dc98f2b1177b3e1a8c462111deab79c9e4c.tar.gz external_llvm-6ae73dc98f2b1177b3e1a8c462111deab79c9e4c.tar.bz2 |
Remove ".bc" from the end of InputFile if it is there, in
tools/lli/lli.cpp:main().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6317 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | tools/lli/lli.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp index 30b6599..a69f53c 100644 --- a/tools/lli/lli.cpp +++ b/tools/lli/lli.cpp @@ -88,6 +88,13 @@ int main(int argc, char** argv) { EE = ExecutionEngine::createInterpreter(M, Config, DebugMode, TraceMode); // Add the module name to the start of the argv vector... + // But delete .bc first, since programs (and users) might not expect to + // see it. + const std::string ByteCodeFileSuffix (".bc"); + if (InputFile.rfind (ByteCodeFileSuffix) == + InputFile.length () - ByteCodeFileSuffix.length ()) { + InputFile.erase (InputFile.length () - ByteCodeFileSuffix.length ()); + } InputArgv.insert(InputArgv.begin(), InputFile); // Run the main function! |