summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitc35681b2986163ce5a4d8952c9efb6a2a24e8da5 (patch)
treecb1cc294d092a9743f759fb02fd6b9b56a3cc73b /llvm/lib/MC/MCMachOStreamer.cpp
parentbf43525a2933c3ddb60f00a89e22c52c06bc77d6 (diff)
downloadbcm5719-llvm-c35681b2986163ce5a4d8952c9efb6a2a24e8da5.tar.gz
bcm5719-llvm-c35681b2986163ce5a4d8952c9efb6a2a24e8da5.zip
Generalize mcasmstreamer data emission APIs to take an address space
identifier. There is no way to work around it. llvm-svn: 93896
Diffstat (limited to 'llvm/lib/MC/MCMachOStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCMachOStreamer.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/MC/MCMachOStreamer.cpp b/llvm/lib/MC/MCMachOStreamer.cpp
index 5f120cc6506..ffdd421f4e0 100644
--- a/llvm/lib/MC/MCMachOStreamer.cpp
+++ b/llvm/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() {
OpenPOWER on IntegriCloud