diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-02-04 18:39:51 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-02-04 18:39:51 +0000 |
commit | 5e47632b8fa1a98283c09ca88cf09600862e4849 (patch) | |
tree | 43d7c9e146bc7cf8aee88bc6ac5616b9016cf530 /lib | |
parent | 506eb6df35d5b32239f0afe7eeffc65d7bb7bd63 (diff) | |
download | llvm-5e47632b8fa1a98283c09ca88cf09600862e4849.tar.gz llvm-5e47632b8fa1a98283c09ca88cf09600862e4849.tar.bz2 llvm-5e47632b8fa1a98283c09ca88cf09600862e4849.tar.xz |
Every target uses .align. Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200782 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/MC/MCAsmInfo.cpp | 1 | ||||
-rw-r--r-- | lib/MC/MCAsmStreamer.cpp | 19 | ||||
-rw-r--r-- | lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp | 1 |
3 files changed, 13 insertions, 8 deletions
diff --git a/lib/MC/MCAsmInfo.cpp b/lib/MC/MCAsmInfo.cpp index e43b80923c..7ece2729a9 100644 --- a/lib/MC/MCAsmInfo.cpp +++ b/lib/MC/MCAsmInfo.cpp @@ -58,7 +58,6 @@ MCAsmInfo::MCAsmInfo() { Data64bitsDirective = "\t.quad\t"; SunStyleELFSectionSwitchSyntax = false; UsesELFSectionDirectiveForBSS = false; - AlignDirective = "\t.align\t"; AlignmentIsInBytes = true; TextAlignFillValue = 0; GPRel64Directive = 0; diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp index 1791f73832..f64ef491a8 100644 --- a/lib/MC/MCAsmStreamer.cpp +++ b/lib/MC/MCAsmStreamer.cpp @@ -781,12 +781,19 @@ void MCAsmStreamer::EmitValueToAlignment(unsigned ByteAlignment, int64_t Value, // emit alignments as a power of two if possible. if (isPowerOf2_32(ByteAlignment)) { switch (ValueSize) { - default: llvm_unreachable("Invalid size for machine code value!"); - case 1: OS << MAI->getAlignDirective(); break; - // FIXME: use MAI for this! - case 2: OS << ".p2alignw "; break; - case 4: OS << ".p2alignl "; break; - case 8: llvm_unreachable("Unsupported alignment size!"); + default: + llvm_unreachable("Invalid size for machine code value!"); + case 1: + OS << "\t.align\t"; + break; + case 2: + OS << ".p2alignw "; + break; + case 4: + OS << ".p2alignl "; + break; + case 8: + llvm_unreachable("Unsupported alignment size!"); } if (MAI->getAlignmentIsInBytes()) diff --git a/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp b/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp index f4dec13283..aee9bd1d66 100644 --- a/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp +++ b/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp @@ -40,7 +40,6 @@ AMDGPUMCAsmInfo::AMDGPUMCAsmInfo(StringRef &TT) : MCAsmInfo() { UsesELFSectionDirectiveForBSS = true; //===--- Alignment Information ----------------------------------------===// - AlignDirective = ".align\t"; AlignmentIsInBytes = true; TextAlignFillValue = 0; |