clang
10.0.0git
|
#include "clang/AST/OpenMPClause.h"
#include "clang/Serialization/ASTRecordWriter.h"
#include "ASTCommon.h"
#include "ASTReaderInternals.h"
#include "MultiOnDiskHashTable.h"
#include "clang/AST/AbstractTypeWriter.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTUnresolvedSet.h"
#include "clang/AST/Attr.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclBase.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclContextInternals.h"
#include "clang/AST/DeclFriend.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/LambdaCapture.h"
#include "clang/AST/NestedNameSpecifier.h"
#include "clang/AST/RawCommentList.h"
#include "clang/AST/TemplateName.h"
#include "clang/AST/Type.h"
#include "clang/AST/TypeLocVisitor.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/DiagnosticOptions.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/FileSystemOptions.h"
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/Lambda.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/Module.h"
#include "clang/Basic/ObjCRuntime.h"
#include "clang/Basic/OpenCLOptions.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/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/IdentifierResolver.h"
#include "clang/Sema/ObjCMethodList.h"
#include "clang/Sema/Sema.h"
#include "clang/Sema/Weak.h"
#include "clang/Serialization/ASTReader.h"
#include "clang/Serialization/InMemoryModuleCache.h"
#include "clang/Serialization/ModuleFile.h"
#include "clang/Serialization/ModuleFileExtension.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/Hashing.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/PointerIntPair.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Bitstream/BitCodes.h"
#include "llvm/Bitstream/BitstreamWriter.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Compression.h"
#include "llvm/Support/DJB.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/EndianStream.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/OnDiskHashTable.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/SHA1.h"
#include "llvm/Support/VersionTuple.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <limits>
#include <memory>
#include <queue>
#include <tuple>
#include <utility>
#include <vector>
#include "clang/Serialization/TypeBitCodes.def"
#include "clang/AST/TypeLocNodes.def"
#include "clang/Basic/DiagnosticOptions.def"
#include "clang/Basic/LangOptions.def"
#include "clang/Basic/Sanitizers.def"
#include "clang/Serialization/AttrPCHWrite.inc"
#include "clang/AST/CXXRecordDeclDefinitionBits.def"
#include "clang/Basic/OpenMPKinds.def"
Go to the source code of this file.
Macros | |
#define | TYPE_BIT_CODE(CLASS_ID, CODE_ID, CODE_VALUE) case Type::CLASS_ID: return TYPE_##CODE_ID; |
#define | ABSTRACT_TYPELOC(CLASS, PARENT) |
#define | TYPELOC(CLASS, PARENT) void Visit##CLASS##TypeLoc(CLASS##TypeLoc TyLoc); |
#define | RECORD(X) EmitRecordID(X, #X, Stream, Record) |
#define | BLOCK(X) EmitBlockID(X ## _ID, #X, Stream, Record) |
#define | RECORD(X) EmitRecordID(X, #X, Stream, Record) |
#define | DIAGOPT(Name, Bits, Default) Record.push_back(DiagOpts.Name); |
#define | ENUM_DIAGOPT(Name, Type, Bits, Default) Record.push_back(static_cast<unsigned>(DiagOpts.get##Name())); |
#define | LANGOPT(Name, Bits, Default, Description) Record.push_back(LangOpts.Name); |
#define | ENUM_LANGOPT(Name, Type, Bits, Default, Description) Record.push_back(static_cast<unsigned>(LangOpts.get##Name())); |
#define | SANITIZER(NAME, ID) Record.push_back(LangOpts.Sanitize.has(SanitizerKind::ID)); |
#define | FIELD(Name, Width, Merge) Record->push_back(Data.Name); |
#define | OPENMP_CLAUSE(Name, Class) void Visit##Class(Class *S); |
Functions | |
template<typename T , typename Allocator > | |
static StringRef | bytes (const std::vector< T, Allocator > &v) |
template<typename T > | |
static StringRef | bytes (const SmallVectorImpl< T > &v) |
static TypeCode | getTypeCodeForTypeClass (Type::TypeClass id) |
static void | EmitBlockID (unsigned ID, const char *Name, llvm::BitstreamWriter &Stream, ASTWriter::RecordDataImpl &Record) |
static void | EmitRecordID (unsigned ID, const char *Name, llvm::BitstreamWriter &Stream, ASTWriter::RecordDataImpl &Record) |
static void | AddStmtsExprs (llvm::BitstreamWriter &Stream, ASTWriter::RecordDataImpl &Record) |
static bool | cleanPathForOutput (FileManager &FileMgr, SmallVectorImpl< char > &Path) |
Prepares a path for being written to an AST file by converting it to an absolute path and removing nested '. More... | |
static const char * | adjustFilenameForRelocatableAST (const char *Filename, StringRef BaseDir) |
Adjusts the given filename to only write out the portion of the filename that is not part of the system root directory. More... | |
static unsigned | CreateSLocFileAbbrev (llvm::BitstreamWriter &Stream) |
Create an abbreviation for the SLocEntry that refers to a file. More... | |
static unsigned | CreateSLocBufferAbbrev (llvm::BitstreamWriter &Stream) |
Create an abbreviation for the SLocEntry that refers to a buffer. More... | |
static unsigned | CreateSLocBufferBlobAbbrev (llvm::BitstreamWriter &Stream, bool Compressed) |
Create an abbreviation for the SLocEntry that refers to a buffer's blob. More... | |
static unsigned | CreateSLocExpansionAbbrev (llvm::BitstreamWriter &Stream) |
Create an abbreviation for the SLocEntry that refers to a macro expansion. More... | |
static void | emitBlob (llvm::BitstreamWriter &Stream, StringRef Blob, unsigned SLocBufferBlobCompressedAbbrv, unsigned SLocBufferBlobAbbrv) |
static bool | shouldIgnoreMacro (MacroDirective *MD, bool IsModule, const Preprocessor &PP) |
static unsigned | getNumberOfModules (Module *Mod) |
Compute the number of modules within the given tree (including the given module). More... | |
static NamedDecl * | getDeclForLocalLookup (const LangOptions &LangOpts, NamedDecl *D) |
Determine the declaration that should be put into the name lookup table to represent the given declaration in this module. More... | |
template<typename Vector > | |
static void | AddLazyVectorDecls (ASTWriter &Writer, Vector &Vec, ASTWriter::RecordData &Record) |
static void | WriteFixedPointSemantics (ASTRecordWriter &Record, FixedPointSemantics FPSema) |
static uint64_t | EmitCXXBaseSpecifiers (ASTWriter &W, ArrayRef< CXXBaseSpecifier > Bases) |
static uint64_t | EmitCXXCtorInitializers (ASTWriter &W, ArrayRef< CXXCtorInitializer *> CtorInits) |
static bool | isImportedDeclContext (ASTReader *Chain, const Decl *D) |
#define ABSTRACT_TYPELOC | ( | CLASS, | |
PARENT | |||
) |
Definition at line 181 of file ASTWriter.cpp.
#define BLOCK | ( | X | ) | EmitBlockID(X ## _ID, #X, Stream, Record) |
Referenced by AddStmtsExprs().
#define DIAGOPT | ( | Name, | |
Bits, | |||
Default | |||
) | Record.push_back(DiagOpts.Name); |
#define ENUM_DIAGOPT | ( | Name, | |
Type, | |||
Bits, | |||
Default | |||
) | Record.push_back(static_cast<unsigned>(DiagOpts.get##Name())); |
#define ENUM_LANGOPT | ( | Name, | |
Type, | |||
Bits, | |||
Default, | |||
Description | |||
) | Record.push_back(static_cast<unsigned>(LangOpts.get##Name())); |
#define FIELD | ( | Name, | |
Width, | |||
Merge | |||
) | Record->push_back(Data.Name); |
#define LANGOPT | ( | Name, | |
Bits, | |||
Default, | |||
Description | |||
) | Record.push_back(LangOpts.Name); |
#define OPENMP_CLAUSE | ( | Name, | |
Class | |||
) | void Visit##Class(Class *S); |
Definition at line 6028 of file ASTWriter.cpp.
#define RECORD | ( | X | ) | EmitRecordID(X, #X, Stream, Record) |
Referenced by AddStmtsExprs().
#define RECORD | ( | X | ) | EmitRecordID(X, #X, Stream, Record) |
#define SANITIZER | ( | NAME, | |
ID | |||
) | Record.push_back(LangOpts.Sanitize.has(SanitizerKind::ID)); |
#define TYPE_BIT_CODE | ( | CLASS_ID, | |
CODE_ID, | |||
CODE_VALUE | |||
) | case Type::CLASS_ID: return TYPE_##CODE_ID; |
Definition at line 182 of file ASTWriter.cpp.
|
static |
Definition at line 4328 of file ASTWriter.cpp.
References clang::ASTWriter::AddDeclRef(), clang::ASTWriter::AddIdentifierRef(), clang::ASTWriter::AddSourceLocation(), clang::ASTWriter::AddTypeRef(), clang::serialization::AST_BLOCK_ID, clang::IdentifierResolver::begin(), bytes(), clang::Sema::Context, clang::CPlusPlus, clang::Sema::DelegatingCtorDecls, clang::transformer::deref(), clang::IdentifierResolver::end(), clang::Sema::ExtVectorDecls, clang::WeakInfo::getAlias(), clang::TranslationUnitDecl::getAnonymousNamespace(), clang::ASTContext::getcudaConfigureCallDecl(), clang::ASTWriter::GetDeclRef(), clang::ASTContext::getFILEType(), clang::Preprocessor::getIdentifierTable(), clang::ASTContext::getjmp_bufType(), clang::Decl::getKind(), clang::ASTWriter::getLangOpts(), clang::WeakInfo::getLocation(), clang::Sema::getMismatchingDeleteExpressions(), clang::ASTContext::getRawCFConstantStringType(), clang::ASTContext::getsigjmp_bufType(), clang::Sema::getStdAlignValT(), clang::Sema::getStdBadAlloc(), clang::Sema::getStdNamespace(), clang::ASTContext::getTranslationUnitDecl(), clang::ASTContext::getucontext_tType(), clang::Sema::getUndefinedButUsed(), clang::WeakInfo::getUsed(), clang::IdentifierInfo::hasChangedSinceDeserialization(), clang::Sema::IdResolver, clang::Decl::isCanonicalDecl(), clang::IdentifierInfo::isFromAST(), clang::Decl::isFromASTFile(), clang::serialization::ModuleFile::Kind, clang::interp::LE(), clang::serialization::METADATA_OLD_FORMAT, clang::serialization::MODULE_OFFSET_MAP, clang::DeclContext::noload_decls(), clang::Sema::PendingInstantiations, clang::Sema::PendingLocalImplicitInstantiations, clang::Sema::PP, clang::serialization::PREDEF_DECL_BUILTIN_MS_VA_LIST_ID, clang::serialization::PREDEF_DECL_BUILTIN_VA_LIST_ID, clang::serialization::PREDEF_DECL_CF_CONSTANT_STRING_ID, clang::serialization::PREDEF_DECL_CF_CONSTANT_STRING_TAG_ID, clang::serialization::PREDEF_DECL_EXTERN_C_CONTEXT_ID, clang::serialization::PREDEF_DECL_INT_128_ID, clang::serialization::PREDEF_DECL_MAKE_INTEGER_SEQ_ID, clang::serialization::PREDEF_DECL_OBJC_CLASS_ID, clang::serialization::PREDEF_DECL_OBJC_ID_ID, clang::serialization::PREDEF_DECL_OBJC_INSTANCETYPE_ID, clang::serialization::PREDEF_DECL_OBJC_PROTOCOL_ID, clang::serialization::PREDEF_DECL_OBJC_SEL_ID, clang::serialization::PREDEF_DECL_TRANSLATION_UNIT_ID, clang::serialization::PREDEF_DECL_TYPE_PACK_ELEMENT_ID, clang::serialization::PREDEF_DECL_UNSIGNED_INT_128_ID, clang::serialization::PREDEF_DECL_VA_LIST_TAG, clang::Sema::StdAlignValT, clang::Sema::StdBadAlloc, clang::Sema::StdNamespace, clang::Sema::TentativeDefinitions, clang::serialization::TU_UPDATE_LEXICAL, clang::Sema::UnusedFileScopedDecls, clang::Sema::UnusedLocalTypedefNameCandidates, clang::serialization::UPD_CXX_ADDED_ANONYMOUS_NAMESPACE, clang::serialization::UPD_MANGLING_NUMBER, clang::serialization::UPD_STATIC_LOCAL_NUMBER, clang::serialization::UPDATE_VISIBLE, clang::Sema::updateOutOfDateSelector(), clang::ASTContext::VaListTagDecl, clang::serialization::VERSION_MAJOR, clang::Sema::VTablesUsed, clang::Sema::VTableUses, and clang::Sema::WeakUndeclaredIdentifiers.
|
static |
Definition at line 545 of file ASTWriter.cpp.
References BLOCK, clang::serialization::COMMENTS_RAW_COMMENT, clang::serialization::CUDA_PRAGMA_FORCE_HOST_DEVICE_DEPTH, clang::serialization::CUDA_SPECIAL_DECL_REFS, clang::serialization::DECL_ACCESS_SPEC, clang::serialization::DECL_BLOCK, clang::serialization::DECL_CLASS_SCOPE_FUNCTION_SPECIALIZATION, clang::serialization::DECL_CLASS_TEMPLATE, clang::serialization::DECL_CLASS_TEMPLATE_PARTIAL_SPECIALIZATION, clang::serialization::DECL_CLASS_TEMPLATE_SPECIALIZATION, clang::serialization::DECL_CONCEPT, clang::serialization::DECL_CONTEXT_LEXICAL, clang::serialization::DECL_CONTEXT_VISIBLE, clang::serialization::DECL_CXX_BASE_SPECIFIERS, clang::serialization::DECL_CXX_CONSTRUCTOR, clang::serialization::DECL_CXX_CONVERSION, clang::serialization::DECL_CXX_CTOR_INITIALIZERS, clang::serialization::DECL_CXX_DESTRUCTOR, clang::serialization::DECL_CXX_METHOD, clang::serialization::DECL_CXX_RECORD, clang::serialization::DECL_EMPTY, clang::serialization::DECL_ENUM, clang::serialization::DECL_ENUM_CONSTANT, clang::serialization::DECL_EXPANDED_NON_TYPE_TEMPLATE_PARM_PACK, clang::serialization::DECL_EXPANDED_TEMPLATE_TEMPLATE_PARM_PACK, clang::serialization::DECL_FIELD, clang::serialization::DECL_FILE_SCOPE_ASM, clang::serialization::DECL_FRIEND, clang::serialization::DECL_FRIEND_TEMPLATE, clang::serialization::DECL_FUNCTION, clang::serialization::DECL_FUNCTION_TEMPLATE, clang::serialization::DECL_IMPLICIT_PARAM, clang::serialization::DECL_IMPORT, clang::serialization::DECL_INDIRECTFIELD, clang::serialization::DECL_LINKAGE_SPEC, clang::serialization::DECL_MS_PROPERTY, clang::serialization::DECL_NAMESPACE, clang::serialization::DECL_NAMESPACE_ALIAS, clang::serialization::DECL_NON_TYPE_TEMPLATE_PARM, clang::serialization::DECL_OBJC_AT_DEFS_FIELD, clang::serialization::DECL_OBJC_CATEGORY, clang::serialization::DECL_OBJC_CATEGORY_IMPL, clang::serialization::DECL_OBJC_COMPATIBLE_ALIAS, clang::serialization::DECL_OBJC_IMPLEMENTATION, clang::serialization::DECL_OBJC_INTERFACE, clang::serialization::DECL_OBJC_IVAR, clang::serialization::DECL_OBJC_METHOD, clang::serialization::DECL_OBJC_PROPERTY, clang::serialization::DECL_OBJC_PROPERTY_IMPL, clang::serialization::DECL_OBJC_PROTOCOL, clang::serialization::DECL_OBJC_TYPE_PARAM, clang::serialization::DECL_OFFSET, clang::serialization::DECL_OMP_ALLOCATE, clang::serialization::DECL_OMP_CAPTUREDEXPR, clang::serialization::DECL_OMP_DECLARE_REDUCTION, clang::serialization::DECL_OMP_THREADPRIVATE, clang::serialization::DECL_PARM_VAR, clang::serialization::DECL_PRAGMA_COMMENT, clang::serialization::DECL_PRAGMA_DETECT_MISMATCH, clang::serialization::DECL_RECORD, clang::serialization::DECL_REQUIRES_EXPR_BODY, clang::serialization::DECL_STATIC_ASSERT, clang::serialization::DECL_TEMPLATE_TEMPLATE_PARM, clang::serialization::DECL_TEMPLATE_TYPE_PARM, clang::serialization::DECL_TYPE_ALIAS_TEMPLATE, clang::serialization::DECL_TYPEALIAS, clang::serialization::DECL_TYPEDEF, clang::serialization::DECL_UNRESOLVED_USING_TYPENAME, clang::serialization::DECL_UNRESOLVED_USING_VALUE, clang::serialization::DECL_UPDATE_OFFSETS, clang::serialization::DECL_UPDATES, clang::serialization::DECL_USING, clang::serialization::DECL_USING_DIRECTIVE, clang::serialization::DECL_USING_SHADOW, clang::serialization::DECL_VAR, clang::serialization::DECL_VAR_TEMPLATE, clang::serialization::DECL_VAR_TEMPLATE_PARTIAL_SPECIALIZATION, clang::serialization::DECL_VAR_TEMPLATE_SPECIALIZATION, clang::serialization::DELEGATING_CTORS, clang::serialization::DELETE_EXPRS_TO_ANALYZE, clang::serialization::DIAG_PRAGMA_MAPPINGS, clang::serialization::DIAGNOSTIC_OPTIONS, clang::serialization::EAGERLY_DESERIALIZED_DECLS, clang::serialization::EXPR_ADDR_LABEL, clang::serialization::EXPR_ARRAY_SUBSCRIPT, clang::serialization::EXPR_ARRAY_TYPE_TRAIT, clang::serialization::EXPR_BINARY_CONDITIONAL_OPERATOR, clang::serialization::EXPR_BINARY_OPERATOR, clang::serialization::EXPR_BLOCK, clang::serialization::EXPR_CALL, clang::serialization::EXPR_CHARACTER_LITERAL, clang::serialization::EXPR_CHOOSE, clang::serialization::EXPR_COMPOUND_ASSIGN_OPERATOR, clang::serialization::EXPR_COMPOUND_LITERAL, clang::serialization::EXPR_CONDITIONAL_OPERATOR, clang::serialization::EXPR_CSTYLE_CAST, clang::serialization::EXPR_CUDA_KERNEL_CALL, clang::serialization::EXPR_CXX_BIND_TEMPORARY, clang::serialization::EXPR_CXX_BOOL_LITERAL, clang::serialization::EXPR_CXX_CONST_CAST, clang::serialization::EXPR_CXX_CONSTRUCT, clang::serialization::EXPR_CXX_DEFAULT_ARG, clang::serialization::EXPR_CXX_DEFAULT_INIT, clang::serialization::EXPR_CXX_DELETE, clang::serialization::EXPR_CXX_DEPENDENT_SCOPE_DECL_REF, clang::serialization::EXPR_CXX_DEPENDENT_SCOPE_MEMBER, clang::serialization::EXPR_CXX_DYNAMIC_CAST, clang::serialization::EXPR_CXX_EXPRESSION_TRAIT, clang::serialization::EXPR_CXX_FUNCTIONAL_CAST, clang::serialization::EXPR_CXX_MEMBER_CALL, clang::serialization::EXPR_CXX_NEW, clang::serialization::EXPR_CXX_NOEXCEPT, clang::serialization::EXPR_CXX_NULL_PTR_LITERAL, clang::serialization::EXPR_CXX_OPERATOR_CALL, clang::serialization::EXPR_CXX_PSEUDO_DESTRUCTOR, clang::serialization::EXPR_CXX_REINTERPRET_CAST, clang::serialization::EXPR_CXX_REWRITTEN_BINARY_OPERATOR, clang::serialization::EXPR_CXX_SCALAR_VALUE_INIT, clang::serialization::EXPR_CXX_STATIC_CAST, clang::serialization::EXPR_CXX_STD_INITIALIZER_LIST, clang::serialization::EXPR_CXX_TEMPORARY_OBJECT, clang::serialization::EXPR_CXX_THIS, clang::serialization::EXPR_CXX_THROW, clang::serialization::EXPR_CXX_TYPEID_EXPR, clang::serialization::EXPR_CXX_TYPEID_TYPE, clang::serialization::EXPR_CXX_UNRESOLVED_CONSTRUCT, clang::serialization::EXPR_CXX_UNRESOLVED_LOOKUP, clang::serialization::EXPR_CXX_UNRESOLVED_MEMBER, clang::serialization::EXPR_CXX_UUIDOF_EXPR, clang::serialization::EXPR_CXX_UUIDOF_TYPE, clang::serialization::EXPR_DECL_REF, clang::serialization::EXPR_DESIGNATED_INIT, clang::serialization::EXPR_DESIGNATED_INIT_UPDATE, clang::serialization::EXPR_EXPR_WITH_CLEANUPS, clang::serialization::EXPR_EXT_VECTOR_ELEMENT, clang::serialization::EXPR_FLOATING_LITERAL, clang::serialization::EXPR_FUNCTION_PARM_PACK, clang::serialization::EXPR_GENERIC_SELECTION, clang::serialization::EXPR_GNU_NULL, clang::serialization::EXPR_IMAGINARY_LITERAL, clang::serialization::EXPR_IMPLICIT_CAST, clang::serialization::EXPR_IMPLICIT_VALUE_INIT, clang::serialization::EXPR_INIT_LIST, clang::serialization::EXPR_INTEGER_LITERAL, clang::serialization::EXPR_LAMBDA, clang::serialization::EXPR_MATERIALIZE_TEMPORARY, clang::serialization::EXPR_MEMBER, clang::serialization::EXPR_NO_INIT, clang::serialization::EXPR_OBJC_ARRAY_LITERAL, clang::serialization::EXPR_OBJC_BOOL_LITERAL, clang::serialization::EXPR_OBJC_BOXED_EXPRESSION, clang::serialization::EXPR_OBJC_DICTIONARY_LITERAL, clang::serialization::EXPR_OBJC_ENCODE, clang::serialization::EXPR_OBJC_IVAR_REF_EXPR, clang::serialization::EXPR_OBJC_KVC_REF_EXPR, clang::serialization::EXPR_OBJC_MESSAGE_EXPR, clang::serialization::EXPR_OBJC_PROPERTY_REF_EXPR, clang::serialization::EXPR_OBJC_PROTOCOL_EXPR, clang::serialization::EXPR_OBJC_SELECTOR_EXPR, clang::serialization::EXPR_OBJC_STRING_LITERAL, clang::serialization::EXPR_OPAQUE_VALUE, clang::serialization::EXPR_PACK_EXPANSION, clang::serialization::EXPR_PAREN, clang::serialization::EXPR_PAREN_LIST, clang::serialization::EXPR_PREDEFINED, clang::serialization::EXPR_SHUFFLE_VECTOR, clang::serialization::EXPR_SIZEOF_ALIGN_OF, clang::serialization::EXPR_SIZEOF_PACK, clang::serialization::EXPR_STMT, clang::serialization::EXPR_STRING_LITERAL, clang::serialization::EXPR_SUBST_NON_TYPE_TEMPLATE_PARM, clang::serialization::EXPR_SUBST_NON_TYPE_TEMPLATE_PARM_PACK, clang::serialization::EXPR_TYPE_TRAIT, clang::serialization::EXPR_UNARY_OPERATOR, clang::serialization::EXPR_USER_DEFINED_LITERAL, clang::serialization::EXPR_VA_ARG, clang::serialization::EXT_VECTOR_DECLS, clang::serialization::EXTENSION_METADATA, clang::serialization::FILE_SORTED_DECLS, clang::serialization::FILE_SYSTEM_OPTIONS, clang::serialization::FP_PRAGMA_OPTIONS, clang::serialization::HEADER_SEARCH_OPTIONS, clang::serialization::HEADER_SEARCH_TABLE, clang::serialization::IDENTIFIER_OFFSET, clang::serialization::IDENTIFIER_TABLE, clang::serialization::IMPORTED_MODULES, clang::serialization::IMPORTS, clang::serialization::INPUT_FILE, clang::serialization::INPUT_FILE_HASH, clang::serialization::INPUT_FILE_OFFSETS, clang::serialization::INTERESTING_IDENTIFIERS, clang::serialization::KNOWN_NAMESPACES, clang::serialization::LANGUAGE_OPTIONS, clang::serialization::LATE_PARSED_TEMPLATE, clang::serialization::LOCAL_REDECLARATIONS, clang::serialization::MACRO_OFFSET, clang::serialization::METADATA, clang::serialization::METHOD_POOL, 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::MSSTRUCT_PRAGMA_OPTIONS, clang::serialization::OBJC_CATEGORIES, clang::serialization::OBJC_CATEGORIES_MAP, clang::serialization::OPENCL_EXTENSION_DECLS, clang::serialization::OPENCL_EXTENSION_TYPES, clang::serialization::OPENCL_EXTENSIONS, clang::serialization::OPTIMIZE_PRAGMA_OPTIONS, clang::serialization::ORIGINAL_FILE, clang::serialization::ORIGINAL_FILE_ID, clang::serialization::ORIGINAL_PCH_DIR, clang::serialization::PENDING_IMPLICIT_INSTANTIATIONS, clang::serialization::POINTERS_TO_MEMBERS_PRAGMA_OPTIONS, clang::serialization::PP_CONDITIONAL_STACK, clang::serialization::PP_COUNTER_VALUE, clang::serialization::PP_MACRO_DIRECTIVE_HISTORY, clang::serialization::PP_MACRO_FUNCTION_LIKE, clang::serialization::PP_MACRO_OBJECT_LIKE, clang::serialization::PP_MODULE_MACRO, clang::serialization::PP_TOKEN, clang::serialization::PPD_ENTITIES_OFFSETS, clang::serialization::PPD_INCLUSION_DIRECTIVE, clang::serialization::PPD_MACRO_DEFINITION, clang::serialization::PPD_MACRO_EXPANSION, clang::serialization::PPD_SKIPPED_RANGES, clang::serialization::PREPROCESSOR_OPTIONS, RECORD, clang::serialization::REFERENCED_SELECTOR_POOL, clang::serialization::SELECTOR_OFFSETS, clang::serialization::SEMA_DECL_REFS, clang::serialization::SIGNATURE, clang::serialization::SM_SLOC_BUFFER_BLOB, clang::serialization::SM_SLOC_BUFFER_BLOB_COMPRESSED, clang::serialization::SM_SLOC_BUFFER_ENTRY, clang::serialization::SM_SLOC_EXPANSION_ENTRY, clang::serialization::SM_SLOC_FILE_ENTRY, clang::serialization::SOURCE_LOCATION_OFFSETS, clang::serialization::SOURCE_LOCATION_PRELOADS, clang::serialization::SOURCE_MANAGER_LINE_TABLE, clang::serialization::SPECIAL_TYPES, clang::serialization::STATISTICS, clang::serialization::STMT_ATTRIBUTED, clang::serialization::STMT_BREAK, clang::serialization::STMT_CASE, clang::serialization::STMT_COMPOUND, clang::serialization::STMT_CONTINUE, clang::serialization::STMT_CXX_CATCH, clang::serialization::STMT_CXX_FOR_RANGE, clang::serialization::STMT_CXX_TRY, clang::serialization::STMT_DECL, clang::serialization::STMT_DEFAULT, clang::serialization::STMT_DO, clang::serialization::STMT_FOR, clang::serialization::STMT_GCCASM, clang::serialization::STMT_GOTO, clang::serialization::STMT_IF, clang::serialization::STMT_INDIRECT_GOTO, clang::serialization::STMT_LABEL, clang::serialization::STMT_MSASM, clang::serialization::STMT_NULL, clang::serialization::STMT_NULL_PTR, clang::serialization::STMT_OBJC_AT_SYNCHRONIZED, clang::serialization::STMT_OBJC_AT_THROW, clang::serialization::STMT_OBJC_AT_TRY, clang::serialization::STMT_OBJC_CATCH, clang::serialization::STMT_OBJC_FINALLY, clang::serialization::STMT_OBJC_FOR_COLLECTION, clang::serialization::STMT_REF_PTR, clang::serialization::STMT_RETURN, clang::serialization::STMT_STOP, clang::serialization::STMT_SWITCH, clang::serialization::STMT_WHILE, clang::serialization::SUBMODULE_CONFIG_MACRO, clang::serialization::SUBMODULE_CONFLICT, clang::serialization::SUBMODULE_DEFINITION, clang::serialization::SUBMODULE_EXCLUDED_HEADER, clang::serialization::SUBMODULE_EXPORT_AS, clang::serialization::SUBMODULE_EXPORTS, clang::serialization::SUBMODULE_HEADER, clang::serialization::SUBMODULE_IMPORTS, clang::serialization::SUBMODULE_INITIALIZERS, clang::serialization::SUBMODULE_LINK_LIBRARY, clang::serialization::SUBMODULE_METADATA, clang::serialization::SUBMODULE_PRIVATE_HEADER, clang::serialization::SUBMODULE_PRIVATE_TEXTUAL_HEADER, clang::serialization::SUBMODULE_REQUIRES, clang::serialization::SUBMODULE_TEXTUAL_HEADER, clang::serialization::SUBMODULE_TOPHEADER, clang::serialization::SUBMODULE_UMBRELLA_DIR, clang::serialization::SUBMODULE_UMBRELLA_HEADER, clang::serialization::TARGET_OPTIONS, clang::serialization::TENTATIVE_DEFINITIONS, clang::serialization::TU_UPDATE_LEXICAL, clang::serialization::TYPE_EXT_QUAL, clang::serialization::TYPE_OFFSET, clang::serialization::UNDEFINED_BUT_USED, clang::serialization::UNUSED_FILESCOPED_DECLS, clang::serialization::UNUSED_LOCAL_TYPEDEF_NAME_CANDIDATES, clang::serialization::UPDATE_VISIBLE, clang::serialization::VTABLE_USES, and clang::serialization::WEAK_UNDECLARED_IDENTIFIERS.
|
static |
Adjusts the given filename to only write out the portion of the filename that is not part of the system root directory.
Filename | the file name to adjust. |
BaseDir | When non-NULL, the PCH file is a relocatable AST file and the returned filename will be adjusted by this root directory. |
Filename
parameter). Definition at line 962 of file ASTWriter.cpp.
References Filename, and clang::prec::Shift.
Referenced by clang::ASTWriter::PreparePathForOutput().
|
static |
Definition at line 121 of file ASTWriter.cpp.
Referenced by AddLazyVectorDecls(), bytesSincePreviousTabOrLineBegin(), columnToByte(), clang::driver::tools::Clang::ConstructJob(), getDeclForLocalLookup(), clang::ASTReader::getMemoryBufferSizes(), clang::PreprocessedEntity::operator delete(), operator new(), clang::PreprocessedEntity::operator new(), clang::Stmt::operator new(), and clang::TemplateArgumentListInfo::TemplateArgumentListInfo().
|
static |
Definition at line 128 of file ASTWriter.cpp.
|
static |
Prepares a path for being written to an AST file by converting it to an absolute path and removing nested '.
/'s.
true
if the path was changed. Definition at line 945 of file ASTWriter.cpp.
References clang::FileManager::makeAbsolutePath().
Referenced by clang::ASTWriter::PreparePathForOutput().
|
static |
Create an abbreviation for the SLocEntry that refers to a buffer.
Definition at line 1531 of file ASTWriter.cpp.
References clang::serialization::SM_SLOC_BUFFER_ENTRY.
Referenced by emitBlob().
|
static |
Create an abbreviation for the SLocEntry that refers to a buffer's blob.
Definition at line 1546 of file ASTWriter.cpp.
References clang::serialization::SM_SLOC_BUFFER_BLOB, and clang::serialization::SM_SLOC_BUFFER_BLOB_COMPRESSED.
Referenced by emitBlob().
|
static |
Create an abbreviation for the SLocEntry that refers to a macro expansion.
Definition at line 1561 of file ASTWriter.cpp.
References clang::serialization::ComputeHash(), clang::Preprocessor::Diag(), clang::Module::Directory, Filename, clang::ModuleMap::findAllModulesForHeader(), clang::HeaderSearch::getExistingFileInfo(), clang::HeaderSearch::getFileMgr(), clang::ASTWriter::getIdentifierRef(), clang::ASTWriter::getLocalOrImportedSubmoduleID(), clang::HeaderSearch::getModuleMap(), clang::DirectoryEntry::getName(), clang::FileEntry::getName(), clang::FileEntry::getSize(), clang::FileManager::GetUniqueIDMapping(), clang::format::hash_combine(), clang::HeaderSearch::header_file_size(), clang::serialization::HEADER_SEARCH_TABLE, clang::ModuleMap::headerKindToRole(), clang::Module::isAvailable(), clang::HeaderFileInfo::isCompilingModuleHeader, clang::HeaderFileInfo::isModuleHeader, clang::interp::LE(), clang::Module::MissingHeaders, Offset, clang::ModuleMap::resolveHeaderDirectives(), clang::serialization::SM_SLOC_EXPANSION_ENTRY, clang::Module::submodule_begin(), clang::Module::submodule_end(), and clang::Unresolved.
Referenced by emitBlob().
|
static |
Create an abbreviation for the SLocEntry that refers to a file.
Definition at line 1512 of file ASTWriter.cpp.
References clang::serialization::SM_SLOC_FILE_ENTRY.
Referenced by emitBlob().
|
static |
Definition at line 1843 of file ASTWriter.cpp.
References clang::SrcMgr::ContentCache::BufferOverridden, clang::SrcMgr::ContentCache::ContentsEntry, CreateSLocBufferAbbrev(), CreateSLocBufferBlobAbbrev(), CreateSLocExpansionAbbrev(), CreateSLocFileAbbrev(), clang::Error, clang::SrcMgr::ContentCache::getBuffer(), clang::SrcMgr::FileInfo::getContentCache(), clang::Preprocessor::getDiagnostics(), clang::SrcMgr::SLocEntry::getFile(), clang::SrcMgr::FileInfo::getFileCharacteristic(), clang::Preprocessor::getFileManager(), clang::SrcMgr::FileInfo::getIncludeLoc(), clang::SourceManager::getLocalSLocEntry(), clang::SrcMgr::SLocEntry::getOffset(), clang::SourceManager::getSLocEntry(), clang::SrcMgr::FileInfo::hasLineDirectives(), clang::SrcMgr::SLocEntry::isFile(), clang::SrcMgr::ContentCache::IsTransient, clang::SourceManager::local_sloc_entry_size(), clang::SrcMgr::ContentCache::OrigEntry, clang::serialization::SM_SLOC_BUFFER_BLOB, clang::serialization::SM_SLOC_BUFFER_BLOB_COMPRESSED, clang::serialization::SM_SLOC_BUFFER_ENTRY, clang::serialization::SM_SLOC_EXPANSION_ENTRY, clang::serialization::SM_SLOC_FILE_ENTRY, and clang::serialization::SOURCE_MANAGER_BLOCK_ID.
|
static |
Definition at line 519 of file ASTWriter.cpp.
|
static |
Definition at line 5531 of file ASTWriter.cpp.
References clang::ASTRecordWriter::AddCXXBaseSpecifier(), clang::serialization::DECL_CXX_BASE_SPECIFIERS, clang::ASTRecordWriter::Emit(), and clang::ASTRecordWriter::push_back().
Referenced by clang::ASTRecordWriter::AddCXXBaseSpecifiers().
|
static |
Definition at line 5549 of file ASTWriter.cpp.
References clang::ASTRecordWriter::AddDeclRef(), clang::ASTRecordWriter::AddSourceLocation(), clang::ASTRecordWriter::AddStmt(), clang::ASTRecordWriter::AddTypeSourceInfo(), clang::serialization::CTOR_INITIALIZER_BASE, clang::serialization::CTOR_INITIALIZER_DELEGATING, clang::serialization::CTOR_INITIALIZER_INDIRECT_MEMBER, clang::serialization::CTOR_INITIALIZER_MEMBER, clang::serialization::DECL_CXX_CTOR_INITIALIZERS, clang::ASTRecordWriter::Emit(), and clang::ASTRecordWriter::push_back().
Referenced by clang::ASTRecordWriter::AddCXXCtorInitializers().
|
static |
Definition at line 535 of file ASTWriter.cpp.
|
static |
Determine the declaration that should be put into the name lookup table to represent the given declaration in this module.
This is usually D itself, but if D was imported and merged into a local declaration, we want the most recent local declaration instead. The chosen declaration will be the most recent declaration in any module that imports this one.
Definition at line 3171 of file ASTWriter.cpp.
References clang::IdentifierResolver::begin(), bytes(), clang::serialization::ComputeHash(), clang::CPlusPlus, clang::transformer::deref(), clang::IdentifierResolver::end(), clang::First, clang::Decl::getCanonicalDecl(), clang::Decl::getDeclContext(), clang::ASTWriter::getDeclID(), clang::ASTWriter::GetDeclRef(), clang::IdentifierInfo::getFETokenInfo(), clang::Preprocessor::getIdentifierTable(), clang::ASTWriter::getLangOpts(), clang::Preprocessor::getLangOpts(), clang::IdentifierInfo::getLength(), clang::ASTWriter::getMacroDirectivesOffset(), clang::IdentifierInfo::getName(), clang::IdentifierInfo::getNameStart(), clang::IdentifierInfo::getObjCOrBuiltinID(), clang::Decl::getPreviousDecl(), clang::DeclContext::getRedeclContext(), clang::IdentifierInfo::hasRevertedBuiltin(), clang::IdentifierInfo::hasRevertedTokenIDToIdentifier(), clang::serialization::IDENTIFIER_OFFSET, clang::serialization::IDENTIFIER_TABLE, clang::serialization::INTERESTING_IDENTIFIERS, clang::IdentifierInfo::isCPlusPlusOperatorKeyword(), clang::IdentifierInfo::isExtensionToken(), clang::Decl::isFromASTFile(), isInterestingIdentifier(), clang::IdentifierInfo::isPoisoned(), clang::interp::LE(), clang::serialization::NUM_PREDEF_IDENT_IDS, and clang::ASTWriter::SetIdentifierOffset().
|
static |
Compute the number of modules within the given tree (including the given module).
Definition at line 2446 of file ASTWriter.cpp.
References clang::Module::ConfigMacros, clang::Module::ConfigMacrosExhaustive, clang::Module::Conflicts, Diag(), clang::serialization::DIAG_PRAGMA_MAPPINGS, clang::Module::ExportAsModule, clang::Module::Exports, clang::for(), clang::SourceManager::getComposedLoc(), clang::Preprocessor::getFileManager(), clang::serialization::TypeIdx::getIndex(), clang::ASTContext::getModuleInitializers(), clang::Module::getTopHeaders(), clang::Module::getUmbrellaDir(), clang::Module::getUmbrellaHeader(), clang::Module::Headers, clang::Module::HK_Excluded, clang::Module::HK_Normal, clang::Module::HK_Private, clang::Module::HK_PrivateTextual, clang::Module::HK_Textual, clang::Module::Imports, clang::Module::InferExplicitSubmodules, clang::Module::InferExportWildcard, clang::Module::InferSubmodules, Inits, clang::Module::IsExplicit, clang::Module::IsExternC, clang::Module::IsFramework, clang::SourceLocation::isInvalid(), clang::Module::IsSystem, clang::Module::Kind, clang::Module::LinkLibraries, clang::Module::ModuleMapIsPrivate, clang::Module::Name, clang::serialization::NUM_PREDEF_SUBMODULE_IDS, Offset, clang::Module::Parent, clang::Module::Requirements, State, clang::interp::Sub(), clang::Module::submodule_begin(), clang::serialization::SUBMODULE_BLOCK_ID, clang::serialization::SUBMODULE_CONFIG_MACRO, clang::serialization::SUBMODULE_CONFLICT, clang::serialization::SUBMODULE_DEFINITION, clang::Module::submodule_end(), clang::serialization::SUBMODULE_EXCLUDED_HEADER, clang::serialization::SUBMODULE_EXPORT_AS, clang::serialization::SUBMODULE_EXPORTS, clang::serialization::SUBMODULE_HEADER, clang::serialization::SUBMODULE_IMPORTS, clang::serialization::SUBMODULE_INITIALIZERS, clang::serialization::SUBMODULE_LINK_LIBRARY, clang::serialization::SUBMODULE_METADATA, clang::serialization::SUBMODULE_PRIVATE_HEADER, clang::serialization::SUBMODULE_PRIVATE_TEXTUAL_HEADER, clang::serialization::SUBMODULE_REQUIRES, clang::serialization::SUBMODULE_TEXTUAL_HEADER, clang::serialization::SUBMODULE_TOPHEADER, clang::serialization::SUBMODULE_UMBRELLA_DIR, clang::serialization::SUBMODULE_UMBRELLA_HEADER, and clang::Module::submodules().
|
static |
Definition at line 137 of file ASTWriter.cpp.
References clang::ASTRecordWriter::Emit(), clang::QualType::getLocalQualifiers(), clang::QualType::getLocalUnqualifiedType(), clang::Type::getTypeClass(), clang::ASTWriter::getTypeExtQualAbbrev(), clang::QualType::getTypePtr(), clang::QualType::hasLocalNonFastQualifiers(), clang::serialization::TYPE_EXT_QUAL, clang::serialization::DataStreamBasicWriter< Impl >::writeQualifiers(), and clang::ASTRecordWriter::writeQualType().
Definition at line 5748 of file ASTWriter.cpp.
References clang::DeclContext::decls(), clang::diff::Delete, clang::Decl::FOK_None, clang::Decl::getASTContext(), clang::ObjCInterfaceDecl::getDefinition(), clang::serialization::getDefinitiveDeclContext(), clang::Redeclarable< decl_type >::getFirstDecl(), clang::Decl::getFriendObjectKind(), clang::Decl::getMostRecentDecl(), clang::Decl::getPreviousDecl(), clang::DeclContext::getPrimaryContext(), clang::ASTContext::getVaListTagDecl(), clang::TagDecl::isCompleteDefinition(), clang::Decl::isFromASTFile(), clang::Decl::isHidden(), clang::Decl::isImplicit(), clang::ASTWriter::IsLocalDecl(), clang::DeclContext::isLookupContext(), clang::isUnresolvedExceptionSpec(), clang::serialization::UPD_ADDED_ATTR_TO_RECORD, clang::serialization::UPD_CXX_ADDED_FUNCTION_DEFINITION, clang::serialization::UPD_CXX_ADDED_IMPLICIT_MEMBER, clang::serialization::UPD_CXX_ADDED_VAR_DEFINITION, clang::serialization::UPD_CXX_DEDUCED_RETURN_TYPE, clang::serialization::UPD_CXX_INSTANTIATED_DEFAULT_ARGUMENT, clang::serialization::UPD_CXX_INSTANTIATED_DEFAULT_MEMBER_INITIALIZER, clang::serialization::UPD_CXX_POINT_OF_INSTANTIATION, clang::serialization::UPD_CXX_RESOLVED_DTOR_DELETE, clang::serialization::UPD_CXX_RESOLVED_EXCEPTION_SPEC, clang::serialization::UPD_DECL_EXPORTED, clang::serialization::UPD_DECL_MARKED_OPENMP_ALLOCATE, clang::serialization::UPD_DECL_MARKED_OPENMP_DECLARETARGET, clang::serialization::UPD_DECL_MARKED_OPENMP_THREADPRIVATE, and clang::serialization::UPD_DECL_MARKED_USED.
|
static |
Definition at line 2073 of file ASTWriter.cpp.
References clang::transformer::deref(), clang::Preprocessor::Diag(), clang::Preprocessor::getCounterValue(), clang::SourceManager::getFileID(), clang::Preprocessor::getIdentifierTable(), clang::MacroDirective::getLocation(), clang::MacroDirective::getMacroInfo(), clang::Preprocessor::getPreambleConditionalStack(), clang::Preprocessor::getPreambleSkipInfo(), clang::Preprocessor::getPredefinesFileID(), clang::Preprocessor::getPreprocessingRecord(), clang::Preprocessor::getSourceManager(), clang::Preprocessor::hasRecordedPreamble(), Id, clang::SourceLocation::isInvalid(), clang::Preprocessor::isRecordingPreamble(), clang::serialization::PP_CONDITIONAL_STACK, clang::serialization::PP_COUNTER_VALUE, clang::serialization::PREPROCESSOR_BLOCK_ID, and clang::Preprocessor::SawDateOrTime().
|
static |
Definition at line 5039 of file ASTWriter.cpp.
References clang::FixedPointSemantics::getScale(), clang::FixedPointSemantics::getWidth(), clang::FixedPointSemantics::hasUnsignedPadding(), clang::FixedPointSemantics::isSaturated(), clang::FixedPointSemantics::isSigned(), and clang::ASTRecordWriter::push_back().
Referenced by clang::ASTRecordWriter::AddAPValue().