Make the contents of encoded sections SmallVector<char, N> instead of
SmallString. This makes it possible to use the length-erased SmallVectorImpl
in the interface without imposing buffer size. Thus, the size of MCInstFragment
is back down since a preallocated 8-byte contents buffer is enough.
It would be generally a good idea to rid all the fragments of SmallString as
contents, because a vector just makes more sense.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169644 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp
index b2136e5..989d8be 100644
--- a/lib/MC/MCAssembler.cpp
+++ b/lib/MC/MCAssembler.cpp
@@ -391,7 +391,7 @@
/// a MCEncodedFragment.
static void writeFragmentContents(const MCFragment &F, MCObjectWriter *OW) {
MCEncodedFragment &EF = cast<MCEncodedFragment>(F);
- OW->WriteBytes(EF.getContents().str());
+ OW->WriteBytes(EF.getContents());
}
/// \brief Write the fragment \p F to the output file.