[PATCH] Use the new Windows environment for target detection
Reid Kleckner
rnk at google.com
Tue Mar 25 17:01:11 PDT 2014
Feel free to commit with changes if that works for you
================
Comment at: lib/AST/ItaniumCXXABI.cpp:68
@@ -67,3 +67,3 @@
const llvm::Triple &T = Context.getTargetInfo().getTriple();
- if (!isVariadic && T.getOS() == llvm::Triple::MinGW32 &&
- T.getArch() == llvm::Triple::x86)
+ bool IsWindowsGNU = (T.getOS() == llvm::Triple::MinGW32 ||
+ (T.getOS() == llvm::Triple::Win32 &&
----------------
I'd rather add a helper like Triple::isEnvGnuWindows(), and remove these duplicated checks. Then when we remove Triple::MinGW32, we only need to update LLVM.
================
Comment at: lib/Driver/Tools.cpp:2102
@@ +2101,3 @@
+ getToolChain().getTriple().getEnvironment() == llvm::Triple::GNU);
+ bool IsWindowsCygnus =
+ getToolChain().getTriple().getOS() == llvm::Triple::Cygwin ||
----------------
Similarly, this looks to me like Triple::isCygwin() and Triple::isWindowsMSVC().
http://llvm-reviews.chandlerc.com/D2969
More information about the llvm-commits
mailing list