aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2012-02-29 20:31:23 +0000
committerDaniel Dunbar <daniel@zuster.org>2012-02-29 20:31:23 +0000
commit8d6ff02cb78c67c615125782967b44d1b37e5815 (patch)
tree1ac1725573455700c74eeb2ea00838a9e026a7a1
parent75a96d02ded688e34d5e8068abf0afb876ed870b (diff)
Serialization: Switch over to using the native SmallVector based BitstreamWriter
ctor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151752 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Serialization/ASTWriter.h2
-rw-r--r--lib/Frontend/ASTUnit.cpp2
-rw-r--r--lib/Frontend/SerializedDiagnosticPrinter.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/include/clang/Serialization/ASTWriter.h b/include/clang/Serialization/ASTWriter.h
index a0ea220b2d..940c86ab33 100644
--- a/include/clang/Serialization/ASTWriter.h
+++ b/include/clang/Serialization/ASTWriter.h
@@ -709,7 +709,7 @@ class PCHGenerator : public SemaConsumer {
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;
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp
index 3ffb6ecb4b..c1678d4ef0 100644
--- a/lib/Frontend/ASTUnit.cpp
+++ b/lib/Frontend/ASTUnit.cpp
@@ -2423,7 +2423,7 @@ bool ASTUnit::serialize(raw_ostream &OS) {
if (getDiagnostics().hasErrorOccurred())
return true;
- std::vector<unsigned char> Buffer;
+ SmallString<128> Buffer;
llvm::BitstreamWriter Stream(Buffer);
ASTWriter Writer(Stream);
// FIXME: Handle modules
diff --git a/lib/Frontend/SerializedDiagnosticPrinter.cpp b/lib/Frontend/SerializedDiagnosticPrinter.cpp
index 7a8edf7f5c..7bf8742a80 100644
--- a/lib/Frontend/SerializedDiagnosticPrinter.cpp
+++ b/lib/Frontend/SerializedDiagnosticPrinter.cpp
@@ -159,7 +159,7 @@ private:
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;