1 //===- llvm/System/Host.h - Host machine characteristics --------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // Methods for querying the nature of the host machine.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_SYSTEM_HOST_H
15 #define LLVM_SYSTEM_HOST_H
22 inline bool isLittleEndianHost() {
31 inline bool isBigEndianHost() {
32 return !isLittleEndianHost();
35 /// getHostTriple() - Return the target triple of the running
38 /// The target triple is a string in the format of:
39 /// CPU_TYPE-VENDOR-OPERATING_SYSTEM
41 /// CPU_TYPE-VENDOR-KERNEL-OPERATING_SYSTEM
42 std::string getHostTriple();
44 /// getHostCPUName - Get the LLVM name for the host CPU. The particular format
45 /// of the name is target dependent, and suitable for passing as -mcpu to the
46 /// target which matches the host.
48 /// \return - The host CPU name, or empty if the CPU could not be determined.
49 std::string getHostCPUName();