summaryrefslogtreecommitdiff
path: root/lib/MC/MCObjectStreamer.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-07-02 15:49:13 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-07-02 15:49:13 +0000
commita3863ea2dacafc925a8272ebf9884fc64bef686c (patch)
tree7634df6765ba25148891adb4c9fc981b8586c1f6 /lib/MC/MCObjectStreamer.cpp
parent35b7bebe1162326c38217ff80d4a49fbbffcc365 (diff)
downloadllvm-a3863ea2dacafc925a8272ebf9884fc64bef686c.tar.gz
llvm-a3863ea2dacafc925a8272ebf9884fc64bef686c.tar.bz2
llvm-a3863ea2dacafc925a8272ebf9884fc64bef686c.tar.xz
Remove address spaces from MC.
This is dead code since PIC16 was removed in 2010. The result was an odd mix, where some parts would carefully pass it along and others would assert it was zero (most of the object streamer for example). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185436 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCObjectStreamer.cpp')
-rw-r--r--lib/MC/MCObjectStreamer.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/lib/MC/MCObjectStreamer.cpp b/lib/MC/MCObjectStreamer.cpp
index b2c9c5d045..6c0719212a 100644
--- a/lib/MC/MCObjectStreamer.cpp
+++ b/lib/MC/MCObjectStreamer.cpp
@@ -99,9 +99,7 @@ const MCExpr *MCObjectStreamer::AddValueSymbols(const MCExpr *Value) {
return Value;
}
-void MCObjectStreamer::EmitValueImpl(const MCExpr *Value, unsigned Size,
- unsigned AddrSpace) {
- assert(AddrSpace == 0 && "Address space must be 0!");
+void MCObjectStreamer::EmitValueImpl(const MCExpr *Value, unsigned Size) {
MCDataFragment *DF = getOrCreateDataFragment();
MCLineEntry::Make(this, getCurrentSection().first);
@@ -109,7 +107,7 @@ void MCObjectStreamer::EmitValueImpl(const MCExpr *Value, unsigned Size,
// Avoid fixups when possible.
int64_t AbsValue;
if (AddValueSymbols(Value)->EvaluateAsAbsolute(AbsValue, getAssembler())) {
- EmitIntValue(AbsValue, Size, AddrSpace);
+ EmitIntValue(AbsValue, Size);
return;
}
DF->getFixups().push_back(
@@ -303,8 +301,7 @@ void MCObjectStreamer::EmitDwarfAdvanceFrameAddr(const MCSymbol *LastLabel,
insert(new MCDwarfCallFrameFragment(*AddrDelta));
}
-void MCObjectStreamer::EmitBytes(StringRef Data, unsigned AddrSpace) {
- assert(AddrSpace == 0 && "Address space must be 0!");
+void MCObjectStreamer::EmitBytes(StringRef Data) {
getOrCreateDataFragment()->getContents().append(Data.begin(), Data.end());
}
@@ -367,16 +364,13 @@ void MCObjectStreamer::EmitGPRel64Value(const MCExpr *Value) {
DF->getContents().resize(DF->getContents().size() + 8, 0);
}
-void MCObjectStreamer::EmitFill(uint64_t NumBytes, uint8_t FillValue,
- unsigned AddrSpace) {
- assert(AddrSpace == 0 && "Address space must be 0!");
+void MCObjectStreamer::EmitFill(uint64_t NumBytes, uint8_t FillValue) {
// FIXME: A MCFillFragment would be more memory efficient but MCExpr has
// problems evaluating expressions across multiple fragments.
getOrCreateDataFragment()->getContents().append(NumBytes, FillValue);
}
-void MCObjectStreamer::EmitZeros(uint64_t NumBytes, unsigned AddrSpace) {
- assert(AddrSpace == 0 && "Address space must be 0!");
+void MCObjectStreamer::EmitZeros(uint64_t NumBytes) {
unsigned ItemSize = getCurrentSection().first->isVirtualSection() ? 0 : 1;
insert(new MCFillFragment(0, ItemSize, NumBytes));
}