diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-10-11 16:05:00 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-10-11 16:05:00 +0000 |
commit | 0db720f0dc5b62bfcde72a2761fc9793af4e4558 (patch) | |
tree | 18abe09fce8137c1e1746e400c2f423bd2ca54ca /clang/lib/Serialization/ASTWriter.cpp | |
parent | 59e34ececfa38ca198ff8f05094ccdaa4d2d5b28 (diff) | |
download | bcm5719-llvm-0db720f0dc5b62bfcde72a2761fc9793af4e4558.tar.gz bcm5719-llvm-0db720f0dc5b62bfcde72a2761fc9793af4e4558.zip |
[libclang] Improve AST serialization done by ASTUnit::Save().
The ASTUnit needs to initialize an ASTWriter at the beginning of
parsing to fully handle serialization of a translation unit that
imports modules. Do this by introducing an option to enable it, which
corresponds to CXTranslationUnit_ForSerialization on the C API side.
llvm-svn: 165717
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index b7d6d9cecff..28f78c61810 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -3423,8 +3423,8 @@ void ASTWriter::WriteASTCore(Sema &SemaRef, MemorizeStatCalls *StatCalls, // Write the remaining AST contents. RecordData Record; Stream.EnterSubblock(AST_BLOCK_ID, 5); - WriteMetadata(Context, isysroot, OutputFile); WriteLanguageOptions(Context.getLangOpts()); + WriteMetadata(Context, isysroot, OutputFile); if (StatCalls && isysroot.empty()) WriteStatCache(*StatCalls); |