clang-cl wants MSVC-style win32

This should fix the clang-cl tests after the Windows target triple
canonicalization (r204978)

llvm-svn: 204985
This commit is contained in:
Hans Wennborg 2014-03-28 01:19:04 +00:00
parent 200fce4208
commit 73609a0fb3
1 changed files with 3 additions and 1 deletions

View File

@ -335,9 +335,11 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {
// FIXME: DefaultTargetTriple is used by the target-prefixed calls to as/ld // FIXME: DefaultTargetTriple is used by the target-prefixed calls to as/ld
// and getToolChain is const. // and getToolChain is const.
if (IsCLMode()) { if (IsCLMode()) {
// clang-cl targets Win32. // clang-cl targets MSVC-style Win32.
llvm::Triple T(DefaultTargetTriple); llvm::Triple T(DefaultTargetTriple);
T.setOSName(llvm::Triple::getOSTypeName(llvm::Triple::Win32)); T.setOSName(llvm::Triple::getOSTypeName(llvm::Triple::Win32));
T.setEnvironmentName(llvm::Triple::getEnvironmentTypeName(
llvm::Triple::MSVC));
DefaultTargetTriple = T.str(); DefaultTargetTriple = T.str();
} }
if (const Arg *A = Args->getLastArg(options::OPT_target)) if (const Arg *A = Args->getLastArg(options::OPT_target))