summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-20 06:34:14 +0000
committerChris Lattner <sabre@nondot.org>2010-01-20 06:34:14 +0000
commit8eeba35babf3114966fc4e6e8522057e46b610db (patch)
treeac7cb188d3d10049dc657fb5c1024e94abdb6bcb
parent6f8694b272ffbd5b4746feccd4866bf89794fe86 (diff)
downloadllvm-8eeba35babf3114966fc4e6e8522057e46b610db.tar.gz
llvm-8eeba35babf3114966fc4e6e8522057e46b610db.tar.bz2
llvm-8eeba35babf3114966fc4e6e8522057e46b610db.tar.xz
revert 93934, removing the MCAsmInfo endianness bit. I can't
stomache MCAsmInfo having this, and I found a better solution to this layering issue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93985 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/MC/MCAsmInfo.h6
-rw-r--r--include/llvm/MC/MCAsmInfoCOFF.h2
-rw-r--r--include/llvm/MC/MCAsmInfoDarwin.h2
-rw-r--r--lib/MC/MCAsmInfo.cpp3
-rw-r--r--lib/MC/MCAsmInfoCOFF.cpp2
-rw-r--r--lib/MC/MCAsmInfoDarwin.cpp3
-rw-r--r--lib/Target/ARM/ARMMCAsmInfo.cpp4
-rw-r--r--lib/Target/Alpha/AlphaMCAsmInfo.cpp3
-rw-r--r--lib/Target/Blackfin/BlackfinMCAsmInfo.cpp3
-rw-r--r--lib/Target/CBackend/CBackend.cpp4
-rw-r--r--lib/Target/CellSPU/SPUMCAsmInfo.cpp3
-rw-r--r--lib/Target/MSP430/MSP430MCAsmInfo.cpp3
-rw-r--r--lib/Target/Mips/MipsMCAsmInfo.cpp3
-rw-r--r--lib/Target/Mips/MipsMCAsmInfo.h18
-rw-r--r--lib/Target/Mips/MipsTargetMachine.cpp7
-rw-r--r--lib/Target/PIC16/PIC16MCAsmInfo.cpp3
-rw-r--r--lib/Target/PowerPC/PPCMCAsmInfo.cpp4
-rw-r--r--lib/Target/Sparc/SparcMCAsmInfo.cpp3
-rw-r--r--lib/Target/SystemZ/SystemZMCAsmInfo.cpp3
-rw-r--r--lib/Target/X86/X86MCAsmInfo.cpp12
-rw-r--r--lib/Target/XCore/XCoreMCAsmInfo.cpp3
21 files changed, 31 insertions, 63 deletions
diff --git a/include/llvm/MC/MCAsmInfo.h b/include/llvm/MC/MCAsmInfo.h
index 7ca7ecba6f..0be27530f2 100644
--- a/include/llvm/MC/MCAsmInfo.h
+++ b/include/llvm/MC/MCAsmInfo.h
@@ -24,7 +24,6 @@ namespace llvm {
namespace ExceptionHandling { enum ExceptionsType { None, Dwarf, SjLj }; }
class MCAsmInfo {
- bool IsLittleEndian;
protected:
//===------------------------------------------------------------------===//
// Properties to be set by the target writer, used to configure asm printer.
@@ -286,12 +285,9 @@ namespace llvm {
const char *const *AsmTransCBE; // Defaults to empty
public:
- explicit MCAsmInfo(bool isLittleEndian);
+ explicit MCAsmInfo();
virtual ~MCAsmInfo();
- bool isLittleEndian() const { return IsLittleEndian; }
- bool isBigEndian() const { return !IsLittleEndian; }
-
/// getSLEB128Size - Compute the number of bytes required for a signed
/// leb128 value.
static unsigned getSLEB128Size(int Value);
diff --git a/include/llvm/MC/MCAsmInfoCOFF.h b/include/llvm/MC/MCAsmInfoCOFF.h
index 97e9aee060..a3ee1593c3 100644
--- a/include/llvm/MC/MCAsmInfoCOFF.h
+++ b/include/llvm/MC/MCAsmInfoCOFF.h
@@ -15,7 +15,7 @@
namespace llvm {
class MCAsmInfoCOFF : public MCAsmInfo {
protected:
- explicit MCAsmInfoCOFF(bool isLittleEndian);
+ explicit MCAsmInfoCOFF();
};
}
diff --git a/include/llvm/MC/MCAsmInfoDarwin.h b/include/llvm/MC/MCAsmInfoDarwin.h
index f5e897d203..c85aa3da95 100644
--- a/include/llvm/MC/MCAsmInfoDarwin.h
+++ b/include/llvm/MC/MCAsmInfoDarwin.h
@@ -24,7 +24,7 @@ namespace llvm {
class Mangler;
struct MCAsmInfoDarwin : public MCAsmInfo {
- explicit MCAsmInfoDarwin(bool isLittleEndian);
+ explicit MCAsmInfoDarwin();
};
}
diff --git a/lib/MC/MCAsmInfo.cpp b/lib/MC/MCAsmInfo.cpp
index c15d61494c..cc03614157 100644
--- a/lib/MC/MCAsmInfo.cpp
+++ b/lib/MC/MCAsmInfo.cpp
@@ -18,8 +18,7 @@
#include <cstring>
using namespace llvm;
-MCAsmInfo::MCAsmInfo(bool isLittleEndian) {
- IsLittleEndian = isLittleEndian;
+MCAsmInfo::MCAsmInfo() {
HasMachoZeroFillDirective = false;
HasStaticCtorDtorReferenceInStaticMode = false;
NonexecutableStackDirective = 0;
diff --git a/lib/MC/MCAsmInfoCOFF.cpp b/lib/MC/MCAsmInfoCOFF.cpp
index d384c6c076..1b27bf026e 100644
--- a/lib/MC/MCAsmInfoCOFF.cpp
+++ b/lib/MC/MCAsmInfoCOFF.cpp
@@ -16,7 +16,7 @@
#include "llvm/ADT/SmallVector.h"
using namespace llvm;
-MCAsmInfoCOFF::MCAsmInfoCOFF(bool isLittleEndian) : MCAsmInfo(isLittleEndian) {
+MCAsmInfoCOFF::MCAsmInfoCOFF() {
GlobalPrefix = "_";
LCOMMDirective = "\t.lcomm\t";
COMMDirectiveTakesAlignment = false;
diff --git a/lib/MC/MCAsmInfoDarwin.cpp b/lib/MC/MCAsmInfoDarwin.cpp
index f024a1668c..664a55c088 100644
--- a/lib/MC/MCAsmInfoDarwin.cpp
+++ b/lib/MC/MCAsmInfoDarwin.cpp
@@ -15,8 +15,7 @@
#include "llvm/MC/MCAsmInfoDarwin.h"
using namespace llvm;
-MCAsmInfoDarwin::MCAsmInfoDarwin(bool isLittleEndian)
- : MCAsmInfo(isLittleEndian) {
+MCAsmInfoDarwin::MCAsmInfoDarwin() {
// Common settings for all Darwin targets.
// Syntax:
GlobalPrefix = "_";
diff --git a/lib/Target/ARM/ARMMCAsmInfo.cpp b/lib/Target/ARM/ARMMCAsmInfo.cpp
index a3499fa3cb..0ff65d2af8 100644
--- a/lib/Target/ARM/ARMMCAsmInfo.cpp
+++ b/lib/Target/ARM/ARMMCAsmInfo.cpp
@@ -40,7 +40,7 @@ static const char *const arm_asm_table[] = {
0,0
};
-ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin() : MCAsmInfoDarwin(true) {
+ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin() {
AsmTransCBE = arm_asm_table;
Data64bitsDirective = 0;
CommentString = "@";
@@ -52,7 +52,7 @@ ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin() : MCAsmInfoDarwin(true) {
AbsoluteEHSectionOffsets = false;
}
-ARMELFMCAsmInfo::ARMELFMCAsmInfo() : MCAsmInfo(true) {
+ARMELFMCAsmInfo::ARMELFMCAsmInfo() {
AlignmentIsInBytes = false;
Data64bitsDirective = 0;
CommentString = "@";
diff --git a/lib/Target/Alpha/AlphaMCAsmInfo.cpp b/lib/Target/Alpha/AlphaMCAsmInfo.cpp
index 25443cc0c6..b652a5305a 100644
--- a/lib/Target/Alpha/AlphaMCAsmInfo.cpp
+++ b/lib/Target/Alpha/AlphaMCAsmInfo.cpp
@@ -14,8 +14,7 @@
#include "AlphaMCAsmInfo.h"
using namespace llvm;
-AlphaMCAsmInfo::AlphaMCAsmInfo(const Target &T, const StringRef &TT)
- : MCAsmInfo(true) {
+AlphaMCAsmInfo::AlphaMCAsmInfo(const Target &T, const StringRef &TT) {
AlignmentIsInBytes = false;
PrivateGlobalPrefix = "$";
PICJumpTableDirective = ".gprel32";
diff --git a/lib/Target/Blackfin/BlackfinMCAsmInfo.cpp b/lib/Target/Blackfin/BlackfinMCAsmInfo.cpp
index 368cd50ed9..6d0f66cd7a 100644
--- a/lib/Target/Blackfin/BlackfinMCAsmInfo.cpp
+++ b/lib/Target/Blackfin/BlackfinMCAsmInfo.cpp
@@ -15,8 +15,7 @@
using namespace llvm;
-BlackfinMCAsmInfo::BlackfinMCAsmInfo(const Target &T, const StringRef &TT)
-: MCAsmInfo(true) {
+BlackfinMCAsmInfo::BlackfinMCAsmInfo(const Target &T, const StringRef &TT) {
GlobalPrefix = "_";
CommentString = "//";
}
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp
index 1feadd2a93..5015d1bcce 100644
--- a/lib/Target/CBackend/CBackend.cpp
+++ b/lib/Target/CBackend/CBackend.cpp
@@ -60,7 +60,7 @@ extern "C" void LLVMInitializeCBackendTarget() {
namespace {
class CBEMCAsmInfo : public MCAsmInfo {
public:
- CBEMCAsmInfo(bool isLE) : MCAsmInfo(isLE) {
+ CBEMCAsmInfo() {
GlobalPrefix = "";
PrivateGlobalPrefix = "";
}
@@ -1893,7 +1893,7 @@ bool CWriter::doInitialization(Module &M) {
if (const Target *Match = TargetRegistry::lookupTarget(Triple, E))
TAsm = Match->createAsmInfo(Triple);
#endif
- TAsm = new CBEMCAsmInfo(TD->isLittleEndian());
+ TAsm = new CBEMCAsmInfo();
Mang = new Mangler(*TAsm);
// Keep track of which functions are static ctors/dtors so they can have
diff --git a/lib/Target/CellSPU/SPUMCAsmInfo.cpp b/lib/Target/CellSPU/SPUMCAsmInfo.cpp
index 3b43a7e209..1c921ab87f 100644
--- a/lib/Target/CellSPU/SPUMCAsmInfo.cpp
+++ b/lib/Target/CellSPU/SPUMCAsmInfo.cpp
@@ -14,8 +14,7 @@
#include "SPUMCAsmInfo.h"
using namespace llvm;
-SPULinuxMCAsmInfo::SPULinuxMCAsmInfo(const Target &T, const StringRef &TT)
- : MCAsmInfo(false) {
+SPULinuxMCAsmInfo::SPULinuxMCAsmInfo(const Target &T, const StringRef &TT) {
ZeroDirective = "\t.space\t";
SetDirective = "\t.set";
Data64bitsDirective = "\t.quad\t";
diff --git a/lib/Target/MSP430/MSP430MCAsmInfo.cpp b/lib/Target/MSP430/MSP430MCAsmInfo.cpp
index 92adc38169..516eacb535 100644
--- a/lib/Target/MSP430/MSP430MCAsmInfo.cpp
+++ b/lib/Target/MSP430/MSP430MCAsmInfo.cpp
@@ -14,8 +14,7 @@
#include "MSP430MCAsmInfo.h"
using namespace llvm;
-MSP430MCAsmInfo::MSP430MCAsmInfo(const Target &T, const StringRef &TT) :
- MCAsmInfo(true) {
+MSP430MCAsmInfo::MSP430MCAsmInfo(const Target &T, const StringRef &TT) {
PrivateGlobalPrefix = ".L";
WeakRefDirective ="\t.weak\t";
SetDirective = "\t.set\t";
diff --git a/lib/Target/Mips/MipsMCAsmInfo.cpp b/lib/Target/Mips/MipsMCAsmInfo.cpp
index 9a0c0bfdba..60ef1c9e4f 100644
--- a/lib/Target/Mips/MipsMCAsmInfo.cpp
+++ b/lib/Target/Mips/MipsMCAsmInfo.cpp
@@ -14,8 +14,7 @@
#include "MipsMCAsmInfo.h"
using namespace llvm;
-MipsMCAsmInfo::MipsMCAsmInfo(const Target &T, const StringRef &TT,
- bool isLittleEndian) : MCAsmInfo(isLittleEndian) {
+MipsMCAsmInfo::MipsMCAsmInfo(const Target &T, const StringRef &TT) {
AlignmentIsInBytes = false;
COMMDirectiveTakesAlignment = true;
Data16bitsDirective = "\t.half\t";
diff --git a/lib/Target/Mips/MipsMCAsmInfo.h b/lib/Target/Mips/MipsMCAsmInfo.h
index 62ef463c0f..33a4b5edb2 100644
--- a/lib/Target/Mips/MipsMCAsmInfo.h
+++ b/lib/Target/Mips/MipsMCAsmInfo.h
@@ -22,23 +22,9 @@ namespace llvm {
class MipsMCAsmInfo : public MCAsmInfo {
public:
- explicit MipsMCAsmInfo(const Target &T, const StringRef &TT,
- bool isLittleEndian);
- };
-
- /// Big Endian MAI.
- class MipsBEMCAsmInfo : public MipsMCAsmInfo {
- public:
- MipsBEMCAsmInfo(const Target &T, const StringRef &TT)
- : MipsMCAsmInfo(T, TT, false) {}
- };
-
- /// Little Endian MAI.
- class MipsLEMCAsmInfo : public MipsMCAsmInfo {
- public:
- MipsLEMCAsmInfo(const Target &T, const StringRef &TT)
- : MipsMCAsmInfo(T, TT, true) {}
+ explicit MipsMCAsmInfo(const Target &T, const StringRef &TT);
};
+
} // namespace llvm
#endif
diff --git a/lib/Target/Mips/MipsTargetMachine.cpp b/lib/Target/Mips/MipsTargetMachine.cpp
index 1168fef66e..4724ff7d34 100644
--- a/lib/Target/Mips/MipsTargetMachine.cpp
+++ b/lib/Target/Mips/MipsTargetMachine.cpp
@@ -22,8 +22,8 @@ extern "C" void LLVMInitializeMipsTarget() {
// Register the target.
RegisterTargetMachine<MipsTargetMachine> X(TheMipsTarget);
RegisterTargetMachine<MipselTargetMachine> Y(TheMipselTarget);
- RegisterAsmInfo<MipsBEMCAsmInfo> A(TheMipsTarget);
- RegisterAsmInfo<MipsLEMCAsmInfo> B(TheMipselTarget);
+ RegisterAsmInfo<MipsMCAsmInfo> A(TheMipsTarget);
+ RegisterAsmInfo<MipsMCAsmInfo> B(TheMipselTarget);
}
// DataLayout --> Big-endian, 32-bit pointer/ABI/alignment
@@ -60,7 +60,8 @@ MipselTargetMachine(const Target &T, const std::string &TT,
// Install an instruction selector pass using
// the ISelDag to gen Mips code.
bool MipsTargetMachine::
-addInstSelector(PassManagerBase &PM, CodeGenOpt::Level OptLevel) {
+addInstSelector(PassManagerBase &PM, CodeGenOpt::Level OptLevel)
+{
PM.add(createMipsISelDag(*this));
return false;
}
diff --git a/lib/Target/PIC16/PIC16MCAsmInfo.cpp b/lib/Target/PIC16/PIC16MCAsmInfo.cpp
index a6331e64cc..827315e13b 100644
--- a/lib/Target/PIC16/PIC16MCAsmInfo.cpp
+++ b/lib/Target/PIC16/PIC16MCAsmInfo.cpp
@@ -20,8 +20,7 @@
#include "PIC16ISelLowering.h"
using namespace llvm;
-PIC16MCAsmInfo::PIC16MCAsmInfo(const Target &T, const StringRef &TT)
-: MCAsmInfo(true) {
+PIC16MCAsmInfo::PIC16MCAsmInfo(const Target &T, const StringRef &TT) {
CommentString = ";";
GlobalPrefix = PAN::getTagName(PAN::PREFIX_SYMBOL);
GlobalDirective = "\tglobal\t";
diff --git a/lib/Target/PowerPC/PPCMCAsmInfo.cpp b/lib/Target/PowerPC/PPCMCAsmInfo.cpp
index 12de9427f4..ee6deb5c50 100644
--- a/lib/Target/PowerPC/PPCMCAsmInfo.cpp
+++ b/lib/Target/PowerPC/PPCMCAsmInfo.cpp
@@ -14,7 +14,7 @@
#include "PPCMCAsmInfo.h"
using namespace llvm;
-PPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(bool is64Bit) : MCAsmInfoDarwin(false) {
+PPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(bool is64Bit) {
PCSymbol = ".";
CommentString = ";";
ExceptionsType = ExceptionHandling::Dwarf;
@@ -25,7 +25,7 @@ PPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(bool is64Bit) : MCAsmInfoDarwin(false) {
SupportsDebugInformation= true; // Debug information.
}
-PPCLinuxMCAsmInfo::PPCLinuxMCAsmInfo(bool is64Bit) : MCAsmInfo(false) {
+PPCLinuxMCAsmInfo::PPCLinuxMCAsmInfo(bool is64Bit) {
CommentString = "#";
GlobalPrefix = "";
PrivateGlobalPrefix = ".L";
diff --git a/lib/Target/Sparc/SparcMCAsmInfo.cpp b/lib/Target/Sparc/SparcMCAsmInfo.cpp
index cb6da961b8..b67537c178 100644
--- a/lib/Target/Sparc/SparcMCAsmInfo.cpp
+++ b/lib/Target/Sparc/SparcMCAsmInfo.cpp
@@ -15,8 +15,7 @@
#include "llvm/ADT/SmallVector.h"
using namespace llvm;
-SparcELFMCAsmInfo::SparcELFMCAsmInfo(const Target &T, const StringRef &TT)
- : MCAsmInfo(/*isLittleEndian*/ false) {
+SparcELFMCAsmInfo::SparcELFMCAsmInfo(const Target &T, const StringRef &TT) {
Data16bitsDirective = "\t.half\t";
Data32bitsDirective = "\t.word\t";
Data64bitsDirective = 0; // .xword is only supported by V9.
diff --git a/lib/Target/SystemZ/SystemZMCAsmInfo.cpp b/lib/Target/SystemZ/SystemZMCAsmInfo.cpp
index c17535f4e2..8ea11c95b2 100644
--- a/lib/Target/SystemZ/SystemZMCAsmInfo.cpp
+++ b/lib/Target/SystemZ/SystemZMCAsmInfo.cpp
@@ -14,8 +14,7 @@
#include "SystemZMCAsmInfo.h"
using namespace llvm;
-SystemZMCAsmInfo::SystemZMCAsmInfo(const Target &T, const StringRef &TT)
-: MCAsmInfo(false) {
+SystemZMCAsmInfo::SystemZMCAsmInfo(const Target &T, const StringRef &TT) {
AlignmentIsInBytes = true;
PrivateGlobalPrefix = ".L";
diff --git a/lib/Target/X86/X86MCAsmInfo.cpp b/lib/Target/X86/X86MCAsmInfo.cpp
index bba36e86ca..001ce80728 100644
--- a/lib/Target/X86/X86MCAsmInfo.cpp
+++ b/lib/Target/X86/X86MCAsmInfo.cpp
@@ -43,8 +43,7 @@ static const char *const x86_asm_table[] = {
"{cc}", "cc",
0,0};
-X86MCAsmInfoDarwin::X86MCAsmInfoDarwin(const Triple &Triple)
- : MCAsmInfoDarwin(true /*islittleendian*/) {
+X86MCAsmInfoDarwin::X86MCAsmInfoDarwin(const Triple &Triple) {
AsmTransCBE = x86_asm_table;
AssemblerDialect = AsmWriterFlavor;
@@ -69,8 +68,7 @@ X86MCAsmInfoDarwin::X86MCAsmInfoDarwin(const Triple &Triple)
AbsoluteEHSectionOffsets = false;
}
-X86ELFMCAsmInfo::X86ELFMCAsmInfo(const Triple &Triple)
- : MCAsmInfo(true /*islittleendian*/) {
+X86ELFMCAsmInfo::X86ELFMCAsmInfo(const Triple &Triple) {
AsmTransCBE = x86_asm_table;
AssemblerDialect = AsmWriterFlavor;
@@ -95,15 +93,13 @@ X86ELFMCAsmInfo::X86ELFMCAsmInfo(const Triple &Triple)
NonexecutableStackDirective = "\t.section\t.note.GNU-stack,\"\",@progbits";
}
-X86MCAsmInfoCOFF::X86MCAsmInfoCOFF(const Triple &Triple)
- : MCAsmInfoCOFF(true /*islittleendian*/) {
+X86MCAsmInfoCOFF::X86MCAsmInfoCOFF(const Triple &Triple) {
AsmTransCBE = x86_asm_table;
AssemblerDialect = AsmWriterFlavor;
}
-X86WinMCAsmInfo::X86WinMCAsmInfo(const Triple &Triple)
- : MCAsmInfo(true /*islittleendian*/) {
+X86WinMCAsmInfo::X86WinMCAsmInfo(const Triple &Triple) {
AsmTransCBE = x86_asm_table;
AssemblerDialect = AsmWriterFlavor;
diff --git a/lib/Target/XCore/XCoreMCAsmInfo.cpp b/lib/Target/XCore/XCoreMCAsmInfo.cpp
index b6c0cfccf9..dffdda9a1f 100644
--- a/lib/Target/XCore/XCoreMCAsmInfo.cpp
+++ b/lib/Target/XCore/XCoreMCAsmInfo.cpp
@@ -10,8 +10,7 @@
#include "XCoreMCAsmInfo.h"
using namespace llvm;
-XCoreMCAsmInfo::XCoreMCAsmInfo(const Target &T, const StringRef &TT)
-: MCAsmInfo(true) {
+XCoreMCAsmInfo::XCoreMCAsmInfo(const Target &T, const StringRef &TT) {
SupportsDebugInformation = true;
Data16bitsDirective = "\t.short\t";
Data32bitsDirective = "\t.long\t";