[llvm] r173983 - Encapsulate testing that we have an iOS Triple in Triple.h in the method isiOS
Michael Gottesman
mgottesman at apple.com
Wed Jan 30 14:38:19 PST 2013
Author: mgottesman
Date: Wed Jan 30 16:38:19 2013
New Revision: 173983
URL: http://llvm.org/viewvc/llvm-project?rev=173983&view=rev
Log:
Encapsulate testing that we have an iOS Triple in Triple.h in the method isiOS
so we follow the convention that all other platforms follow by having an is*
test method.
Modified:
llvm/trunk/include/llvm/ADT/Triple.h
Modified: llvm/trunk/include/llvm/ADT/Triple.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/Triple.h?rev=173983&r1=173982&r2=173983&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/Triple.h (original)
+++ llvm/trunk/include/llvm/ADT/Triple.h Wed Jan 30 16:38:19 2013
@@ -296,9 +296,14 @@ public:
return getOS() == Triple::Darwin || getOS() == Triple::MacOSX;
}
+ /// Is this an iOS triple.
+ bool isiOS() const {
+ return getOS() == Triple::IOS;
+ }
+
/// isOSDarwin - Is this a "Darwin" OS (OS X or iOS).
bool isOSDarwin() const {
- return isMacOSX() || getOS() == Triple::IOS;
+ return isMacOSX() || isiOS();
}
/// \brief Tests for either Cygwin or MinGW OS
More information about the llvm-commits
mailing list