From b14490d9124861fc5f3ffe6d3a01e6fd47949de6 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 9 Mar 2010 00:39:24 +0000 Subject: add a EmitSymbolValue convenience method to MCStreamer. llvm-svn: 98017 --- llvm/lib/MC/MCStreamer.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'llvm/lib/MC/MCStreamer.cpp') 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, -- cgit v1.2.3