From: Hans Wennborg Date: Tue, 4 Oct 2016 21:01:02 +0000 (+0000) Subject: clang-cl: Use the .obj file extension also in LTO mode X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3905e2a2c1755d4aa5daf3c62f85425df00e089e;p=clang clang-cl: Use the .obj file extension also in LTO mode git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283257 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Types.cpp b/lib/Driver/Types.cpp index 3a74649df8..d4568295dc 100644 --- a/lib/Driver/Types.cpp +++ b/lib/Driver/Types.cpp @@ -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; } diff --git a/test/Driver/cl-outputs.c b/test/Driver/cl-outputs.c index bf6b431726..437e173c22 100644 --- a/test/Driver/cl-outputs.c +++ b/test/Driver/cl-outputs.c @@ -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