diff options
author | Adrian Prantl <aprantl@apple.com> | 2015-02-20 22:12:19 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2015-02-20 22:12:19 +0000 |
commit | 690b2f7746ffd37ee507618a5bc17a5799671417 (patch) | |
tree | f5459d0bc51251d9d27cb3c8eb6bba2b8e90c148 /clang/lib/Frontend/ASTUnit.cpp | |
parent | 20711b7baebab2eeb51015453588c46d8b9d62e9 (diff) | |
download | bcm5719-llvm-690b2f7746ffd37ee507618a5bc17a5799671417.tar.gz bcm5719-llvm-690b2f7746ffd37ee507618a5bc17a5799671417.zip |
Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."
This reverts commit r230067.
Investigating another batch of problems found by the bots.
llvm-svn: 230073
Diffstat (limited to 'clang/lib/Frontend/ASTUnit.cpp')
-rw-r--r-- | clang/lib/Frontend/ASTUnit.cpp | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp index 58a5f980085..bfb1efe3522 100644 --- a/clang/lib/Frontend/ASTUnit.cpp +++ b/clang/lib/Frontend/ASTUnit.cpp @@ -914,20 +914,13 @@ class PrecompilePreambleConsumer : public PCHGenerator { unsigned &Hash; std::vector<Decl *> TopLevelDecls; PrecompilePreambleAction *Action; - raw_ostream *Out; - SmallVectorImpl<char> *SerializedASTBuffer; public: PrecompilePreambleConsumer(ASTUnit &Unit, PrecompilePreambleAction *Action, const Preprocessor &PP, StringRef isysroot, raw_ostream *Out) - : PCHGenerator(PP, "", nullptr, isysroot, /*AllowASTWithErrors=*/true), - Unit(Unit), Hash(Unit.getCurrentTopLevelHashValue()), Action(Action), - Out(Out) { - RegisterSerializationFinishedCallback( - [&](SmallVectorImpl<char> *Buf){ - SerializedASTBuffer = Buf; - }); + : PCHGenerator(PP, "", nullptr, isysroot, Out, /*AllowASTWithErrors=*/true), + Unit(Unit), Hash(Unit.getCurrentTopLevelHashValue()), Action(Action) { Hash = 0; } @@ -948,13 +941,6 @@ public: void HandleTranslationUnit(ASTContext &Ctx) override { PCHGenerator::HandleTranslationUnit(Ctx); if (hasEmittedPCH()) { - // Write the generated bitstream to "Out". - Out->write((char *)&SerializedASTBuffer->front(), - SerializedASTBuffer->size()); - // Make sure it hits disk now. - Out->flush(); - SerializedASTBuffer->clear(); - // Translate the top-level declarations we captured during // parsing into declaration IDs in the precompiled // preamble. This will allow us to deserialize those top-level |