[llvm-commits] [llvm] r169157 - /llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp

Michael Ilseman milseman at apple.com
Mon Dec 3 13:29:36 PST 2012


Author: milseman
Date: Mon Dec  3 15:29:36 2012
New Revision: 169157

URL: http://llvm.org/viewvc/llvm-project?rev=169157&view=rev
Log:
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

Modified:
    llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp

Modified: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp?rev=169157&r1=169156&r2=169157&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp (original)
+++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Mon Dec  3 15:29:36 2012
@@ -1939,7 +1939,7 @@
 /// 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





More information about the llvm-commits mailing list