diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-12-02 05:59:38 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-12-02 05:59:38 +0000 |
commit | e23930543c0de0adcfec00cd18e9243ad812a167 (patch) | |
tree | b07c2e6afc03736e2b4ca70038cd6db6d4908073 /lib | |
parent | dedb045c3296c831962c4ae101531c38c273ba89 (diff) | |
download | external_llvm-e23930543c0de0adcfec00cd18e9243ad812a167.tar.gz external_llvm-e23930543c0de0adcfec00cd18e9243ad812a167.tar.bz2 external_llvm-e23930543c0de0adcfec00cd18e9243ad812a167.zip |
Move EmitValueToOffset to the ObjectStreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120691 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/MC/MCELFStreamer.cpp | 9 | ||||
-rw-r--r-- | lib/MC/MCMachOStreamer.cpp | 7 | ||||
-rw-r--r-- | lib/MC/MCObjectStreamer.cpp | 5 | ||||
-rw-r--r-- | lib/MC/WinCOFFStreamer.cpp | 6 |
4 files changed, 5 insertions, 22 deletions
diff --git a/lib/MC/MCELFStreamer.cpp b/lib/MC/MCELFStreamer.cpp index f7cb3edb0d..d98c9ef79e 100644 --- a/lib/MC/MCELFStreamer.cpp +++ b/lib/MC/MCELFStreamer.cpp @@ -129,8 +129,6 @@ public: unsigned MaxBytesToEmit = 0); virtual void EmitCodeAlignment(unsigned ByteAlignment, unsigned MaxBytesToEmit = 0); - virtual void EmitValueToOffset(const MCExpr *Offset, - unsigned char Value = 0); virtual void EmitFileDirective(StringRef Filename); @@ -399,13 +397,6 @@ void MCELFStreamer::EmitCodeAlignment(unsigned ByteAlignment, getCurrentSectionData()->setAlignment(ByteAlignment); } -void MCELFStreamer::EmitValueToOffset(const MCExpr *Offset, - unsigned char Value) { - // TODO: This is exactly the same as MCMachOStreamer. Consider merging into - // MCObjectStreamer. - new MCOrgFragment(*Offset, Value, getCurrentSectionData()); -} - // Add a symbol for the file name of this module. This is the second // entry in the module's symbol table (the first being the null symbol). void MCELFStreamer::EmitFileDirective(StringRef Filename) { diff --git a/lib/MC/MCMachOStreamer.cpp b/lib/MC/MCMachOStreamer.cpp index 4da4ed8ac7..71bd4076ad 100644 --- a/lib/MC/MCMachOStreamer.cpp +++ b/lib/MC/MCMachOStreamer.cpp @@ -78,8 +78,6 @@ public: unsigned MaxBytesToEmit = 0); virtual void EmitCodeAlignment(unsigned ByteAlignment, unsigned MaxBytesToEmit = 0); - virtual void EmitValueToOffset(const MCExpr *Offset, - unsigned char Value = 0); virtual void EmitFileDirective(StringRef Filename) { // FIXME: Just ignore the .file; it isn't important enough to fail the @@ -335,11 +333,6 @@ void MCMachOStreamer::EmitCodeAlignment(unsigned ByteAlignment, getCurrentSectionData()->setAlignment(ByteAlignment); } -void MCMachOStreamer::EmitValueToOffset(const MCExpr *Offset, - unsigned char Value) { - new MCOrgFragment(*Offset, Value, getCurrentSectionData()); -} - void MCMachOStreamer::EmitInstToData(const MCInst &Inst) { MCDataFragment *DF = getOrCreateDataFragment(); diff --git a/lib/MC/MCObjectStreamer.cpp b/lib/MC/MCObjectStreamer.cpp index a8ea1a423d..331f726887 100644 --- a/lib/MC/MCObjectStreamer.cpp +++ b/lib/MC/MCObjectStreamer.cpp @@ -179,6 +179,11 @@ void MCObjectStreamer::EmitInstToFragment(const MCInst &Inst) { getAssembler().getEmitter().EncodeInstruction(Inst, VecOS, IF->getFixups()); } +void MCObjectStreamer::EmitValueToOffset(const MCExpr *Offset, + unsigned char Value) { + new MCOrgFragment(*Offset, Value, getCurrentSectionData()); +} + void MCObjectStreamer::Finish() { getAssembler().Finish(); } diff --git a/lib/MC/WinCOFFStreamer.cpp b/lib/MC/WinCOFFStreamer.cpp index a13b632db6..315458b749 100644 --- a/lib/MC/WinCOFFStreamer.cpp +++ b/lib/MC/WinCOFFStreamer.cpp @@ -72,7 +72,6 @@ public: unsigned ValueSize, unsigned MaxBytesToEmit); virtual void EmitCodeAlignment(unsigned ByteAlignment, unsigned MaxBytesToEmit); - virtual void EmitValueToOffset(const MCExpr *Offset, unsigned char Value); virtual void EmitFileDirective(StringRef Filename); virtual void EmitInstruction(const MCInst &Instruction); virtual void Finish(); @@ -357,11 +356,6 @@ void WinCOFFStreamer::EmitCodeAlignment(unsigned ByteAlignment, getCurrentSectionData()->setAlignment(ByteAlignment); } -void WinCOFFStreamer::EmitValueToOffset(const MCExpr *Offset, - unsigned char Value) { - llvm_unreachable("not implemented"); -} - void WinCOFFStreamer::EmitFileDirective(StringRef Filename) { // Ignore for now, linkers don't care, and proper debug // info will be a much large effort. |