diff options
Diffstat (limited to 'llvm/tools/llc/llc.cpp')
-rw-r--r-- | llvm/tools/llc/llc.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp index 729588d627c..d179efc0383 100644 --- a/llvm/tools/llc/llc.cpp +++ b/llvm/tools/llc/llc.cpp @@ -134,10 +134,15 @@ static std::ostream *GetOutputStream(const char *ProgName) { switch (FileType) { case TargetMachine::AssemblyFile: - if (MArch->Name[0] != 'c' || MArch->Name[1] != 0) // not CBE + if (MArch->Name[0] == 'c') { + if (MArch->Name[1] == 0) + OutputFilename += ".cbe.c"; + else if (MArch->Name[1] == 'p' && MArch->Name[2] == 'p') + OutputFilename += ".cpp"; + else + OutputFilename += ".s"; + } else OutputFilename += ".s"; - else - OutputFilename += ".cbe.c"; break; case TargetMachine::ObjectFile: OutputFilename += ".o"; |