[llvm-commits] [llvm] r149211 - /llvm/trunk/include/llvm/ADT/Triple.h
Chandler Carruth
chandlerc at gmail.com
Sun Jan 29 15:09:12 PST 2012
Author: chandlerc
Date: Sun Jan 29 17:09:12 2012
New Revision: 149211
URL: http://llvm.org/viewvc/llvm-project?rev=149211&view=rev
Log:
Cleanup the organization of some methods in llvm::Triple and provide
a better doxyment group for convenience predicates.
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=149211&r1=149210&r2=149211&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/Triple.h (original)
+++ llvm/trunk/include/llvm/ADT/Triple.h Sun Jan 29 17:09:12 2012
@@ -193,6 +193,22 @@
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 @@
/// 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.
More information about the llvm-commits
mailing list