From 056abd2059c65a3e908193aeae16fad98017437c Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 2 Dec 2012 13:20:44 +0000 Subject: Vendor import of clang release_32 branch r168974 (effectively, 3.2 RC2): http://llvm.org/svn/llvm-project/cfe/branches/release_32@168974 --- lib/Serialization/GeneratePCH.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'lib/Serialization/GeneratePCH.cpp') diff --git a/lib/Serialization/GeneratePCH.cpp b/lib/Serialization/GeneratePCH.cpp index 02aed10..870d654 100644 --- a/lib/Serialization/GeneratePCH.cpp +++ b/lib/Serialization/GeneratePCH.cpp @@ -18,7 +18,6 @@ #include "clang/AST/ASTConsumer.h" #include "clang/Lex/Preprocessor.h" #include "clang/Basic/FileManager.h" -#include "clang/Basic/FileSystemStatCache.h" #include "llvm/Bitcode/BitstreamWriter.h" #include "llvm/Support/raw_ostream.h" #include @@ -32,11 +31,7 @@ PCHGenerator::PCHGenerator(const Preprocessor &PP, raw_ostream *OS) : PP(PP), OutputFile(OutputFile), Module(Module), isysroot(isysroot.str()), Out(OS), - SemaPtr(0), StatCalls(0), Stream(Buffer), Writer(Stream) { - // Install a stat() listener to keep track of all of the stat() - // calls. - StatCalls = new MemorizeStatCalls(); - PP.getFileManager().addStatCache(StatCalls, /*AtBeginning=*/false); + SemaPtr(0), Stream(Buffer), Writer(Stream) { } PCHGenerator::~PCHGenerator() { @@ -48,7 +43,7 @@ void PCHGenerator::HandleTranslationUnit(ASTContext &Ctx) { // Emit the PCH file assert(SemaPtr && "No Sema?"); - Writer.WriteAST(*SemaPtr, StatCalls, OutputFile, Module, isysroot); + Writer.WriteAST(*SemaPtr, OutputFile, Module, isysroot); // Write the generated bitstream to "Out". Out->write((char *)&Buffer.front(), Buffer.size()); @@ -60,6 +55,10 @@ void PCHGenerator::HandleTranslationUnit(ASTContext &Ctx) { Buffer.clear(); } +PPMutationListener *PCHGenerator::GetPPMutationListener() { + return &Writer; +} + ASTMutationListener *PCHGenerator::GetASTMutationListener() { return &Writer; } -- cgit v1.1