summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCObjectStreamer.cpp
diff options
context:
space:
mode:
authorEli Bendersky <eliben@google.com>2012-12-07 17:42:41 +0000
committerEli Bendersky <eliben@google.com>2012-12-07 17:42:41 +0000
commitea2824dc886cdd54dd6f014428c095b0d747855a (patch)
tree1a59d4411b61484563ce10b7332c8af5327d07f2 /llvm/lib/MC/MCObjectStreamer.cpp
parent85e276b8aee0bbade2312b94f47237b7cd25beb8 (diff)
downloadbcm5719-llvm-ea2824dc886cdd54dd6f014428c095b0d747855a.tar.gz
bcm5719-llvm-ea2824dc886cdd54dd6f014428c095b0d747855a.zip
Lift EmitAssignment into MCObjectStreamer which gets rid of at least three
duplicate implementations in format-specific streamers. llvm-svn: 169613
Diffstat (limited to 'llvm/lib/MC/MCObjectStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCObjectStreamer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCObjectStreamer.cpp b/llvm/lib/MC/MCObjectStreamer.cpp
index 774632306d9..08200eb8f0c 100644
--- a/llvm/lib/MC/MCObjectStreamer.cpp
+++ b/llvm/lib/MC/MCObjectStreamer.cpp
@@ -159,6 +159,11 @@ void MCObjectStreamer::ChangeSection(const MCSection *Section) {
CurSectionData = &getAssembler().getOrCreateSectionData(*Section);
}
+void MCObjectStreamer::EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) {
+ getAssembler().getOrCreateSymbolData(*Symbol);
+ Symbol->setVariableValue(AddValueSymbols(Value));
+}
+
void MCObjectStreamer::EmitInstruction(const MCInst &Inst) {
// Scan for values.
for (unsigned i = Inst.getNumOperands(); i--; )
OpenPOWER on IntegriCloud