Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/Lex/PPDirectives.cpp
Show First 20 Lines • Show All 2,016 Lines • ▼ Show 20 Lines | #else | |||||||||
} | } | |||||||||
#endif | #endif | |||||||||
Optional<FileEntryRef> File = LookupHeaderIncludeOrImport( | Optional<FileEntryRef> File = LookupHeaderIncludeOrImport( | |||||||||
CurDir, Filename, FilenameLoc, FilenameRange, FilenameTok, | CurDir, Filename, FilenameLoc, FilenameRange, FilenameTok, | |||||||||
IsFrameworkFound, IsImportDecl, IsMapped, LookupFrom, LookupFromFile, | IsFrameworkFound, IsImportDecl, IsMapped, LookupFrom, LookupFromFile, | |||||||||
LookupFilename, RelativePath, SearchPath, SuggestedModule, isAngled); | LookupFilename, RelativePath, SearchPath, SuggestedModule, isAngled); | |||||||||
// Record the header's filename for later use. | ||||||||||
aaron.ballmanUnsubmitted Done ReplyInline Actions
aaron.ballman: | ||||||||||
if (File) | ||||||||||
CurLexer->addInclude( | ||||||||||
{FilenameTok.getLiteralData(), FilenameTok.getLength()}, | ||||||||||
Not Done ReplyInline ActionsgetLiteralData() can return null, which causes a crash here in Chromium. I think getSpelling() should be used instead, and since it was already called above, perhaps you could just pass in OriginalFilename here. hans: getLiteralData() can return null, which causes a crash here in Chromium.
I think getSpelling()… | ||||||||||
File->getFileEntry(), FilenameLoc); | ||||||||||
if (usingPCHWithThroughHeader() && SkippingUntilPCHThroughHeader) { | if (usingPCHWithThroughHeader() && SkippingUntilPCHThroughHeader) { | |||||||||
if (File && isPCHThroughHeader(&File->getFileEntry())) | if (File && isPCHThroughHeader(&File->getFileEntry())) | |||||||||
SkippingUntilPCHThroughHeader = false; | SkippingUntilPCHThroughHeader = false; | |||||||||
return {ImportAction::None}; | return {ImportAction::None}; | |||||||||
} | } | |||||||||
// Should we enter the source file? Set to Skip if either the source file is | // Should we enter the source file? Set to Skip if either the source file is | |||||||||
// known to have no effect beyond its effect on module visibility -- that is, | // known to have no effect beyond its effect on module visibility -- that is, | |||||||||
▲ Show 20 Lines • Show All 1,253 Lines • Show Last 20 Lines |