From 74661c838c66f8e30226da8a1f3b77548a584203 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 15 Feb 2004 22:54:19 +0000 Subject: [PATCH] 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 --- tools/llc/llc.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index 24a3a35fc82..959bdbe36cb 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -164,7 +164,11 @@ int main(int argc, char **argv) { Out = &std::cout; } else { OutputFilename = GetFileNameRoot(InputFilename); - OutputFilename += ".s"; + + 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!