aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2015-03-17 18:32:23 +0800
committerAndrew Hsieh <andrewhsieh@google.com>2015-03-24 12:28:39 -0700
commit1c21fb62803a9f85d28d1eeaab9ecae30fd2ba90 (patch)
tree6080058e32ee1be0f2a5d44f9cc06b679998a816
parentc0e98a363fd849c40ee8654336af128750d69f55 (diff)
downloadllvm-1c21fb62803a9f85d28d1eeaab9ecae30fd2ba90.tar.gz
[ndk] Add isOSAndroid()
Change-Id: If5351b76e0fcbf81296cef7a4b21176a50c0f8bc
-rw-r--r--include/llvm/ADT/Triple.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h
index 8fc34272914..300895435d0 100644
--- a/include/llvm/ADT/Triple.h
+++ b/include/llvm/ADT/Triple.h
@@ -452,6 +452,11 @@ public:
return getObjectFormat() == Triple::MachO;
}
+ /// \brief Tests whether the environment is Android.
+ bool isOSAndroid() const {
+ return getEnvironment() == Triple::Android;
+ }
+
/// @}
/// @name Mutators
/// @{