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
This commit is contained in:
Brian Gaeke 2003-05-23 20:28:07 +00:00
parent 69a79600cb
commit 6ae73dc98f

View File

@ -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!