diff options
author | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2012-10-15 15:43:14 +0000 |
---|---|---|
committer | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2012-10-15 15:43:14 +0000 |
commit | ef206f19a4be428092b173339df138a3c17e1687 (patch) | |
tree | 6c28b192c082a822564215065c28bfd425bf0f35 /llvm/lib/MC/MCELFStreamer.cpp | |
parent | 7b03290c437177cce12a3774651f94af9ecb41df (diff) | |
download | bcm5719-llvm-ef206f19a4be428092b173339df138a3c17e1687.tar.gz bcm5719-llvm-ef206f19a4be428092b173339df138a3c17e1687.zip |
PowerPC: add EmitTCEntry class for TOC creation
This patch replaces the EmitRawText by a EmitTCEntry class (specialized for
each Streamer) in PowerPC64 TOC entry creation.
llvm-svn: 165940
Diffstat (limited to 'llvm/lib/MC/MCELFStreamer.cpp')
-rw-r--r-- | llvm/lib/MC/MCELFStreamer.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCELFStreamer.cpp b/llvm/lib/MC/MCELFStreamer.cpp index 8107005481d..14fbc1ec839 100644 --- a/llvm/lib/MC/MCELFStreamer.cpp +++ b/llvm/lib/MC/MCELFStreamer.cpp @@ -103,6 +103,8 @@ public: virtual void EmitFileDirective(StringRef Filename); + virtual void EmitTCEntry(const MCSymbol &S); + virtual void FinishImpl(); private: @@ -469,6 +471,12 @@ void MCELFStreamer::FinishImpl() { this->MCObjectStreamer::FinishImpl(); } +void MCELFStreamer::EmitTCEntry(const MCSymbol &S) +{ + // Creates a R_PPC64_TOC relocation + MCObjectStreamer::EmitSymbolValue(&S, 8, 0); +} + MCStreamer *llvm::createELFStreamer(MCContext &Context, MCAsmBackend &MAB, raw_ostream &OS, MCCodeEmitter *CE, bool RelaxAll, bool NoExecStack) { |