summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DataLayout.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-10-20 10:41:29 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-10-20 10:41:29 +0000
commitf67321cb26010c9450fe385d4e1031b8523c148d (patch)
treecf896775d4f75e99ea4958a998410d428226c4f2 /llvm/lib/IR/DataLayout.cpp
parent798f882b68d492a364c5962fcdd7af08a3ac34c9 (diff)
downloadbcm5719-llvm-f67321cb26010c9450fe385d4e1031b8523c148d.tar.gz
bcm5719-llvm-f67321cb26010c9450fe385d4e1031b8523c148d.zip
Switch the default DataLayout to be little endian, and make the variable
be BigEndian so the default can continue to be zero-initialized. This is one of the prerequisites to making DataLayout a constant and always available part of every module. llvm-svn: 220193
Diffstat (limited to 'llvm/lib/IR/DataLayout.cpp')
-rw-r--r--llvm/lib/IR/DataLayout.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/IR/DataLayout.cpp b/llvm/lib/IR/DataLayout.cpp
index eb13a95954f..8a057f552a5 100644
--- a/llvm/lib/IR/DataLayout.cpp
+++ b/llvm/lib/IR/DataLayout.cpp
@@ -179,7 +179,7 @@ void DataLayout::reset(StringRef Desc) {
clear();
LayoutMap = nullptr;
- LittleEndian = false;
+ BigEndian = false;
StackNaturalAlign = 0;
ManglingMode = MM_None;
@@ -239,10 +239,10 @@ void DataLayout::parseSpecifier(StringRef Desc) {
// FIXME: remove this on LLVM 4.0.
break;
case 'E':
- LittleEndian = false;
+ BigEndian = true;
break;
case 'e':
- LittleEndian = true;
+ BigEndian = false;
break;
case 'p': {
// Address space.
@@ -357,7 +357,7 @@ void DataLayout::init(const Module *M) {
}
bool DataLayout::operator==(const DataLayout &Other) const {
- bool Ret = LittleEndian == Other.LittleEndian &&
+ bool Ret = BigEndian == Other.BigEndian &&
StackNaturalAlign == Other.StackNaturalAlign &&
ManglingMode == Other.ManglingMode &&
LegalIntWidths == Other.LegalIntWidths &&
@@ -526,7 +526,7 @@ std::string DataLayout::getStringRepresentation() const {
std::string Result;
raw_string_ostream OS(Result);
- OS << (LittleEndian ? "e" : "E");
+ OS << (BigEndian ? "E" : "e");
switch (ManglingMode) {
case MM_None:
OpenPOWER on IntegriCloud