clang
9.0.0
|
#include "clang/Serialization/ASTReader.h"
#include "ASTCommon.h"
#include "ASTReaderInternals.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTMutationListener.h"
#include "clang/AST/ASTUnresolvedSet.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclBase.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclFriend.h"
#include "clang/AST/DeclGroup.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/DeclarationName.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/ExternalASTSource.h"
#include "clang/AST/NestedNameSpecifier.h"
#include "clang/AST/ODRHash.h"
#include "clang/AST/RawCommentList.h"
#include "clang/AST/TemplateBase.h"
#include "clang/AST/TemplateName.h"
#include "clang/AST/Type.h"
#include "clang/AST/TypeLoc.h"
#include "clang/AST/TypeLocVisitor.h"
#include "clang/AST/UnresolvedSet.h"
#include "clang/Basic/CommentOptions.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/DiagnosticOptions.h"
#include "clang/Basic/ExceptionSpecificationType.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/FileSystemOptions.h"
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/Module.h"
#include "clang/Basic/ObjCRuntime.h"
#include "clang/Basic/OperatorKinds.h"
#include "clang/Basic/PragmaKinds.h"
#include "clang/Basic/Sanitizers.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/SourceManagerInternals.h"
#include "clang/Basic/Specifiers.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Basic/TargetOptions.h"
#include "clang/Basic/TokenKinds.h"
#include "clang/Basic/Version.h"
#include "clang/Lex/HeaderSearch.h"
#include "clang/Lex/HeaderSearchOptions.h"
#include "clang/Lex/MacroInfo.h"
#include "clang/Lex/ModuleMap.h"
#include "clang/Lex/PreprocessingRecord.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Lex/PreprocessorOptions.h"
#include "clang/Lex/Token.h"
#include "clang/Sema/ObjCMethodList.h"
#include "clang/Sema/Scope.h"
#include "clang/Sema/Sema.h"
#include "clang/Sema/Weak.h"
#include "clang/Serialization/ASTBitCodes.h"
#include "clang/Serialization/ASTDeserializationListener.h"
#include "clang/Serialization/ContinuousRangeMap.h"
#include "clang/Serialization/GlobalModuleIndex.h"
#include "clang/Serialization/InMemoryModuleCache.h"
#include "clang/Serialization/Module.h"
#include "clang/Serialization/ModuleFileExtension.h"
#include "clang/Serialization/ModuleManager.h"
#include "clang/Serialization/PCHContainerOperations.h"
#include "clang/Serialization/SerializationDiagnostic.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/IntrusiveRefCntPtr.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Triple.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/Bitstream/BitstreamReader.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Compression.h"
#include "llvm/Support/DJB.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/SaveAndRestore.h"
#include "llvm/Support/Timer.h"
#include "llvm/Support/VersionTuple.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <ctime>
#include <iterator>
#include <limits>
#include <map>
#include <memory>
#include <string>
#include <system_error>
#include <tuple>
#include <utility>
#include <vector>
#include "clang/Basic/LangOptions.def"
#include "clang/Basic/Sanitizers.def"
#include "clang/Basic/DiagnosticOptions.def"
#include "clang/AST/TypeLocNodes.def"
#include "clang/Basic/OpenCLImageTypes.def"
#include "clang/Basic/OpenCLExtensionTypes.def"
Go to the source code of this file.
Classes | |
class | clang::TypeLocReader |
class | clang::ASTIdentifierIterator |
An identifier-lookup iterator that enumerates all of the identifiers stored within a set of AST files. More... | |
class | clang::serialization::ReadMethodPoolVisitor |
Namespaces | |
clang | |
Dataflow Directional Tag Classes. | |
clang::serialization | |
Macros | |
#define | LANGOPT(Name, Bits, Default, Description) |
#define | VALUE_LANGOPT(Name, Bits, Default, Description) |
#define | ENUM_LANGOPT(Name, Type, Bits, Default, Description) |
#define | COMPATIBLE_LANGOPT(Name, Bits, Default, Description) |
#define | COMPATIBLE_ENUM_LANGOPT(Name, Bits, Default, Description) |
#define | COMPATIBLE_VALUE_LANGOPT(Name, Bits, Default, Description) |
#define | BENIGN_LANGOPT(Name, Bits, Default, Description) |
#define | BENIGN_ENUM_LANGOPT(Name, Type, Bits, Default, Description) |
#define | BENIGN_VALUE_LANGOPT(Name, Type, Bits, Default, Description) |
#define | SANITIZER(NAME, ID) |
#define | CHECK_TARGET_OPT(Field, Name) |
#define | LANGOPT(Name, Bits, Default, Description) LangOpts.Name = Record[Idx++]; |
#define | ENUM_LANGOPT(Name, Type, Bits, Default, Description) LangOpts.set##Name(static_cast<LangOptions::Type>(Record[Idx++])); |
#define | SANITIZER(NAME, ID) LangOpts.Sanitize.set(SanitizerKind::ID, Record[Idx++]); |
#define | DIAGOPT(Name, Bits, Default) DiagOpts->Name = Record[Idx++]; |
#define | ENUM_DIAGOPT(Name, Type, Bits, Default) DiagOpts->set##Name(static_cast<Type>(Record[Idx++])); |
#define | ABSTRACT_TYPELOC(CLASS, PARENT) |
#define | TYPELOC(CLASS, PARENT) void Visit##CLASS##TypeLoc(CLASS##TypeLoc TyLoc); |
#define | IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) |
#define | EXT_OPAQUE_TYPE(ExtType, Id, Ext) |
Functions | |
static bool | checkLanguageOptions (const LangOptions &LangOpts, const LangOptions &ExistingLangOpts, DiagnosticsEngine *Diags, bool AllowCompatibleDifferences=true) |
Compare the given set of language options against an existing set of language options. More... | |
static bool | checkTargetOptions (const TargetOptions &TargetOpts, const TargetOptions &ExistingTargetOpts, DiagnosticsEngine *Diags, bool AllowCompatibleDifferences=true) |
Compare the given set of target options against an existing set of target options. More... | |
static bool | checkDiagnosticGroupMappings (DiagnosticsEngine &StoredDiags, DiagnosticsEngine &Diags, bool Complain) |
static bool | isExtHandlingFromDiagsError (DiagnosticsEngine &Diags) |
static bool | checkDiagnosticMappings (DiagnosticsEngine &StoredDiags, DiagnosticsEngine &Diags, bool IsSystem, bool Complain) |
static Module * | getTopImportImplicitModule (ModuleManager &ModuleMgr, Preprocessor &PP) |
Return the top import module if it is implicit, nullptr otherwise. More... | |
static void | collectMacroDefinitions (const PreprocessorOptions &PPOpts, MacroDefinitionsMap &Macros, SmallVectorImpl< StringRef > *MacroNames=nullptr) |
Collect the macro definitions provided by the given preprocessor options. More... | |
static bool | checkPreprocessorOptions (const PreprocessorOptions &PPOpts, const PreprocessorOptions &ExistingPPOpts, DiagnosticsEngine *Diags, FileManager &FileMgr, std::string &SuggestedPredefines, const LangOptions &LangOpts, bool Validate=true) |
Check the preprocessor options deserialized from the control block against the preprocessor options in an existing preprocessor. More... | |
static bool | checkHeaderSearchOptions (const HeaderSearchOptions &HSOpts, StringRef SpecificModuleCachePath, StringRef ExistingModuleCachePath, DiagnosticsEngine *Diags, const LangOptions &LangOpts) |
Check the header search options deserialized from the control block against the header search options in an existing preprocessor. More... | |
static bool | isInterestingIdentifier (ASTReader &Reader, IdentifierInfo &II, bool IsModule) |
Whether the given identifier is "interesting". More... | |
static bool | readBit (unsigned &Bits) |
static void | markIdentifierFromAST (ASTReader &Reader, IdentifierInfo &II) |
static std::string | resolveFileRelativeToOriginalDir (const std::string &Filename, const std::string &OriginalDir, const std::string &CurrDir) |
If a header file is not found at the path that we expect it to be and the PCH file was moved from its original location, try to resolve the file by assuming that header+PCH were moved together and the header is in the same place relative to the PCH. More... | |
static unsigned | moduleKindForDiagnostic (ModuleKind Kind) |
static bool | isDiagnosedResult (ASTReader::ASTReadResult ARR, unsigned Caps) |
static void | moveMethodToBackOfGlobalList (Sema &S, ObjCMethodDecl *Method) |
Move the given method to the back of the global list of methods. More... | |
static void | updateModuleTimestamp (ModuleFile &MF) |
static bool | SkipCursorToBlock (BitstreamCursor &Cursor, unsigned BlockID) |
Given a cursor at the start of an AST file, scan ahead and drop the cursor into the start of the given block ID, returning false on success and true on failure. More... | |
static ASTFileSignature | readASTFileSignature (StringRef PCH) |
Reads and return the signature record from PCH's control block, or else returns 0. More... | |
static llvm::Error | doesntStartWithASTFileMagic (BitstreamCursor &Stream) |
Whether Stream doesn't start with the AST/PCH file magic number 'CPCH'. More... | |
static bool | parseModuleFileExtensionMetadata (const SmallVectorImpl< uint64_t > &Record, StringRef Blob, ModuleFileExtensionMetadata &Metadata) |
Parse a record and blob containing module file extension metadata. More... | |
static Decl * | getPredefinedDecl (ASTContext &Context, PredefinedDeclIDs ID) |
static void | PassObjCImplDeclToConsumer (ObjCImplDecl *ImplD, ASTConsumer *Consumer) |
Under non-PCH compilation the consumer receives the objc methods before receiving the implementation, and codegen depends on this. More... | |
template<typename Key , typename ModuleFile , unsigned InitialCapacity> | |
static LLVM_DUMP_METHOD void | dumpModuleIDMap (StringRef Name, const ContinuousRangeMap< Key, ModuleFile *, InitialCapacity > &Map) |
static void | addMethodsToPool (Sema &S, ArrayRef< ObjCMethodDecl *> Methods, ObjCMethodList &List) |
Add the given set of methods to the method list. More... | |
static FixedPointSemantics | ReadFixedPointSemantics (const SmallVectorImpl< uint64_t > &Record, unsigned &Idx) |
#define ABSTRACT_TYPELOC | ( | CLASS, | |
PARENT | |||
) |
Definition at line 6874 of file ASTReader.cpp.
#define BENIGN_ENUM_LANGOPT | ( | Name, | |
Type, | |||
Bits, | |||
Default, | |||
Description | |||
) |
#define BENIGN_LANGOPT | ( | Name, | |
Bits, | |||
Default, | |||
Description | |||
) |
#define BENIGN_VALUE_LANGOPT | ( | Name, | |
Type, | |||
Bits, | |||
Default, | |||
Description | |||
) |
#define CHECK_TARGET_OPT | ( | Field, | |
Name | |||
) |
Referenced by checkTargetOptions().
#define COMPATIBLE_ENUM_LANGOPT | ( | Name, | |
Bits, | |||
Default, | |||
Description | |||
) |
#define COMPATIBLE_LANGOPT | ( | Name, | |
Bits, | |||
Default, | |||
Description | |||
) |
#define COMPATIBLE_VALUE_LANGOPT | ( | Name, | |
Bits, | |||
Default, | |||
Description | |||
) |
#define DIAGOPT | ( | Name, | |
Bits, | |||
Default | |||
) | DiagOpts->Name = Record[Idx++]; |
#define ENUM_DIAGOPT | ( | Name, | |
Type, | |||
Bits, | |||
Default | |||
) | DiagOpts->set##Name(static_cast<Type>(Record[Idx++])); |
#define ENUM_LANGOPT | ( | Name, | |
Type, | |||
Bits, | |||
Default, | |||
Description | |||
) |
#define ENUM_LANGOPT | ( | Name, | |
Type, | |||
Bits, | |||
Default, | |||
Description | |||
) | LangOpts.set##Name(static_cast<LangOptions::Type>(Record[Idx++])); |
#define EXT_OPAQUE_TYPE | ( | ExtType, | |
Id, | |||
Ext | |||
) |
#define IMAGE_TYPE | ( | ImgType, | |
Id, | |||
SingletonId, | |||
Access, | |||
Suffix | |||
) |
#define LANGOPT | ( | Name, | |
Bits, | |||
Default, | |||
Description | |||
) |
#define LANGOPT | ( | Name, | |
Bits, | |||
Default, | |||
Description | |||
) | LangOpts.Name = Record[Idx++]; |
#define SANITIZER | ( | NAME, | |
ID | |||
) |
#define SANITIZER | ( | NAME, | |
ID | |||
) | LangOpts.Sanitize.set(SanitizerKind::ID, Record[Idx++]); |
Definition at line 6875 of file ASTReader.cpp.
#define VALUE_LANGOPT | ( | Name, | |
Bits, | |||
Default, | |||
Description | |||
) |
|
static |
Add the given set of methods to the method list.
Definition at line 8511 of file ASTReader.cpp.
|
static |
Definition at line 456 of file ASTReader.cpp.
References clang::DiagnosticsEngine::Error, clang::DiagnosticsEngine::getDiagnosticIDs(), clang::DiagnosticsEngine::getDiagnosticLevel(), and clang::DiagnosticsEngine::Report().
Referenced by checkDiagnosticMappings().
|
static |
Definition at line 493 of file ASTReader.cpp.
References checkDiagnosticGroupMappings(), clang::DiagnosticsEngine::getEnableAllWarnings(), clang::DiagnosticsEngine::getSuppressSystemWarnings(), clang::DiagnosticsEngine::getWarningsAsErrors(), isExtHandlingFromDiagsError(), and clang::DiagnosticsEngine::Report().
Referenced by clang::PCHValidator::ReadDiagnosticOptions().
|
static |
Check the header search options deserialized from the control block against the header search options in an existing preprocessor.
Diags | If non-null, produce diagnostics for any mismatches incurred. |
Definition at line 774 of file ASTReader.cpp.
References clang::DiagnosticsEngine::Report().
Referenced by clang::ASTReader::getOriginalSourceFile(), and clang::PCHValidator::ReadHeaderSearchOptions().
|
static |
Compare the given set of language options against an existing set of language options.
Diags | If non-NULL, diagnostics will be emitted via this engine. |
AllowCompatibleDifferences | If true, differences between compatible language options will be permitted. |
Definition at line 267 of file ASTReader.cpp.
References clang::CommentOptions::BlockCommandNames, clang::SanitizerSet::clear(), clang::LangOptions::CommentOpts, clang::getPPTransparentSanitizers(), clang::SanitizerSet::Mask, clang::LangOptions::ModuleFeatures, clang::LangOptions::ObjCRuntime, clang::DiagnosticsEngine::Report(), and clang::LangOptions::Sanitize.
Referenced by clang::ASTReader::getOriginalSourceFile(), and clang::PCHValidator::ReadLanguageOptions().
|
static |
Check the preprocessor options deserialized from the control block against the preprocessor options in an existing preprocessor.
Diags | If non-null, produce diagnostics for any mismatches incurred. |
Validate | If true, validate preprocessor options. If false, allow macros defined by ExistingPPOpts to override those defined by PPOpts in SuggestedPredefines. |
Definition at line 623 of file ASTReader.cpp.
References collectMacroDefinitions(), clang::PreprocessorOptions::DetailedRecord, clang::PreprocessorOptions::ImplicitPCHInclude, clang::PreprocessorOptions::Includes, clang::PreprocessorOptions::MacroIncludes, clang::PreprocessorOptions::PCHThroughHeader, clang::DiagnosticsEngine::Report(), and clang::PreprocessorOptions::UsePredefines.
Referenced by clang::ASTReader::getOriginalSourceFile(), clang::PCHValidator::ReadPreprocessorOptions(), and clang::SimpleASTReaderListener::ReadPreprocessorOptions().
|
static |
Compare the given set of target options against an existing set of target options.
Diags | If non-NULL, diagnostics will be emitted via this engine. |
Definition at line 369 of file ASTReader.cpp.
References CHECK_TARGET_OPT, clang::TargetOptions::FeaturesAsWritten, and clang::DiagnosticsEngine::Report().
Referenced by clang::ASTReader::getOriginalSourceFile(), and clang::PCHValidator::ReadTargetOptions().
|
static |
Collect the macro definitions provided by the given preprocessor options.
Definition at line 581 of file ASTReader.cpp.
References End, and clang::PreprocessorOptions::Macros.
Referenced by checkPreprocessorOptions().
|
static |
Whether Stream
doesn't start with the AST/PCH file magic number 'CPCH'.
Definition at line 4332 of file ASTReader.cpp.
Referenced by clang::ASTReader::getOriginalSourceFile(), moduleKindForDiagnostic(), clang::ASTReader::readASTFileControlBlock(), and readASTFileSignature().
|
static |
Definition at line 8157 of file ASTReader.cpp.
Referenced by clang::ASTReader::dump().
|
static |
Definition at line 7706 of file ASTReader.cpp.
Referenced by clang::ASTReader::GetExistingDecl().
|
static |
Return the top import module if it is implicit, nullptr otherwise.
Definition at line 532 of file ASTReader.cpp.
References clang::Preprocessor::getHeaderSearchInfo(), clang::if(), clang::serialization::ModuleFile::ImportedBy, clang::serialization::ModuleFile::Kind, clang::HeaderSearch::lookupModule(), clang::serialization::MK_ImplicitModule, clang::serialization::ModuleFile::ModuleName, and clang::serialization::ModuleManager::rbegin().
Referenced by clang::PCHValidator::ReadDiagnosticOptions().
|
static |
Definition at line 2390 of file ASTReader.cpp.
References clang::serialization::ModuleFile::ActualOriginalSourceFileName, clang::ASTReader::ARR_ConfigurationMismatch, clang::ASTReader::ARR_Missing, clang::ASTReader::ARR_OutOfDate, clang::ASTReader::ARR_VersionMismatch, clang::serialization::AST_BLOCK_ID, clang::serialization::ModuleFile::BaseDeclID, clang::serialization::ModuleFile::BaseDirectory, clang::serialization::ModuleFile::BaseIdentifierID, clang::serialization::ModuleFile::BasePreprocessedEntityID, clang::serialization::ModuleFile::BasePreprocessedSkippedRangeID, clang::serialization::ModuleFile::BaseSelectorID, clang::serialization::ModuleFile::BaseTypeIndex, clang::HeaderSearchOptions::BuildSessionTimestamp, clang::serialization::COMMENTS_BLOCK_ID, clang::ASTReader::ConfigurationMismatch, clang::serialization::CONTROL_BLOCK_ID, clang::Create(), clang::serialization::CUDA_SPECIAL_DECL_REFS, clang::serialization::DECL_OFFSET, clang::serialization::DECL_UPDATE_OFFSETS, clang::serialization::ModuleFile::DeclOffsets, clang::serialization::ModuleFile::DeclRemap, clang::serialization::ModuleFile::DeclsCursor, clang::serialization::DECLTYPES_BLOCK_ID, clang::serialization::DELEGATING_CTORS, Diag(), clang::serialization::EAGERLY_DESERIALIZED_DECLS, End, clang::Error, clang::serialized_diags::Error, clang::serialization::EXT_VECTOR_DECLS, clang::ASTReader::Failure, clang::serialization::FILE_SORTED_DECLS, clang::serialization::FILE_SYSTEM_OPTIONS, clang::serialization::ModuleFile::FileName, clang::serialization::ModuleFile::FileSortedDecls, clang::serialization::ModuleFile::FirstLoc, clang::serialization::FP_PRAGMA_OPTIONS, clang::getClangFullRepositoryVersion(), clang::serialization::InputFile::getFile(), clang::SourceLocation::getFromRawEncoding(), clang::serialization::ModuleFile::GlobalToLocalDeclIDs, clang::ASTReader::HadErrors, clang::DeclContext::hasExternalLexicalStorage(), clang::serialization::ModuleFile::HasTimestamps, clang::serialization::HEADER_SEARCH_OPTIONS, clang::serialization::HEADER_SEARCH_TABLE, clang::serialization::ModuleFile::HeaderFileInfoTable, clang::serialization::ModuleFile::HeaderFileInfoTableData, clang::serialization::IDENTIFIER_OFFSET, clang::serialization::IDENTIFIER_TABLE, clang::serialization::ModuleFile::IdentifierLookupTable, clang::serialization::ModuleFile::IdentifierOffsets, clang::serialization::ModuleFile::IdentifierRemap, clang::serialization::ModuleFile::IdentifierTableData, clang::serialization::IMPORTED_MODULES, clang::serialization::IMPORTS, clang::serialization::INPUT_FILE_OFFSETS, clang::serialization::INPUT_FILES_BLOCK_ID, clang::serialization::ModuleFile::InputFileOffsets, clang::serialization::ModuleFile::InputFilesCursor, clang::serialization::ModuleFile::InputFilesLoaded, clang::serialization::ModuleFile::InputFilesValidationTimestamp, clang::ContinuousRangeMap< Int, V, InitialCapacity >::insertOrReplace(), clang::serialization::INTERESTING_IDENTIFIERS, clang::serialization::InputFile::isOutOfDate(), clang::serialization::ModuleFile::Kind, clang::serialization::LANGUAGE_OPTIONS, clang::serialization::ModuleFile::LocalNumDecls, clang::serialization::ModuleFile::LocalNumHeaderFileInfos, clang::serialization::ModuleFile::LocalNumIdentifiers, clang::serialization::ModuleFile::LocalNumObjCCategoriesInMap, clang::serialization::ModuleFile::LocalNumSelectors, clang::serialization::ModuleFile::LocalNumSLocEntries, clang::serialization::ModuleFile::LocalNumTypes, clang::serialization::MACRO_OFFSET, clang::serialization::ModuleFile::MacroCursor, clang::serialization::ModuleFile::MacroStartOffset, clang::serialization::METADATA, clang::serialization::METHOD_POOL, clang::ASTReader::Missing, clang::serialization::MK_ExplicitModule, clang::serialization::MK_ImplicitModule, clang::serialization::MK_MainFile, clang::serialization::MK_PrebuiltModule, clang::serialization::MODULAR_CODEGEN_DECLS, clang::serialization::MODULE_DIRECTORY, clang::serialization::MODULE_MAP_FILE, clang::serialization::MODULE_NAME, clang::serialization::MODULE_OFFSET_MAP, clang::serialization::ModuleFile::ModuleName, clang::serialization::ModuleFile::ModuleOffsetMap, clang::HeaderSearchOptions::ModulesValidateOncePerBuildSession, clang::ASTReaderListener::needsInputFileVisitation(), clang::ASTReaderListener::needsSystemInputFileVisitation(), clang::serialization::NUM_PREDEF_DECL_IDS, clang::serialization::ModuleFile::NumFileSortedDecls, clang::serialization::ModuleFile::NumPreprocessedEntities, clang::serialization::ModuleFile::NumPreprocessedSkippedRanges, clang::serialization::ModuleFile::NumUserInputFiles, clang::serialization::OBJC_CATEGORIES, clang::serialization::OBJC_CATEGORIES_MAP, clang::serialization::ModuleFile::ObjCCategories, clang::serialization::ModuleFile::ObjCCategoriesMap, clang::serialization::OPENCL_EXTENSIONS, clang::serialization::OPTIONS_BLOCK_ID, clang::serialization::ORIGINAL_FILE, clang::serialization::ORIGINAL_FILE_ID, clang::serialization::ORIGINAL_PCH_DIR, clang::serialization::ModuleFile::OriginalDir, clang::serialization::ModuleFile::OriginalSourceFileID, clang::serialization::ModuleFile::OriginalSourceFileName, clang::ASTReader::OutOfDate, clang::serialization::ModuleFile::PCHHasObjectFile, clang::serialization::PENDING_IMPLICIT_INSTANTIATIONS, clang::serialization::PP_CONDITIONAL_STACK, clang::serialization::PP_COUNTER_VALUE, clang::serialization::PPD_ENTITIES_OFFSETS, clang::serialization::PPD_SKIPPED_RANGES, clang::serialization::ModuleFile::PreloadIdentifierOffsets, clang::serialization::ModuleFile::PreloadSLocEntries, clang::serialization::ModuleFile::PreprocessedEntityOffsets, clang::serialization::ModuleFile::PreprocessedEntityRemap, clang::serialization::ModuleFile::PreprocessedSkippedRangeOffsets, clang::serialization::PREPROCESSOR_BLOCK_ID, clang::serialization::PREPROCESSOR_DETAIL_BLOCK_ID, clang::serialization::PREPROCESSOR_OPTIONS, clang::serialization::ModuleFile::PreprocessorDetailCursor, clang::serialization::ModuleFile::PreprocessorDetailStartOffset, clang::ASTReaderListener::ReadCounter(), clang::ASTReaderListener::ReadModuleName(), clang::serialization::REFERENCED_SELECTOR_POOL, clang::serialization::ModuleFile::RelocatablePCH, clang::serialization::SELECTOR_OFFSETS, clang::serialization::ModuleFile::SelectorLookupTable, clang::serialization::ModuleFile::SelectorLookupTableData, clang::serialization::ModuleFile::SelectorOffsets, clang::serialization::ModuleFile::SelectorRemap, clang::serialization::SEMA_DECL_REFS, clang::DeclContext::setHasExternalLexicalStorage(), clang::DeclContext::setMustBuildLookupTable(), clang::serialization::ModuleFile::SLocEntryBaseID, clang::serialization::ModuleFile::SLocEntryBaseOffset, clang::serialization::ModuleFile::SLocEntryOffsets, clang::serialization::ModuleFile::SLocRemap, clang::serialization::SOURCE_LOCATION_OFFSETS, clang::serialization::SOURCE_LOCATION_PRELOADS, clang::serialization::SOURCE_MANAGER_BLOCK_ID, clang::serialization::SOURCE_MANAGER_LINE_TABLE, clang::serialization::SPECIAL_TYPES, clang::serialization::STATISTICS, clang::serialization::ModuleFile::Stream, clang::serialization::SUBMODULE_BLOCK_ID, clang::ASTReader::Success, clang::serialization::TARGET_OPTIONS, true, clang::serialization::TU_UPDATE_LEXICAL, clang::serialization::TYPE_OFFSET, clang::serialization::ModuleFile::TypeOffsets, clang::serialization::ModuleFile::TypeRemap, clang::serialization::UNUSED_FILESCOPED_DECLS, clang::serialization::UPDATE_VISIBLE, clang::serialization::VERSION_MAJOR, clang::ASTReader::VersionMismatch, clang::ASTReaderListener::visitInputFile(), clang::ASTReaderListener::visitModuleFile(), clang::serialization::VTABLE_USES, and clang::serialization::WEAK_UNDECLARED_IDENTIFIERS.
|
static |
Definition at line 486 of file ASTReader.cpp.
References clang::diag::Error, clang::DiagnosticsEngine::getExtensionHandlingBehavior(), clang::DiagnosticsEngine::getWarningsAsErrors(), and clang::diag::Warning.
Referenced by checkDiagnosticMappings().
|
static |
Whether the given identifier is "interesting".
Definition at line 904 of file ASTReader.cpp.
References clang::IdentifierInfo::getFETokenInfo(), clang::Preprocessor::getLangOpts(), clang::IdentifierInfo::getObjCOrBuiltinID(), clang::ASTReader::getPreprocessor(), clang::IdentifierInfo::hadMacroDefinition(), clang::IdentifierInfo::hasRevertedBuiltin(), clang::IdentifierInfo::hasRevertedTokenIDToIdentifier(), and clang::IdentifierInfo::isPoisoned().
Referenced by getDeclForLocalLookup(), and markIdentifierFromAST().
|
static |
Definition at line 927 of file ASTReader.cpp.
References clang::Preprocessor::getCurrentModule(), clang::ASTReader::getPreprocessor(), clang::IdentifierInfo::isFromAST(), isInterestingIdentifier(), clang::IdentifierInfo::setChangedSinceDeserialization(), and clang::IdentifierInfo::setIsFromAST().
Referenced by clang::ASTReader::DecodeIdentifierInfo(), and clang::serialization::reader::ASTIdentifierLookupTrait::ReadData().
|
static |
Definition at line 4350 of file ASTReader.cpp.
References clang::serialization::ModuleManager::AlreadyLoaded, clang::serialization::AST_BLOCK_ID, clang::serialization::CONTROL_BLOCK_ID, clang::serialization::ModuleFile::Data, Diag(), clang::serialization::DIAG_PRAGMA_MAPPINGS, clang::serialization::DIAGNOSTIC_OPTIONS, doesntStartWithASTFileMagic(), clang::Error, clang::serialized_diags::Error, false, clang::serialization::ModuleFile::FileName, clang::serialization::ModuleFile::Kind, clang::serialization::ModuleManager::Missing, clang::serialization::MK_ExplicitModule, clang::serialization::MK_ImplicitModule, clang::serialization::MK_MainFile, clang::serialization::MK_PCH, clang::serialization::MK_Preamble, clang::serialization::MK_PrebuiltModule, clang::serialization::ModuleFile::ModuleName, clang::HeaderSearchOptions::ModulesValidateDiagnosticOptions, clang::serialization::ModuleManager::NewlyLoaded, clang::serialization::ModuleManager::OutOfDate, clang::serialization::ModuleFile::PragmaDiagMappings, clang::serialization::ModuleFile::Signature, clang::serialization::SIGNATURE, SkipCursorToBlock(), clang::serialization::ModuleFile::Stream, true, and clang::serialization::UNHASHED_CONTROL_BLOCK_ID.
Referenced by clang::ASTReader::resolvePendingMacro().
|
static |
Move the given method to the back of the global list of methods.
Definition at line 3898 of file ASTReader.cpp.
Referenced by clang::ASTReader::makeNamesVisible().
|
static |
Parse a record and blob containing module file extension metadata.
Definition at line 4649 of file ASTReader.cpp.
References clang::ModuleFileExtensionMetadata::BlockName, clang::Error, clang::serialized_diags::Error, clang::serialization::EXTENSION_METADATA, clang::serialization::ModuleFile::ExtensionReaders, clang::ModuleFileExtensionMetadata::MajorVersion, clang::ModuleFileExtensionMetadata::MinorVersion, clang::serialization::ModuleFile::Stream, and clang::ModuleFileExtensionMetadata::UserInfo.
Referenced by clang::ASTReader::readASTFileControlBlock().
|
static |
Under non-PCH compilation the consumer receives the objc methods before receiving the implementation, and codegen depends on this.
We simulate this by deserializing and passing to consumer the methods of the implementation before passing the deserialized implementation decl.
Definition at line 8034 of file ASTReader.cpp.
References clang::ASTConsumer::HandleInterestingDecl(), and clang::ObjCContainerDecl::methods().
|
static |
Reads and return the signature record from PCH's
control block, or else returns 0.
Definition at line 4876 of file ASTReader.cpp.
References doesntStartWithASTFileMagic(), clang::Error, clang::serialization::SIGNATURE, SkipCursorToBlock(), and clang::serialization::UNHASHED_CONTROL_BLOCK_ID.
|
static |
Definition at line 914 of file ASTReader.cpp.
Referenced by clang::serialization::reader::ASTIdentifierLookupTrait::ReadData().
|
static |
Definition at line 9512 of file ASTReader.cpp.
Referenced by clang::ASTReader::ReadAPValue().
|
static |
If a header file is not found at the path that we expect it to be and the PCH file was moved from its original location, try to resolve the file by assuming that header+PCH were moved together and the header is in the same place relative to the PCH.
Definition at line 1378 of file ASTReader.cpp.
Referenced by clang::ASTReader::resolvePendingMacro().
|
static |
Given a cursor at the start of an AST file, scan ahead and drop the cursor into the start of the given block ID, returning false on success and true on failure.
Definition at line 4049 of file ASTReader.cpp.
References clang::Error, and clang::serialized_diags::Error.
Referenced by clang::ASTReader::getOriginalSourceFile(), moduleKindForDiagnostic(), clang::ASTReader::ReadAST(), clang::ASTReader::readASTFileControlBlock(), and readASTFileSignature().
|
static |
Definition at line 4034 of file ASTReader.cpp.
References clang::serialization::ModuleFile::getTimestampFilename().