From: Michael Ilseman Date: Mon, 3 Dec 2012 21:29:36 +0000 (+0000) Subject: Since this SmallVector immediately grows on the next line, don't waste stack space... X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=dbd7b95ed415a7d9fd5f53d9f811906c58912c60;p=oota-llvm.git Since this SmallVector immediately grows on the next line, don't waste stack space. SmallVector is still needed due to existing APIs growing their arguments git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169157 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp index bbc9c834ec2..2ea9cbd6f44 100644 --- a/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -1939,7 +1939,7 @@ static void EmitDarwinBCHeaderAndTrailer(SmallVectorImpl &Buffer, /// WriteBitcodeToFile - Write the specified module to the specified output /// stream. void llvm::WriteBitcodeToFile(const Module *M, raw_ostream &Out) { - SmallVector Buffer; + SmallVector Buffer; Buffer.reserve(256*1024); // If this is darwin or another generic macho target, reserve space for the