mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-14 15:28:20 +00:00
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
This commit is contained in:
@@ -193,6 +193,22 @@ public:
|
|||||||
return Environment;
|
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
|
/// @name Direct Component Access
|
||||||
/// @{
|
/// @{
|
||||||
@@ -221,21 +237,9 @@ public:
|
|||||||
/// if the environment component is present).
|
/// if the environment component is present).
|
||||||
StringRef getOSAndEnvironmentName() const;
|
StringRef getOSAndEnvironmentName() const;
|
||||||
|
|
||||||
/// getOSVersion - Parse the version number from the OS name component of the
|
/// @}
|
||||||
/// triple, if present.
|
/// @name Convenience Predicates
|
||||||
///
|
/// @{
|
||||||
/// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// isOSVersionLT - Helper function for doing comparisons against version
|
/// isOSVersionLT - Helper function for doing comparisons against version
|
||||||
/// numbers included in the target triple.
|
/// numbers included in the target triple.
|
||||||
|
Reference in New Issue
Block a user