summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Gottesman <mgottesman@apple.com>2013-01-30 22:38:19 +0000
committerMichael Gottesman <mgottesman@apple.com>2013-01-30 22:38:19 +0000
commite502bba8c6dde1d95cc350c7935a1aea0b41465f (patch)
treed886b1fee15104073b97cb85f7b8a053ccd2a49d /include
parent383da6ba555a3c2be360d9bdc75a74f315f2354e (diff)
downloadllvm-e502bba8c6dde1d95cc350c7935a1aea0b41465f.tar.gz
llvm-e502bba8c6dde1d95cc350c7935a1aea0b41465f.tar.bz2
llvm-e502bba8c6dde1d95cc350c7935a1aea0b41465f.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173983 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ADT/Triple.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h
index 7968a129cc..e987ffc8de 100644
--- a/include/llvm/ADT/Triple.h
+++ b/include/llvm/ADT/Triple.h
@@ -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