[llvm] r222180 - ADT: correctly report isMSVCEnvironment for windows itanium
Reid Kleckner
rnk at google.com
Mon Nov 17 14:54:32 PST 2014
I don't think this is correct, I want isWindowsMSVCEnvironment to imply the
Microsoft C++ ABI, which windows-itanium doesn't use.
In particular, the triple 'x86_64-pc-windows' should hit this codepath:
} else if (TheTriple.isWindowsMSVCEnvironment()) {
MAI = new X86MCAsmInfoMicrosoft(TheTriple);
I think you want to add the Itanium environment to isOSMSVCRT(), since the
whole idea of this environment is that it uses the MSVC C runtime and the
Itanium C++ ABI with libc++ for everything else.
On Mon, Nov 17, 2014 at 2:13 PM, Saleem Abdulrasool <compnerd at compnerd.org>
wrote:
> Author: compnerd
> Date: Mon Nov 17 16:13:26 2014
> New Revision: 222180
>
> URL: http://llvm.org/viewvc/llvm-project?rev=222180&view=rev
> Log:
> ADT: correctly report isMSVCEnvironment for windows itanium
>
> The itanium environment on Windows uses MSVC and is a MSVC environment.
> Report
> this correctly.
>
> Modified:
> llvm/trunk/include/llvm/ADT/Triple.h
> llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
> llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
>
> Modified: llvm/trunk/include/llvm/ADT/Triple.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/Triple.h?rev=222180&r1=222179&r2=222180&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/ADT/Triple.h (original)
> +++ llvm/trunk/include/llvm/ADT/Triple.h Mon Nov 17 16:13:26 2014
> @@ -371,6 +371,7 @@ public:
> bool isWindowsMSVCEnvironment() const {
> return getOS() == Triple::Win32 &&
> (getEnvironment() == Triple::UnknownEnvironment ||
> + getEnvironment() == Triple::Itanium ||
> getEnvironment() == Triple::MSVC);
> }
>
>
> Modified: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp?rev=222180&r1=222179&r2=222180&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp (original)
> +++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp Mon Nov 17
> 16:13:26 2014
> @@ -221,7 +221,7 @@ static MCAsmInfo *createARMMCAsmInfo(con
> MAI = new ARMMCAsmInfoDarwin(TT);
> else if (TheTriple.isWindowsItaniumEnvironment())
> MAI = new ARMCOFFMCAsmInfoGNU();
> - else if (TheTriple.isWindowsMSVCEnvironment())
> + else if (TheTriple.isKnownWindowsMSVCEnvironment())
> MAI = new ARMCOFFMCAsmInfoMicrosoft();
> else
> MAI = new ARMELFMCAsmInfo(TT);
>
> Modified: llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp?rev=222180&r1=222179&r2=222180&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp (original)
> +++ llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp Mon Nov 17
> 16:13:26 2014
> @@ -270,7 +270,7 @@ static MCAsmInfo *createX86MCAsmInfo(con
> } else if (TheTriple.isOSBinFormatELF()) {
> // Force the use of an ELF container.
> MAI = new X86ELFMCAsmInfo(TheTriple);
> - } else if (TheTriple.isWindowsMSVCEnvironment()) {
> + } else if (TheTriple.isKnownWindowsMSVCEnvironment()) {
> MAI = new X86MCAsmInfoMicrosoft(TheTriple);
> } else if (TheTriple.isOSCygMing() ||
> TheTriple.isWindowsItaniumEnvironment()) {
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141117/ac03d210/attachment.html>
More information about the llvm-commits
mailing list