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 | 00b679c127639a664a35de4dcf7a3582b569f2ef (patch) | |
tree | 37564fbb8a71da87129120cc0a9656a4a836817d /llvm/lib/MC/MCStreamer.cpp | |
parent | 2e85c5f297e6f141bf1dbe09d326457102daa288 (diff) | |
download | bcm5719-llvm-00b679c127639a664a35de4dcf7a3582b569f2ef.tar.gz bcm5719-llvm-00b679c127639a664a35de4dcf7a3582b569f2ef.zip |
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.
llvm-svn: 151284
Diffstat (limited to 'llvm/lib/MC/MCStreamer.cpp')
-rw-r--r-- | llvm/lib/MC/MCStreamer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp index 6d53fb196c6..43e62ff89a0 100644 --- a/llvm/lib/MC/MCStreamer.cpp +++ b/llvm/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); |