1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Remove ".bc" from the end of InputFile if it is there, in

tools/lli/lli.cpp:main().

llvm-svn: 6317
This commit is contained in:
Brian Gaeke 2003-05-23 20:28:07 +00:00
parent b599881570
commit b9ec46415f

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!