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 | b752116230787178f92bf8667d2d2f7e18051da8 (patch) | |
tree | 6fba16ee434688a5257250a65dc1b77666fe7543 /llvm | |
parent | 5bfa37f4df88fade6aa5683854077bffc2ab2325 (diff) | |
download | bcm5719-llvm-b752116230787178f92bf8667d2d2f7e18051da8.tar.gz bcm5719-llvm-b752116230787178f92bf8667d2d2f7e18051da8.zip |
Remove ".bc" from the end of InputFile if it is there, in
tools/lli/lli.cpp:main().
llvm-svn: 6317
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/tools/lli/lli.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/tools/lli/lli.cpp b/llvm/tools/lli/lli.cpp index 30b65997d67..a69f53c98a7 100644 --- a/llvm/tools/lli/lli.cpp +++ b/llvm/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! |