Since this SmallVector immediately grows on the next line, don't waste stack space...
authorMichael Ilseman <milseman@apple.com>
Mon, 3 Dec 2012 21:29:36 +0000 (21:29 +0000)
committerMichael Ilseman <milseman@apple.com>
Mon, 3 Dec 2012 21:29:36 +0000 (21:29 +0000)
llvm-svn: 169157

llvm/lib/Bitcode/Writer/BitcodeWriter.cpp

index bbc9c83..2ea9cbd 100644 (file)
@@ -1939,7 +1939,7 @@ static void EmitDarwinBCHeaderAndTrailer(SmallVectorImpl<char> &Buffer,
 /// WriteBitcodeToFile - Write the specified module to the specified output
 /// stream.
 void llvm::WriteBitcodeToFile(const Module *M, raw_ostream &Out) {
-  SmallVector<char, 1024> Buffer;
+  SmallVector<char, 0> Buffer;
   Buffer.reserve(256*1024);
 
   // If this is darwin or another generic macho target, reserve space for the