r242574 - basic: default to MSVC on Windows
Saleem Abdulrasool
compnerd at compnerd.org
Fri Jul 17 14:26:42 PDT 2015
Author: compnerd
Date: Fri Jul 17 16:26:41 2015
New Revision: 242574
URL: http://llvm.org/viewvc/llvm-project?rev=242574&view=rev
Log:
basic: default to MSVC on Windows
The "armv7-windows", "i686-windows", and "x86_64-windows" targets should be
equivalent to the MSVC environment. This was previously discussed when the
triples for Windows werw canonicalised. Im not sure how this was overlooked.
This fixes the emission of non-COFF formats on Windows.
Thanks to ki9a for reporting this issue over IRC!
Modified:
cfe/trunk/lib/Basic/Targets.cpp
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=242574&r1=242573&r2=242574&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Fri Jul 17 16:26:41 2015
@@ -7084,8 +7084,6 @@ static TargetInfo *AllocateTarget(const
return new NaClTargetInfo<ARMleTargetInfo>(Triple);
case llvm::Triple::Win32:
switch (Triple.getEnvironment()) {
- default:
- return new ARMleTargetInfo(Triple);
case llvm::Triple::Cygnus:
return new CygwinARMTargetInfo(Triple);
case llvm::Triple::GNU:
@@ -7093,6 +7091,7 @@ static TargetInfo *AllocateTarget(const
case llvm::Triple::Itanium:
return new ItaniumWindowsARMleTargetInfo(Triple);
case llvm::Triple::MSVC:
+ default: // Assume MSVC for unknown environments
return new MicrosoftARMleTargetInfo(Triple);
}
default:
@@ -7347,14 +7346,13 @@ static TargetInfo *AllocateTarget(const
return new SolarisTargetInfo<X86_32TargetInfo>(Triple);
case llvm::Triple::Win32: {
switch (Triple.getEnvironment()) {
- default:
- return new X86_32TargetInfo(Triple);
case llvm::Triple::Cygnus:
return new CygwinX86_32TargetInfo(Triple);
case llvm::Triple::GNU:
return new MinGWX86_32TargetInfo(Triple);
case llvm::Triple::Itanium:
case llvm::Triple::MSVC:
+ default: // Assume MSVC for unknown environments
return new MicrosoftX86_32TargetInfo(Triple);
}
}
@@ -7399,11 +7397,10 @@ static TargetInfo *AllocateTarget(const
return new SolarisTargetInfo<X86_64TargetInfo>(Triple);
case llvm::Triple::Win32: {
switch (Triple.getEnvironment()) {
- default:
- return new X86_64TargetInfo(Triple);
case llvm::Triple::GNU:
return new MinGWX86_64TargetInfo(Triple);
case llvm::Triple::MSVC:
+ default: // Assume MSVC for unknown environments
return new MicrosoftX86_64TargetInfo(Triple);
}
}
More information about the cfe-commits
mailing list