don't have to #include config.h in it. #including config.h breaks
other projects that have their own autoconf stuff and try to #include
the llvm headers. One obscure example is llvm-gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44825
91177308-0d34-0410-b5e6-
96231b3b80d8
#include "llvm/Pass.h"
#include "llvm/Support/DataTypes.h"
#include "llvm/ADT/SmallVector.h"
-#include "llvm/Config/config.h"
#include <string>
namespace llvm {
bool isLittleEndian() const { return LittleEndian; }
bool isBigEndian() const { return !LittleEndian; }
- /// Host endianness...
- bool hostIsLittleEndian() const {
-#ifdef LSB_FIRST
- return true;
-#else
- return false;
-#endif
- }
+ /// Host endianness.
+ bool hostIsLittleEndian() const;
bool hostIsBigEndian() const { return !hostIsLittleEndian(); }
/// getStringRepresentation - Return the string representation of the
#include "llvm/Support/ManagedStatic.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/StringExtras.h"
+#include "llvm/Config/config.h"
#include <algorithm>
#include <cstdlib>
#include <sstream>
// TargetData Class Implementation
//===----------------------------------------------------------------------===//
+bool TargetData::hostIsLittleEndian() const {
+#ifdef LSB_FIRST
+ return true;
+#else
+ return false;
+#endif
+}
+
/*!
A TargetDescription string consists of a sequence of hyphen-delimited
specifiers for target endianness, pointer size and alignments, and various