Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
cfe/trunk/lib/Parse/ParseAST.cpp
Show First 20 Lines • Show All 135 Lines • ▼ Show 20 Lines | llvm::CrashRecoveryContextCleanupRegistrar<const void, ResetStackCleanup> | ||||
CleanupPrettyStack(llvm::SavePrettyStackState()); | CleanupPrettyStack(llvm::SavePrettyStackState()); | ||||
PrettyStackTraceParserEntry CrashInfo(P); | PrettyStackTraceParserEntry CrashInfo(P); | ||||
// Recover resources if we crash before exiting this method. | // Recover resources if we crash before exiting this method. | ||||
llvm::CrashRecoveryContextCleanupRegistrar<Parser> | llvm::CrashRecoveryContextCleanupRegistrar<Parser> | ||||
CleanupParser(ParseOP.get()); | CleanupParser(ParseOP.get()); | ||||
S.getPreprocessor().EnterMainSourceFile(); | S.getPreprocessor().EnterMainSourceFile(); | ||||
if (!S.getPreprocessor().getCurrentLexer()) { | |||||
// If a PCH through header is specified that does not have an include in | |||||
// the source, there won't be any tokens or a Lexer. | |||||
return; | |||||
} | |||||
P.Initialize(); | P.Initialize(); | ||||
Parser::DeclGroupPtrTy ADecl; | Parser::DeclGroupPtrTy ADecl; | ||||
ExternalASTSource *External = S.getASTContext().getExternalSource(); | ExternalASTSource *External = S.getASTContext().getExternalSource(); | ||||
if (External) | if (External) | ||||
External->StartTranslationUnit(Consumer); | External->StartTranslationUnit(Consumer); | ||||
for (bool AtEOF = P.ParseFirstTopLevelDecl(ADecl); !AtEOF; | for (bool AtEOF = P.ParseFirstTopLevelDecl(ADecl); !AtEOF; | ||||
Show All 31 Lines |