summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-09 00:39:24 +0000
committerChris Lattner <sabre@nondot.org>2010-03-09 00:39:24 +0000
commitb14490d9124861fc5f3ffe6d3a01e6fd47949de6 (patch)
tree6d0a589faadedecc961b8b8ad4b6fb360c477cfc /llvm/lib/MC
parent085b65283cb38d2dfd7f23a5942f9c31be1c75f9 (diff)
downloadbcm5719-llvm-b14490d9124861fc5f3ffe6d3a01e6fd47949de6.tar.gz
bcm5719-llvm-b14490d9124861fc5f3ffe6d3a01e6fd47949de6.zip
add a EmitSymbolValue convenience method to MCStreamer.
llvm-svn: 98017
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r--llvm/lib/MC/MCStreamer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp
index 15b30794d91..703acc4e599 100644
--- a/llvm/lib/MC/MCStreamer.cpp
+++ b/llvm/lib/MC/MCStreamer.cpp
@@ -31,6 +31,11 @@ void MCStreamer::EmitIntValue(uint64_t Value, unsigned Size,
EmitValue(MCConstantExpr::Create(Value, getContext()), Size, AddrSpace);
}
+void MCStreamer::EmitSymbolValue(const MCSymbol *Sym, unsigned Size,
+ unsigned AddrSpace) {
+ EmitValue(MCSymbolRefExpr::Create(Sym, getContext()), Size, AddrSpace);
+}
+
/// EmitFill - Emit NumBytes bytes worth of the value specified by
/// FillValue. This implements directives such as '.space'.
void MCStreamer::EmitFill(uint64_t NumBytes, uint8_t FillValue,
OpenPOWER on IntegriCloud