aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/System
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-10-02 01:17:28 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-10-02 01:17:28 +0000
commitbb146720973e23a21015a86176bfb1cbf552fb10 (patch)
tree5a095c4f27d48351504fd66f0e895db738115e05 /include/llvm/System
parent0b3baaa7fb47e0cbbaad700ee2280fa148e15afd (diff)
Add llvm::sys::{osName,osVersion} for retrieving operating system name
& version as strings. - Win32 code is untested. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56942 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/System')
-rw-r--r--include/llvm/System/Host.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/System/Host.h b/include/llvm/System/Host.h
index 5e4cc1b62b..711959325d 100644
--- a/include/llvm/System/Host.h
+++ b/include/llvm/System/Host.h
@@ -14,6 +14,8 @@
#ifndef LLVM_SYSTEM_HOST_H
#define LLVM_SYSTEM_HOST_H
+#include <string>
+
namespace llvm {
namespace sys {
@@ -30,6 +32,13 @@ namespace sys {
return !littleEndianHost();
}
+ /// osName() - Return the name of the host operating system or "" if
+ /// unknown.
+ std::string osName();
+
+ /// osVersion() - Return the operating system version as a string or
+ /// "" if unknown.
+ std::string osVersion();
}
}