summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-22 19:53:00 +0000
committerChris Lattner <sabre@nondot.org>2009-01-22 19:53:00 +0000
commitb67c95834226fc44c435ca97dc5a536bccb30bbf (patch)
treef38c314327a067bddd5b26db97a608e176a66d9b
parent5e3c013f81829645ca53a93a92b8032b7049aed3 (diff)
downloadllvm-b67c95834226fc44c435ca97dc5a536bccb30bbf.tar.gz
llvm-b67c95834226fc44c435ca97dc5a536bccb30bbf.tar.bz2
llvm-b67c95834226fc44c435ca97dc5a536bccb30bbf.tar.xz
rename methods in System/Host to be more consistent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62776 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/System/Host.h14
-rw-r--r--lib/ExecutionEngine/ExecutionEngine.cpp8
-rw-r--r--lib/System/Unix/Host.inc4
-rw-r--r--lib/System/Win32/Host.inc4
4 files changed, 15 insertions, 15 deletions
diff --git a/include/llvm/System/Host.h b/include/llvm/System/Host.h
index 711959325d..22e36e7ba7 100644
--- a/include/llvm/System/Host.h
+++ b/include/llvm/System/Host.h
@@ -19,7 +19,7 @@
namespace llvm {
namespace sys {
- inline bool littleEndianHost() {
+ inline bool isLittleEndianHost() {
union {
int i;
char c;
@@ -28,17 +28,17 @@ namespace sys {
return c;
}
- inline bool bigEndianHost() {
- return !littleEndianHost();
+ inline bool isBigEndianHost() {
+ return !isLittleEndianHost();
}
- /// osName() - Return the name of the host operating system or "" if
+ /// getOSName() - Return the name of the host operating system or "" if
/// unknown.
- std::string osName();
+ std::string getOSName();
- /// osVersion() - Return the operating system version as a string or
+ /// getOSVersion() - Return the operating system version as a string or
/// "" if unknown.
- std::string osVersion();
+ std::string getOSVersion();
}
}
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp
index a1fbdd2812..d1a406c996 100644
--- a/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -692,7 +692,7 @@ static void StoreIntToMemory(const APInt &IntVal, uint8_t *Dst,
assert((IntVal.getBitWidth()+7)/8 >= StoreBytes && "Integer too small!");
uint8_t *Src = (uint8_t *)IntVal.getRawData();
- if (sys::littleEndianHost())
+ if (sys::isLittleEndianHost())
// Little-endian host - the source is ordered from LSB to MSB. Order the
// destination from LSB to MSB: Do a straight copy.
memcpy(Dst, Src, StoreBytes);
@@ -751,7 +751,7 @@ void ExecutionEngine::StoreValueToMemory(const GenericValue &Val,
cerr << "Cannot store value of type " << *Ty << "!\n";
}
- if (sys::littleEndianHost() != getTargetData()->isLittleEndian())
+ if (sys::isLittleEndianHost() != getTargetData()->isLittleEndian())
// Host and target are different endian - reverse the stored bytes.
std::reverse((uint8_t*)Ptr, StoreBytes + (uint8_t*)Ptr);
}
@@ -762,7 +762,7 @@ static void LoadIntFromMemory(APInt &IntVal, uint8_t *Src, unsigned LoadBytes) {
assert((IntVal.getBitWidth()+7)/8 >= LoadBytes && "Integer too small!");
uint8_t *Dst = (uint8_t *)IntVal.getRawData();
- if (sys::littleEndianHost())
+ if (sys::isLittleEndianHost())
// Little-endian host - the destination must be ordered from LSB to MSB.
// The source is ordered from LSB to MSB: Do a straight copy.
memcpy(Dst, Src, LoadBytes);
@@ -789,7 +789,7 @@ void ExecutionEngine::LoadValueFromMemory(GenericValue &Result,
const Type *Ty) {
const unsigned LoadBytes = getTargetData()->getTypeStoreSize(Ty);
- if (sys::littleEndianHost() != getTargetData()->isLittleEndian()) {
+ if (sys::isLittleEndianHost() != getTargetData()->isLittleEndian()) {
// Host and target are different endian - reverse copy the stored
// bytes into a buffer, and load from that.
uint8_t *Src = (uint8_t*)Ptr;
diff --git a/lib/System/Unix/Host.inc b/lib/System/Unix/Host.inc
index 7bee66fd0d..205ce2362c 100644
--- a/lib/System/Unix/Host.inc
+++ b/lib/System/Unix/Host.inc
@@ -23,7 +23,7 @@
using namespace llvm;
-std::string llvm::sys::osName() {
+std::string llvm::sys::getOSName() {
struct utsname info;
if (uname(&info))
@@ -32,7 +32,7 @@ std::string llvm::sys::osName() {
return info.sysname;
}
-std::string llvm::sys::osVersion() {
+std::string llvm::sys::getOSVersion() {
struct utsname info;
if (uname(&info))
diff --git a/lib/System/Win32/Host.inc b/lib/System/Win32/Host.inc
index 7bbf2bd346..4fabc78ade 100644
--- a/lib/System/Win32/Host.inc
+++ b/lib/System/Win32/Host.inc
@@ -17,11 +17,11 @@
using namespace llvm;
-std::string sys::osName() {
+std::string sys::getOSName() {
return "Windows";
}
-std::string sys::osVersion() {
+std::string sys::getOSVersion() {
OSVERSIONINFO osvi;
memset(&osvi, 0, sizeof(osvi));