[llvm-commits] [llvm] r151284 - /llvm/trunk/lib/MC/MCStreamer.cpp
Benjamin Kramer
benny.kra at googlemail.com
Thu Feb 23 13:15:21 PST 2012
Author: d0k
Date: Thu Feb 23 15:15:21 2012
New Revision: 151284
URL: http://llvm.org/viewvc/llvm-project?rev=151284&view=rev
Log:
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.
Modified:
llvm/trunk/lib/MC/MCStreamer.cpp
Modified: llvm/trunk/lib/MC/MCStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCStreamer.cpp?rev=151284&r1=151283&r2=151284&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCStreamer.cpp Thu Feb 23 15:15:21 2012
@@ -95,7 +95,7 @@
/// 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 @@
/// 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);
More information about the llvm-commits
mailing list