summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-01-29 23:09:12 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-01-29 23:09:12 +0000
commitf95b2dafc9a6ae88c6085aceeaf7a34af09df93b (patch)
treed4e3253d4d10218dec5ed577224715c2645aba99
parent95fa4005f5aa99878c4053e95b230f0b8b6a4d6d (diff)
downloadllvm-f95b2dafc9a6ae88c6085aceeaf7a34af09df93b.tar.gz
llvm-f95b2dafc9a6ae88c6085aceeaf7a34af09df93b.tar.bz2
llvm-f95b2dafc9a6ae88c6085aceeaf7a34af09df93b.tar.xz
Cleanup the organization of some methods in llvm::Triple and provide
a better doxyment group for convenience predicates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149211 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/ADT/Triple.h34
1 files changed, 19 insertions, 15 deletions
diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h
index 5683f72ba3..d998ddd996 100644
--- a/include/llvm/ADT/Triple.h
+++ b/include/llvm/ADT/Triple.h
@@ -193,6 +193,22 @@ public:
return Environment;
}
+ /// getOSVersion - Parse the version number from the OS name component of the
+ /// triple, if present.
+ ///
+ /// For example, "fooos1.2.3" would return (1, 2, 3).
+ ///
+ /// If an entry is not defined, it will be returned as 0.
+ void getOSVersion(unsigned &Major, unsigned &Minor, unsigned &Micro) const;
+
+ /// getOSMajorVersion - Return just the major version number, this is
+ /// specialized because it is a common query.
+ unsigned getOSMajorVersion() const {
+ unsigned Maj, Min, Micro;
+ getOSVersion(Maj, Min, Micro);
+ return Maj;
+ }
+
/// @}
/// @name Direct Component Access
/// @{
@@ -221,21 +237,9 @@ public:
/// if the environment component is present).
StringRef getOSAndEnvironmentName() const;
- /// getOSVersion - Parse the version number from the OS name component of the
- /// triple, if present.
- ///
- /// For example, "fooos1.2.3" would return (1, 2, 3).
- ///
- /// If an entry is not defined, it will be returned as 0.
- void getOSVersion(unsigned &Major, unsigned &Minor, unsigned &Micro) const;
-
- /// getOSMajorVersion - Return just the major version number, this is
- /// specialized because it is a common query.
- unsigned getOSMajorVersion() const {
- unsigned Maj, Min, Micro;
- getOSVersion(Maj, Min, Micro);
- return Maj;
- }
+ /// @}
+ /// @name Convenience Predicates
+ /// @{
/// isOSVersionLT - Helper function for doing comparisons against version
/// numbers included in the target triple.