diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-05-12 22:51:27 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-05-12 22:51:27 +0000 |
commit | 51402b79e4126de9249a02dcb9bb00286cc4bea1 (patch) | |
tree | 34312684cfc10e7de2c2d8f9239b9805a03a562c /llvm/lib/MC/MCAssembler.cpp | |
parent | e132b0a92cdcd6648eab6b1116e00438f8d15e2b (diff) | |
download | bcm5719-llvm-51402b79e4126de9249a02dcb9bb00286cc4bea1.tar.gz bcm5719-llvm-51402b79e4126de9249a02dcb9bb00286cc4bea1.zip |
MC: Drop support for alignment in ZeroFill fragment, we can just use
MCAlignFragments for this.
llvm-svn: 103661
Diffstat (limited to 'llvm/lib/MC/MCAssembler.cpp')
-rw-r--r-- | llvm/lib/MC/MCAssembler.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp index 7bcce2e7e34..fbda26b4ce8 100644 --- a/llvm/lib/MC/MCAssembler.cpp +++ b/llvm/lib/MC/MCAssembler.cpp @@ -421,16 +421,7 @@ void MCAssembler::LayoutFragment(MCAsmLayout &Layout, MCFragment &F) { } case MCFragment::FT_ZeroFill: { - MCZeroFillFragment &ZFF = cast<MCZeroFillFragment>(F); - - // Align the fragment offset; it is safe to adjust the offset freely since - // this is only in virtual sections. - // - // FIXME: We shouldn't be doing this here. - Address = RoundUpToAlignment(Address, ZFF.getAlignment()); - Layout.setFragmentOffset(&F, Address - StartAddress); - - EffectiveSize = ZFF.getSize(); + EffectiveSize = cast<MCZeroFillFragment>(F).getSize(); break; } } @@ -498,6 +489,8 @@ static void WriteFragmentData(const MCAssembler &Asm, const MCAsmLayout &Layout, MCAlignFragment &AF = cast<MCAlignFragment>(F); uint64_t Count = FragmentSize / AF.getValueSize(); + assert(AF.getValueSize() && "Invalid virtual align in concrete fragment!"); + // FIXME: This error shouldn't actually occur (the front end should emit // multiple .align directives to enforce the semantics it wants), but is // severe enough that we want to report it. How to handle this? @@ -912,7 +905,7 @@ void MCZeroFillFragment::dump() { OS << "<MCZeroFillFragment "; this->MCFragment::dump(); OS << "\n "; - OS << " Size:" << getSize() << " Alignment:" << getAlignment() << ">"; + OS << " Size:" << getSize() << ">"; } void MCSectionData::dump() { |