diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-02-23 21:15:21 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-02-23 21:15:21 +0000 |
commit | b601ab5cce6c560dff365cd87f6854ea95f76f54 (patch) | |
tree | 024b53e6e7d0e99173e698372d445e9ddcef9593 /lib | |
parent | 3378c59075794434926ec9e2e2043244c6f7fd43 (diff) |
Bump SmallString to the minimum required amount for raw_ostream to avoid allocation.
It's is a bit annoying, we should hide this implementation detail better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151284 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/MC/MCStreamer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/MC/MCStreamer.cpp b/lib/MC/MCStreamer.cpp index 6d53fb196c..43e62ff89a 100644 --- a/lib/MC/MCStreamer.cpp +++ b/lib/MC/MCStreamer.cpp @@ -95,7 +95,7 @@ void MCStreamer::EmitIntValue(uint64_t Value, unsigned Size, /// client having to pass in a MCExpr for constant integers. void MCStreamer::EmitULEB128IntValue(uint64_t Value, unsigned AddrSpace, unsigned Padding) { - SmallString<32> Tmp; + SmallString<128> Tmp; raw_svector_ostream OSE(Tmp); MCObjectWriter::EncodeULEB128(Value, OSE, Padding); EmitBytes(OSE.str(), AddrSpace); @@ -104,7 +104,7 @@ void MCStreamer::EmitULEB128IntValue(uint64_t Value, unsigned AddrSpace, /// EmitSLEB128Value - Special case of EmitSLEB128Value that avoids the /// client having to pass in a MCExpr for constant integers. void MCStreamer::EmitSLEB128IntValue(int64_t Value, unsigned AddrSpace) { - SmallString<32> Tmp; + SmallString<128> Tmp; raw_svector_ostream OSE(Tmp); MCObjectWriter::EncodeSLEB128(Value, OSE); EmitBytes(OSE.str(), AddrSpace); |