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: http://review.tizen.org/git/?a=commitdiff_plain;h=26228e3010b4005e322c68c5b4e2c4feadff48f6;p=platform%2Fupstream%2Fllvm.git clang-cl: Use the .obj file extension also in LTO mode llvm-svn: 283257 --- diff --git a/clang/lib/Driver/Types.cpp b/clang/lib/Driver/Types.cpp index 3a74649..d456829 100644 --- a/clang/lib/Driver/Types.cpp +++ b/clang/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/clang/test/Driver/cl-outputs.c b/clang/test/Driver/cl-outputs.c index bf6b431..437e173 100644 --- a/clang/test/Driver/cl-outputs.c +++ b/clang/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