[llvm-commits] [llvm] r103664 - in /llvm/trunk: include/llvm/MC/MCAssembler.h lib/MC/MCAssembler.cpp lib/MC/MCMachOStreamer.cpp
Daniel Dunbar
daniel at zuster.org
Wed May 12 15:51:38 PDT 2010
Author: ddunbar
Date: Wed May 12 17:51:38 2010
New Revision: 103664
URL: http://llvm.org/viewvc/llvm-project?rev=103664&view=rev
Log:
MC: Eliminate MCZeroFillFragment, it is no longer needed.
Modified:
llvm/trunk/include/llvm/MC/MCAssembler.h
llvm/trunk/lib/MC/MCAssembler.cpp
llvm/trunk/lib/MC/MCMachOStreamer.cpp
Modified: llvm/trunk/include/llvm/MC/MCAssembler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAssembler.h?rev=103664&r1=103663&r2=103664&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCAssembler.h (original)
+++ llvm/trunk/include/llvm/MC/MCAssembler.h Wed May 12 17:51:38 2010
@@ -69,8 +69,7 @@
FT_Data,
FT_Fill,
FT_Inst,
- FT_Org,
- FT_ZeroFill
+ FT_Org
};
private:
@@ -357,31 +356,6 @@
virtual void dump();
};
-/// MCZeroFillFragment - Represent data which has a fixed size and alignment,
-/// but requires no physical space in the object file.
-class MCZeroFillFragment : public MCFragment {
- /// Size - The size of this fragment.
- uint64_t Size;
-
-public:
- MCZeroFillFragment(uint64_t _Size, MCSectionData *SD = 0)
- : MCFragment(FT_ZeroFill, SD), Size(_Size) {}
-
- /// @name Accessors
- /// @{
-
- uint64_t getSize() const { return Size; }
-
- /// @}
-
- static bool classof(const MCFragment *F) {
- return F->getKind() == MCFragment::FT_ZeroFill;
- }
- static bool classof(const MCZeroFillFragment *) { return true; }
-
- virtual void dump();
-};
-
// FIXME: Should this be a separate class, or just merged into MCSection? Since
// we anticipate the fast path being through an MCAssembler, the only reason to
// keep it out is for API abstraction.
Modified: llvm/trunk/lib/MC/MCAssembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAssembler.cpp?rev=103664&r1=103663&r2=103664&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAssembler.cpp (original)
+++ llvm/trunk/lib/MC/MCAssembler.cpp Wed May 12 17:51:38 2010
@@ -394,8 +394,7 @@
break;
case MCFragment::FT_Fill: {
- MCFillFragment &FF = cast<MCFillFragment>(F);
- EffectiveSize = FF.getSize();
+ EffectiveSize = cast<MCFillFragment>(F).getSize();
break;
}
@@ -419,11 +418,6 @@
EffectiveSize = Offset;
break;
}
-
- case MCFragment::FT_ZeroFill: {
- EffectiveSize = cast<MCZeroFillFragment>(F).getSize();
- break;
- }
}
Layout.setFragmentEffectiveSize(&F, EffectiveSize);
@@ -562,11 +556,6 @@
break;
}
-
- case MCFragment::FT_ZeroFill: {
- assert(0 && "Invalid zero fill fragment in concrete section!");
- break;
- }
}
assert(OW->getStream().tell() - Start == FragmentSize);
@@ -596,8 +585,6 @@
assert(!cast<MCFillFragment>(it)->getValueSize() &&
"Invalid fill in virtual section!");
break;
- case MCFragment::FT_ZeroFill:
- break;
}
}
@@ -922,15 +909,6 @@
OS << " Offset:" << getOffset() << " Value:" << getValue() << ">";
}
-void MCZeroFillFragment::dump() {
- raw_ostream &OS = llvm::errs();
-
- OS << "<MCZeroFillFragment ";
- this->MCFragment::dump();
- OS << "\n ";
- OS << " Size:" << getSize() << ">";
-}
-
void MCSectionData::dump() {
raw_ostream &OS = llvm::errs();
Modified: llvm/trunk/lib/MC/MCMachOStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCMachOStreamer.cpp?rev=103664&r1=103663&r2=103664&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCMachOStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCMachOStreamer.cpp Wed May 12 17:51:38 2010
@@ -326,7 +326,7 @@
new MCAlignFragment(ByteAlignment, 0, 0, ByteAlignment, /*EmitNops=*/false,
&SectData);
- MCFragment *F = new MCZeroFillFragment(Size, &SectData);
+ MCFragment *F = new MCFillFragment(0, 0, Size, &SectData);
SD.setFragment(F);
if (Assembler.isSymbolLinkerVisible(&SD))
F->setAtom(&SD);
More information about the llvm-commits
mailing list