14 #ifndef LLVM_SUPPORT_HOST_H
15 #define LLVM_SUPPORT_HOST_H
20 #if defined(__linux__) || defined(__GNU__) || defined(__HAIKU__)
23 #include <sys/machine.h>
26 #include <sys/types.h>
27 #define BIG_ENDIAN 4321
28 #define LITTLE_ENDIAN 1234
29 #if defined(_BIG_ENDIAN)
30 #define BYTE_ORDER BIG_ENDIAN
32 #define BYTE_ORDER LITTLE_ENDIAN
35 #if !defined(BYTE_ORDER) && !defined(LLVM_ON_WIN32)
36 #include <machine/endian.h>
45 #if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN
StringRef getHostCPUNameForARM(const StringRef &ProcCpuinfoContent)
std::string getDefaultTargetTriple()
getDefaultTargetTriple() - Return the default target triple the compiler has been configured to produ...
int getHostNumPhysicalCores()
Get the number of physical cores (as opposed to logical cores returned from thread::hardware_concurre...
constexpr bool IsBigEndianHost
StringRef getHostCPUNameForS390x(const StringRef &ProcCpuinfoContent)
static const bool IsLittleEndianHost
StringRef getHostCPUNameForPowerPC(const StringRef &ProcCpuinfoContent)
Helper functions to extract HostCPUName from /proc/cpuinfo on linux.
std::string getProcessTriple()
getProcessTriple() - Return an appropriate target triple for generating code to be loaded into the cu...
StringRef getHostCPUName()
getHostCPUName - Get the LLVM name for the host CPU.
const FeatureBitset Features
StringRef - Represent a constant reference to a string, i.e.
bool getHostCPUFeatures(StringMap< bool > &Features)
getHostCPUFeatures - Get the LLVM names for the host CPU features.