diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-19 22:03:38 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-19 22:03:38 +0000 |
commit | 32ae3fe0ba469240753e2342e36485f7c9acfb5c (patch) | |
tree | 1ed40c15964950de72685c64d2a8699bdad32c24 /lib/MC/MCStreamer.cpp | |
parent | bafbbdde38dedf05b53b731cbc083b2c483ae64e (diff) |
add a new EmitIntValue method that MCStreamer impls can optionally define
and that clients can use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93923 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCStreamer.cpp')
-rw-r--r-- | lib/MC/MCStreamer.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/MC/MCStreamer.cpp b/lib/MC/MCStreamer.cpp index 20767de3be..4e9d094550 100644 --- a/lib/MC/MCStreamer.cpp +++ b/lib/MC/MCStreamer.cpp @@ -18,6 +18,13 @@ MCStreamer::MCStreamer(MCContext &_Context) : Context(_Context), CurSection(0) { MCStreamer::~MCStreamer() { } +/// EmitIntValue - Special case of EmitValue that avoids the client having to +/// pass in a MCExpr for constant integers. +void MCStreamer::EmitIntValue(uint64_t Value, unsigned Size, + unsigned AddrSpace) { + EmitValue(MCConstantExpr::Create(Value, 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, |