[llvm-commits] [llvm] r120270 - /llvm/trunk/lib/MC/MCPureStreamer.cpp
Rafael Espindola
rafael.espindola at gmail.com
Sun Nov 28 15:13:47 PST 2010
Author: rafael
Date: Sun Nov 28 17:13:47 2010
New Revision: 120270
URL: http://llvm.org/viewvc/llvm-project?rev=120270&view=rev
Log:
Forgot the MCPureStreamer::EmitValue in the previous commit.
Modified:
llvm/trunk/lib/MC/MCPureStreamer.cpp
Modified: llvm/trunk/lib/MC/MCPureStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCPureStreamer.cpp?rev=120270&r1=120269&r2=120270&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCPureStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCPureStreamer.cpp Sun Nov 28 17:13:47 2010
@@ -42,7 +42,6 @@
virtual void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = 0,
unsigned Size = 0, unsigned ByteAlignment = 0);
virtual void EmitBytes(StringRef Data, unsigned AddrSpace);
- virtual void EmitValue(const MCExpr *Value, unsigned Size,unsigned AddrSpace);
virtual void EmitValueToAlignment(unsigned ByteAlignment, int64_t Value = 0,
unsigned ValueSize = 1,
unsigned MaxBytesToEmit = 0);
@@ -155,26 +154,6 @@
getOrCreateDataFragment()->getContents().append(Data.begin(), Data.end());
}
-void MCPureStreamer::EmitValue(const MCExpr *Value, unsigned Size,
- unsigned AddrSpace) {
- // TODO: This is exactly the same as WinCOFFStreamer. Consider merging into
- // MCObjectStreamer.
- MCDataFragment *DF = getOrCreateDataFragment();
-
- // Avoid fixups when possible.
- int64_t AbsValue;
- if (AddValueSymbols(Value)->EvaluateAsAbsolute(AbsValue)) {
- // FIXME: Endianness assumption.
- for (unsigned i = 0; i != Size; ++i)
- DF->getContents().push_back(uint8_t(AbsValue >> (i * 8)));
- } else {
- DF->addFixup(MCFixup::Create(DF->getContents().size(),
- AddValueSymbols(Value),
- MCFixup::getKindForSize(Size, false)));
- DF->getContents().resize(DF->getContents().size() + Size, 0);
- }
-}
-
void MCPureStreamer::EmitValueToAlignment(unsigned ByteAlignment,
int64_t Value, unsigned ValueSize,
unsigned MaxBytesToEmit) {
More information about the llvm-commits
mailing list