From 550f0ade457c3b042fa099ecff2c022c7ab58b1e Mon Sep 17 00:00:00 2001 From: Eli Bendersky Date: Fri, 7 Dec 2012 22:06:56 +0000 Subject: Make the contents of encoded sections SmallVector 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 --- lib/MC/MCAssembler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/MC/MCAssembler.cpp') 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 @@ void MCAsmLayout::LayoutFragment(MCFragment *F) { /// a MCEncodedFragment. static void writeFragmentContents(const MCFragment &F, MCObjectWriter *OW) { MCEncodedFragment &EF = cast(F); - OW->WriteBytes(EF.getContents().str()); + OW->WriteBytes(EF.getContents()); } /// \brief Write the fragment \p F to the output file. -- cgit v1.1