[llvm-commits] CVS: llvm/tools/lli/lli.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Fri May 23 15:29:01 PDT 2003
Changes in directory llvm/tools/lli:
lli.cpp updated: 1.17 -> 1.18
---
Log message:
Remove ".bc" from the end of InputFile if it is there, in
tools/lli/lli.cpp:main().
---
Diffs of the changes:
Index: llvm/tools/lli/lli.cpp
diff -u llvm/tools/lli/lli.cpp:1.17 llvm/tools/lli/lli.cpp:1.18
--- llvm/tools/lli/lli.cpp:1.17 Mon May 12 09:31:57 2003
+++ llvm/tools/lli/lli.cpp Fri May 23 15:28:07 2003
@@ -88,6 +88,13 @@
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!
More information about the llvm-commits
mailing list