aboutsummaryrefslogtreecommitdiff
path: root/lib/MC/MCMachOStreamer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-19 19:46:13 +0000
committerChris Lattner <sabre@nondot.org>2010-01-19 19:46:13 +0000
commitaaec205b87637cd0d59d4f11630db603686eb73d (patch)
tree3477123f6be0b88f69af8c407e70fce29119d671 /lib/MC/MCMachOStreamer.cpp
parent590d16be6f335da07c66f3c92693d0e8a2f40069 (diff)
Generalize mcasmstreamer data emission APIs to take an address space
identifier. There is no way to work around it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93896 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCMachOStreamer.cpp')
-rw-r--r--lib/MC/MCMachOStreamer.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/MC/MCMachOStreamer.cpp b/lib/MC/MCMachOStreamer.cpp
index 5f120cc650..ffdd421f4e 100644
--- a/lib/MC/MCMachOStreamer.cpp
+++ b/lib/MC/MCMachOStreamer.cpp
@@ -134,9 +134,9 @@ public:
virtual void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = 0,
unsigned Size = 0, unsigned ByteAlignment = 0);
- virtual void EmitBytes(StringRef Data);
+ virtual void EmitBytes(StringRef Data, unsigned AddrSpace);
- virtual void EmitValue(const MCExpr *Value, unsigned Size);
+ virtual void EmitValue(const MCExpr *Value, unsigned Size,unsigned AddrSpace);
virtual void EmitValueToAlignment(unsigned ByteAlignment, int64_t Value = 0,
unsigned ValueSize = 1,
@@ -315,14 +315,15 @@ void MCMachOStreamer::EmitZerofill(const MCSection *Section, MCSymbol *Symbol,
SectData.setAlignment(ByteAlignment);
}
-void MCMachOStreamer::EmitBytes(StringRef Data) {
+void MCMachOStreamer::EmitBytes(StringRef Data, unsigned AddrSpace) {
MCDataFragment *DF = dyn_cast_or_null<MCDataFragment>(getCurrentFragment());
if (!DF)
DF = new MCDataFragment(CurSectionData);
DF->getContents().append(Data.begin(), Data.end());
}
-void MCMachOStreamer::EmitValue(const MCExpr *Value, unsigned Size) {
+void MCMachOStreamer::EmitValue(const MCExpr *Value, unsigned Size,
+ unsigned AddrSpace) {
new MCFillFragment(*AddValueSymbols(Value), Size, 1, CurSectionData);
}
@@ -359,7 +360,7 @@ void MCMachOStreamer::EmitInstruction(const MCInst &Inst) {
SmallString<256> Code;
raw_svector_ostream VecOS(Code);
Emitter->EncodeInstruction(Inst, VecOS);
- EmitBytes(VecOS.str());
+ EmitBytes(VecOS.str(), 0);
}
void MCMachOStreamer::Finish() {