[cfe-commits] r151752 - in /cfe/trunk: include/clang/Serialization/ASTWriter.h lib/Frontend/ASTUnit.cpp lib/Frontend/SerializedDiagnosticPrinter.cpp
Daniel Dunbar
daniel at zuster.org
Wed Feb 29 12:31:23 PST 2012
Author: ddunbar
Date: Wed Feb 29 14:31:23 2012
New Revision: 151752
URL: http://llvm.org/viewvc/llvm-project?rev=151752&view=rev
Log:
Serialization: Switch over to using the native SmallVector based BitstreamWriter
ctor.
Modified:
cfe/trunk/include/clang/Serialization/ASTWriter.h
cfe/trunk/lib/Frontend/ASTUnit.cpp
cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp
Modified: cfe/trunk/include/clang/Serialization/ASTWriter.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Serialization/ASTWriter.h?rev=151752&r1=151751&r2=151752&view=diff
==============================================================================
--- cfe/trunk/include/clang/Serialization/ASTWriter.h (original)
+++ cfe/trunk/include/clang/Serialization/ASTWriter.h Wed Feb 29 14:31:23 2012
@@ -709,7 +709,7 @@
raw_ostream *Out;
Sema *SemaPtr;
MemorizeStatCalls *StatCalls; // owned by the FileManager
- std::vector<unsigned char> Buffer;
+ llvm::SmallVector<char, 128> Buffer;
llvm::BitstreamWriter Stream;
ASTWriter Writer;
Modified: cfe/trunk/lib/Frontend/ASTUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ASTUnit.cpp?rev=151752&r1=151751&r2=151752&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/ASTUnit.cpp (original)
+++ cfe/trunk/lib/Frontend/ASTUnit.cpp Wed Feb 29 14:31:23 2012
@@ -2423,7 +2423,7 @@
if (getDiagnostics().hasErrorOccurred())
return true;
- std::vector<unsigned char> Buffer;
+ SmallString<128> Buffer;
llvm::BitstreamWriter Stream(Buffer);
ASTWriter Writer(Stream);
// FIXME: Handle modules
Modified: cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp?rev=151752&r1=151751&r2=151752&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp (original)
+++ cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp Wed Feb 29 14:31:23 2012
@@ -159,7 +159,7 @@
const DiagnosticOptions &DiagOpts;
/// \brief The byte buffer for the serialized content.
- std::vector<unsigned char> Buffer;
+ SmallString<1024> Buffer;
/// \brief The BitStreamWriter for the serialized diagnostics.
llvm::BitstreamWriter Stream;
More information about the cfe-commits
mailing list