clang-cl: Use the .obj file extension also in LTO mode

llvm-svn: 283257
This commit is contained in:
Hans Wennborg 2016-10-04 21:01:02 +00:00
parent 2b0eea4a3b
commit 26228e3010
2 changed files with 14 additions and 6 deletions

View File

@ -53,12 +53,19 @@ types::ID types::getPrecompiledType(ID Id) {
}
const char *types::getTypeTempSuffix(ID Id, bool CLMode) {
if (Id == TY_Object && CLMode)
return "obj";
if (Id == TY_Image && CLMode)
return "exe";
if (Id == TY_PP_Asm && CLMode)
return "asm";
if (CLMode) {
switch (Id) {
case TY_Object:
case TY_LTO_BC:
return "obj";
case TY_Image:
return "exe";
case TY_PP_Asm:
return "asm";
default:
break;
}
}
return getInfo(Id).TempSuffix;
}

View File

@ -2,6 +2,7 @@
// command-line option, e.g. on Mac where %s is commonly under /Users.
// RUN: %clang_cl /c -### -- %s 2>&1 | FileCheck -check-prefix=DEFAULT %s
// RUN: %clang_cl /c -flto -### -- %s 2>&1 | FileCheck -check-prefix=DEFAULT %s
// DEFAULT: "-o" "cl-outputs.obj"
// RUN: %clang_cl /Fo -### -- %s 2>&1 | FileCheck -check-prefix=FoEMPTY %s