Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/Serialization/GeneratePCH.cpp
Show All 33 Lines | : PP(PP), OutputFile(OutputFile), isysroot(isysroot.str()), | ||||
ShouldCacheASTInMemory(ShouldCacheASTInMemory) { | ShouldCacheASTInMemory(ShouldCacheASTInMemory) { | ||||
this->Buffer->IsComplete = false; | this->Buffer->IsComplete = false; | ||||
} | } | ||||
PCHGenerator::~PCHGenerator() { | PCHGenerator::~PCHGenerator() { | ||||
} | } | ||||
void PCHGenerator::HandleTranslationUnit(ASTContext &Ctx) { | void PCHGenerator::HandleTranslationUnit(ASTContext &Ctx) { | ||||
// Do not attempt to write the AST file. | |||||
return; | |||||
// Don't create a PCH if there were fatal failures during module loading. | // Don't create a PCH if there were fatal failures during module loading. | ||||
if (PP.getModuleLoader().HadFatalFailure) | if (PP.getModuleLoader().HadFatalFailure) | ||||
return; | return; | ||||
bool hasErrors = PP.getDiagnostics().hasErrorOccurred(); | bool hasErrors = PP.getDiagnostics().hasErrorOccurred(); | ||||
if (hasErrors && !AllowASTWithErrors) | if (hasErrors && !AllowASTWithErrors) | ||||
return; | return; | ||||
Show All 35 Lines |