When the user runs 'llc foo.bc -march=c', write the output to "foo.cbe.c", not

to "foo.s".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11485 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-02-15 22:54:19 +00:00
parent e42cde2a14
commit 74661c838c

View File

@ -164,7 +164,11 @@ int main(int argc, char **argv) {
Out = &std::cout;
} else {
OutputFilename = GetFileNameRoot(InputFilename);
if (Arch != CBackend)
OutputFilename += ".s";
else
OutputFilename += ".cbe.c";
if (!Force && std::ifstream(OutputFilename.c_str())) {
// If force is not specified, make sure not to overwrite a file!