#include "ASTCommon.h"
#include "ASTReaderInternals.h"
#include "MultiOnDiskHashTable.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTUnresolvedSet.h"
#include "clang/AST/AbstractTypeWriter.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/OpenACCClause.h"
#include "clang/AST/OpenMPClause.h"
#include "clang/AST/RawCommentList.h"
#include "clang/AST/TemplateName.h"
#include "clang/AST/Type.h"
#include "clang/AST/TypeLoc.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/OpenACCKinds.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/SemaCUDA.h"
#include "clang/Sema/SemaObjC.h"
#include "clang/Sema/Weak.h"
#include "clang/Serialization/ASTBitCodes.h"
#include "clang/Serialization/ASTReader.h"
#include "clang/Serialization/ASTRecordWriter.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/PointerIntPair.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/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/LEB128.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/OnDiskHashTable.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/SHA1.h"
#include "llvm/Support/TimeProfiler.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 <limits>
#include <memory>
#include <optional>
#include <queue>
#include <tuple>
#include <utility>
#include <vector>
usingnamespaceclang;
usingnamespaceclang::serialization;
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 std::string bytes(const std::vector<bool> &V) { … }
static TypeCode getTypeCodeForTypeClass(Type::TypeClass id) { … }
namespace {
std::optional<std::set<const FileEntry *>>
GetAffectingModuleMaps(const Preprocessor &PP, Module *RootModule) { … }
class ASTTypeWriter { … };
class TypeLocWriter : public TypeLocVisitor<TypeLocWriter> { … };
}
void TypeLocWriter::VisitQualifiedTypeLoc(QualifiedTypeLoc TL) { … }
void TypeLocWriter::VisitBuiltinTypeLoc(BuiltinTypeLoc TL) { … }
void TypeLocWriter::VisitComplexTypeLoc(ComplexTypeLoc TL) { … }
void TypeLocWriter::VisitPointerTypeLoc(PointerTypeLoc TL) { … }
void TypeLocWriter::VisitDecayedTypeLoc(DecayedTypeLoc TL) { … }
void TypeLocWriter::VisitAdjustedTypeLoc(AdjustedTypeLoc TL) { … }
void TypeLocWriter::VisitArrayParameterTypeLoc(ArrayParameterTypeLoc TL) { … }
void TypeLocWriter::VisitBlockPointerTypeLoc(BlockPointerTypeLoc TL) { … }
void TypeLocWriter::VisitLValueReferenceTypeLoc(LValueReferenceTypeLoc TL) { … }
void TypeLocWriter::VisitRValueReferenceTypeLoc(RValueReferenceTypeLoc TL) { … }
void TypeLocWriter::VisitMemberPointerTypeLoc(MemberPointerTypeLoc TL) { … }
void TypeLocWriter::VisitArrayTypeLoc(ArrayTypeLoc TL) { … }
void TypeLocWriter::VisitConstantArrayTypeLoc(ConstantArrayTypeLoc TL) { … }
void TypeLocWriter::VisitIncompleteArrayTypeLoc(IncompleteArrayTypeLoc TL) { … }
void TypeLocWriter::VisitVariableArrayTypeLoc(VariableArrayTypeLoc TL) { … }
void TypeLocWriter::VisitDependentSizedArrayTypeLoc(
DependentSizedArrayTypeLoc TL) { … }
void TypeLocWriter::VisitDependentAddressSpaceTypeLoc(
DependentAddressSpaceTypeLoc TL) { … }
void TypeLocWriter::VisitDependentSizedExtVectorTypeLoc(
DependentSizedExtVectorTypeLoc TL) { … }
void TypeLocWriter::VisitVectorTypeLoc(VectorTypeLoc TL) { … }
void TypeLocWriter::VisitDependentVectorTypeLoc(
DependentVectorTypeLoc TL) { … }
void TypeLocWriter::VisitExtVectorTypeLoc(ExtVectorTypeLoc TL) { … }
void TypeLocWriter::VisitConstantMatrixTypeLoc(ConstantMatrixTypeLoc TL) { … }
void TypeLocWriter::VisitDependentSizedMatrixTypeLoc(
DependentSizedMatrixTypeLoc TL) { … }
void TypeLocWriter::VisitFunctionTypeLoc(FunctionTypeLoc TL) { … }
void TypeLocWriter::VisitFunctionProtoTypeLoc(FunctionProtoTypeLoc TL) { … }
void TypeLocWriter::VisitFunctionNoProtoTypeLoc(FunctionNoProtoTypeLoc TL) { … }
void TypeLocWriter::VisitUnresolvedUsingTypeLoc(UnresolvedUsingTypeLoc TL) { … }
void TypeLocWriter::VisitUsingTypeLoc(UsingTypeLoc TL) { … }
void TypeLocWriter::VisitTypedefTypeLoc(TypedefTypeLoc TL) { … }
void TypeLocWriter::VisitObjCTypeParamTypeLoc(ObjCTypeParamTypeLoc TL) { … }
void TypeLocWriter::VisitTypeOfExprTypeLoc(TypeOfExprTypeLoc TL) { … }
void TypeLocWriter::VisitTypeOfTypeLoc(TypeOfTypeLoc TL) { … }
void TypeLocWriter::VisitDecltypeTypeLoc(DecltypeTypeLoc TL) { … }
void TypeLocWriter::VisitUnaryTransformTypeLoc(UnaryTransformTypeLoc TL) { … }
void ASTRecordWriter::AddConceptReference(const ConceptReference *CR) { … }
void TypeLocWriter::VisitPackIndexingTypeLoc(PackIndexingTypeLoc TL) { … }
void TypeLocWriter::VisitAutoTypeLoc(AutoTypeLoc TL) { … }
void TypeLocWriter::VisitDeducedTemplateSpecializationTypeLoc(
DeducedTemplateSpecializationTypeLoc TL) { … }
void TypeLocWriter::VisitRecordTypeLoc(RecordTypeLoc TL) { … }
void TypeLocWriter::VisitEnumTypeLoc(EnumTypeLoc TL) { … }
void TypeLocWriter::VisitAttributedTypeLoc(AttributedTypeLoc TL) { … }
void TypeLocWriter::VisitCountAttributedTypeLoc(CountAttributedTypeLoc TL) { … }
void TypeLocWriter::VisitBTFTagAttributedTypeLoc(BTFTagAttributedTypeLoc TL) { … }
void TypeLocWriter::VisitHLSLAttributedResourceTypeLoc(
HLSLAttributedResourceTypeLoc TL) { … }
void TypeLocWriter::VisitTemplateTypeParmTypeLoc(TemplateTypeParmTypeLoc TL) { … }
void TypeLocWriter::VisitSubstTemplateTypeParmTypeLoc(
SubstTemplateTypeParmTypeLoc TL) { … }
void TypeLocWriter::VisitSubstTemplateTypeParmPackTypeLoc(
SubstTemplateTypeParmPackTypeLoc TL) { … }
void TypeLocWriter::VisitTemplateSpecializationTypeLoc(
TemplateSpecializationTypeLoc TL) { … }
void TypeLocWriter::VisitParenTypeLoc(ParenTypeLoc TL) { … }
void TypeLocWriter::VisitMacroQualifiedTypeLoc(MacroQualifiedTypeLoc TL) { … }
void TypeLocWriter::VisitElaboratedTypeLoc(ElaboratedTypeLoc TL) { … }
void TypeLocWriter::VisitInjectedClassNameTypeLoc(InjectedClassNameTypeLoc TL) { … }
void TypeLocWriter::VisitDependentNameTypeLoc(DependentNameTypeLoc TL) { … }
void TypeLocWriter::VisitDependentTemplateSpecializationTypeLoc(
DependentTemplateSpecializationTypeLoc TL) { … }
void TypeLocWriter::VisitPackExpansionTypeLoc(PackExpansionTypeLoc TL) { … }
void TypeLocWriter::VisitObjCInterfaceTypeLoc(ObjCInterfaceTypeLoc TL) { … }
void TypeLocWriter::VisitObjCObjectTypeLoc(ObjCObjectTypeLoc TL) { … }
void TypeLocWriter::VisitObjCObjectPointerTypeLoc(ObjCObjectPointerTypeLoc TL) { … }
void TypeLocWriter::VisitAtomicTypeLoc(AtomicTypeLoc TL) { … }
void TypeLocWriter::VisitPipeTypeLoc(PipeTypeLoc TL) { … }
void TypeLocWriter::VisitBitIntTypeLoc(clang::BitIntTypeLoc TL) { … }
void TypeLocWriter::VisitDependentBitIntTypeLoc(
clang::DependentBitIntTypeLoc TL) { … }
void ASTWriter::WriteTypeAbbrevs() { … }
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) { … }
void ASTWriter::WriteBlockInfoBlock() { … }
static bool cleanPathForOutput(FileManager &FileMgr,
SmallVectorImpl<char> &Path) { … }
static const char *
adjustFilenameForRelocatableAST(const char *Filename, StringRef BaseDir) { … }
std::pair<ASTFileSignature, ASTFileSignature>
ASTWriter::createSignature() const { … }
ASTFileSignature ASTWriter::createSignatureForNamedModule() const { … }
static void BackpatchSignatureAt(llvm::BitstreamWriter &Stream,
const ASTFileSignature &S, uint64_t BitNo) { … }
ASTFileSignature ASTWriter::backpatchSignature() { … }
void ASTWriter::writeUnhashedControlBlock(Preprocessor &PP,
ASTContext &Context) { … }
void ASTWriter::WriteControlBlock(Preprocessor &PP, ASTContext &Context,
StringRef isysroot) { … }
namespace {
struct InputFileEntry { … };
}
SourceLocation ASTWriter::getAffectingIncludeLoc(const SourceManager &SourceMgr,
const SrcMgr::FileInfo &File) { … }
void ASTWriter::WriteInputFiles(SourceManager &SourceMgr,
HeaderSearchOptions &HSOpts) { … }
static unsigned CreateSLocFileAbbrev(llvm::BitstreamWriter &Stream) { … }
static unsigned CreateSLocBufferAbbrev(llvm::BitstreamWriter &Stream) { … }
static unsigned CreateSLocBufferBlobAbbrev(llvm::BitstreamWriter &Stream,
bool Compressed) { … }
static unsigned CreateSLocExpansionAbbrev(llvm::BitstreamWriter &Stream) { … }
static std::pair<unsigned, unsigned>
emitULEBKeyDataLength(unsigned KeyLen, unsigned DataLen, raw_ostream &Out) { … }
namespace {
class HeaderFileInfoTrait { … };
}
void ASTWriter::WriteHeaderSearch(const HeaderSearch &HS) { … }
static void emitBlob(llvm::BitstreamWriter &Stream, StringRef Blob,
unsigned SLocBufferBlobCompressedAbbrv,
unsigned SLocBufferBlobAbbrv) { … }
void ASTWriter::WriteSourceManagerBlock(SourceManager &SourceMgr,
const Preprocessor &PP) { … }
static bool shouldIgnoreMacro(MacroDirective *MD, bool IsModule,
const Preprocessor &PP) { … }
void ASTWriter::WritePreprocessor(const Preprocessor &PP, bool IsModule) { … }
void ASTWriter::WritePreprocessorDetail(PreprocessingRecord &PPRec,
uint64_t MacroOffsetsBase) { … }
unsigned ASTWriter::getLocalOrImportedSubmoduleID(const Module *Mod) { … }
unsigned ASTWriter::getSubmoduleID(Module *Mod) { … }
static unsigned getNumberOfModules(Module *Mod) { … }
void ASTWriter::WriteSubmodules(Module *WritingModule) { … }
void ASTWriter::WritePragmaDiagnosticMappings(const DiagnosticsEngine &Diag,
bool isModule) { … }
void ASTWriter::WriteType(QualType T) { … }
static bool IsInternalDeclFromFileContext(const Decl *D) { … }
uint64_t ASTWriter::WriteDeclContextLexicalBlock(ASTContext &Context,
const DeclContext *DC) { … }
void ASTWriter::WriteTypeDeclOffsets() { … }
void ASTWriter::WriteFileDeclIDsMap() { … }
void ASTWriter::WriteComments() { … }
namespace {
class ASTMethodPoolTrait { … };
}
void ASTWriter::WriteSelectors(Sema &SemaRef) { … }
void ASTWriter::WriteReferencedSelectorsPool(Sema &SemaRef) { … }
static NamedDecl *getDeclForLocalLookup(const LangOptions &LangOpts,
NamedDecl *D) { … }
namespace {
bool IsInterestingIdentifier(const IdentifierInfo *II, uint64_t MacroOffset,
bool IsModule, bool IsCPlusPlus) { … }
bool IsInterestingNonMacroIdentifier(const IdentifierInfo *II,
ASTWriter &Writer) { … }
class ASTIdentifierTableTrait { … };
}
static bool isLocalIdentifierID(IdentifierID ID) { … }
void ASTWriter::WriteIdentifierTable(Preprocessor &PP,
IdentifierResolver &IdResolver,
bool IsModule) { … }
void ASTWriter::handleVTable(CXXRecordDecl *RD) { … }
namespace {
class ASTDeclContextNameLookupTrait { … };
}
bool ASTWriter::isLookupResultExternal(StoredDeclsList &Result,
DeclContext *DC) { … }
static bool isLookupResultNotInteresting(ASTWriter &Writer,
StoredDeclsList &Result) { … }
void
ASTWriter::GenerateNameLookupTable(const DeclContext *ConstDC,
llvm::SmallVectorImpl<char> &LookupTable) { … }
uint64_t ASTWriter::WriteDeclContextVisibleBlock(ASTContext &Context,
DeclContext *DC) { … }
void ASTWriter::WriteDeclContextVisibleUpdate(const DeclContext *DC) { … }
void ASTWriter::WriteFPPragmaOptions(const FPOptionsOverride &Opts) { … }
void ASTWriter::WriteOpenCLExtensions(Sema &SemaRef) { … }
void ASTWriter::WriteCUDAPragmas(Sema &SemaRef) { … }
void ASTWriter::WriteObjCCategories() { … }
void ASTWriter::WriteLateParsedTemplates(Sema &SemaRef) { … }
void ASTWriter::WriteOptimizePragmaOptions(Sema &SemaRef) { … }
void ASTWriter::WriteMSStructPragmaOptions(Sema &SemaRef) { … }
void ASTWriter::WriteMSPointersToMembersPragmaOptions(Sema &SemaRef) { … }
void ASTWriter::WritePackPragmaOptions(Sema &SemaRef) { … }
void ASTWriter::WriteFloatControlPragmaOptions(Sema &SemaRef) { … }
void ASTWriter::WriteDeclsWithEffectsToVerify(Sema &SemaRef) { … }
void ASTWriter::WriteModuleFileExtension(Sema &SemaRef,
ModuleFileExtensionWriter &Writer) { … }
void ASTRecordWriter::AddAttr(const Attr *A) { … }
void ASTRecordWriter::AddAttributes(ArrayRef<const Attr *> Attrs) { … }
void ASTWriter::AddToken(const Token &Tok, RecordDataImpl &Record) { … }
void ASTWriter::AddString(StringRef Str, RecordDataImpl &Record) { … }
bool ASTWriter::PreparePathForOutput(SmallVectorImpl<char> &Path) { … }
void ASTWriter::AddPath(StringRef Path, RecordDataImpl &Record) { … }
void ASTWriter::EmitRecordWithPath(unsigned Abbrev, RecordDataRef Record,
StringRef Path) { … }
void ASTWriter::AddVersionTuple(const VersionTuple &Version,
RecordDataImpl &Record) { … }
void ASTWriter::SetIdentifierOffset(const IdentifierInfo *II, uint32_t Offset) { … }
void ASTWriter::SetSelectorOffset(Selector Sel, uint32_t Offset) { … }
ASTWriter::ASTWriter(llvm::BitstreamWriter &Stream,
SmallVectorImpl<char> &Buffer,
InMemoryModuleCache &ModuleCache,
ArrayRef<std::shared_ptr<ModuleFileExtension>> Extensions,
bool IncludeTimestamps, bool BuildingImplicitModule,
bool GeneratingReducedBMI)
: … { … }
ASTWriter::~ASTWriter() = default;
const LangOptions &ASTWriter::getLangOpts() const { … }
time_t ASTWriter::getTimestampForOutput(const FileEntry *E) const { … }
ASTFileSignature ASTWriter::WriteAST(Sema &SemaRef, StringRef OutputFile,
Module *WritingModule, StringRef isysroot,
bool ShouldCacheASTInMemory) { … }
template<typename Vector>
static void AddLazyVectorDecls(ASTWriter &Writer, Vector &Vec) { … }
template <typename Vector>
static void AddLazyVectorEmiitedDecls(ASTWriter &Writer, Vector &Vec,
ASTWriter::RecordData &Record) { … }
void ASTWriter::computeNonAffectingInputFiles() { … }
void ASTWriter::PrepareWritingSpecialDecls(Sema &SemaRef) { … }
void ASTWriter::WriteSpecialDeclRecords(Sema &SemaRef) { … }
ASTFileSignature ASTWriter::WriteASTCore(Sema &SemaRef, StringRef isysroot,
Module *WritingModule) { … }
void ASTWriter::EnteringModulePurview() { … }
void ASTWriter::AddedManglingNumber(const Decl *D, unsigned Number) { … }
void ASTWriter::AddedStaticLocalNumbers(const Decl *D, unsigned Number) { … }
void ASTWriter::AddedAnonymousNamespace(const TranslationUnitDecl *TU,
NamespaceDecl *AnonNamespace) { … }
void ASTWriter::WriteDeclAndTypes(ASTContext &Context) { … }
void ASTWriter::WriteDeclUpdatesBlocks(RecordDataImpl &OffsetsRecord) { … }
void ASTWriter::AddAlignPackInfo(const Sema::AlignPackInfo &Info,
RecordDataImpl &Record) { … }
FileID ASTWriter::getAdjustedFileID(FileID FID) const { … }
unsigned ASTWriter::getAdjustedNumCreatedFIDs(FileID FID) const { … }
SourceLocation ASTWriter::getAdjustedLocation(SourceLocation Loc) const { … }
SourceRange ASTWriter::getAdjustedRange(SourceRange Range) const { … }
SourceLocation::UIntTy
ASTWriter::getAdjustedOffset(SourceLocation::UIntTy Offset) const { … }
SourceLocation::UIntTy
ASTWriter::getAdjustment(SourceLocation::UIntTy Offset) const { … }
void ASTWriter::AddFileID(FileID FID, RecordDataImpl &Record) { … }
SourceLocationEncoding::RawLocEncoding
ASTWriter::getRawSourceLocationEncoding(SourceLocation Loc, LocSeq *Seq) { … }
void ASTWriter::AddSourceLocation(SourceLocation Loc, RecordDataImpl &Record,
SourceLocationSequence *Seq) { … }
void ASTWriter::AddSourceRange(SourceRange Range, RecordDataImpl &Record,
SourceLocationSequence *Seq) { … }
void ASTRecordWriter::AddAPFloat(const llvm::APFloat &Value) { … }
void ASTWriter::AddIdentifierRef(const IdentifierInfo *II, RecordDataImpl &Record) { … }
IdentifierID ASTWriter::getIdentifierRef(const IdentifierInfo *II) { … }
MacroID ASTWriter::getMacroRef(MacroInfo *MI, const IdentifierInfo *Name) { … }
MacroID ASTWriter::getMacroID(MacroInfo *MI) { … }
uint32_t ASTWriter::getMacroDirectivesOffset(const IdentifierInfo *Name) { … }
void ASTRecordWriter::AddSelectorRef(const Selector SelRef) { … }
SelectorID ASTWriter::getSelectorRef(Selector Sel) { … }
void ASTRecordWriter::AddCXXTemporary(const CXXTemporary *Temp) { … }
void ASTRecordWriter::AddTemplateArgumentLocInfo(
TemplateArgument::ArgKind Kind, const TemplateArgumentLocInfo &Arg) { … }
void ASTRecordWriter::AddTemplateArgumentLoc(const TemplateArgumentLoc &Arg) { … }
void ASTRecordWriter::AddTypeSourceInfo(TypeSourceInfo *TInfo) { … }
void ASTRecordWriter::AddTypeLoc(TypeLoc TL, LocSeq *OuterSeq) { … }
void ASTWriter::AddTypeRef(QualType T, RecordDataImpl &Record) { … }
template <typename IdxForTypeTy>
static TypeID MakeTypeID(ASTContext &Context, QualType T,
IdxForTypeTy IdxForType) { … }
TypeID ASTWriter::GetOrCreateTypeID(QualType T) { … }
void ASTWriter::AddEmittedDeclRef(const Decl *D, RecordDataImpl &Record) { … }
void ASTWriter::AddDeclRef(const Decl *D, RecordDataImpl &Record) { … }
LocalDeclID ASTWriter::GetDeclRef(const Decl *D) { … }
LocalDeclID ASTWriter::getDeclID(const Decl *D) { … }
bool ASTWriter::wasDeclEmitted(const Decl *D) const { … }
void ASTWriter::associateDeclWithFile(const Decl *D, LocalDeclID ID) { … }
unsigned ASTWriter::getAnonymousDeclarationNumber(const NamedDecl *D) { … }
void ASTRecordWriter::AddDeclarationNameLoc(const DeclarationNameLoc &DNLoc,
DeclarationName Name) { … }
void ASTRecordWriter::AddDeclarationNameInfo(
const DeclarationNameInfo &NameInfo) { … }
void ASTRecordWriter::AddQualifierInfo(const QualifierInfo &Info) { … }
void ASTRecordWriter::AddNestedNameSpecifierLoc(NestedNameSpecifierLoc NNS) { … }
void ASTRecordWriter::AddTemplateParameterList(
const TemplateParameterList *TemplateParams) { … }
void ASTRecordWriter::AddTemplateArgumentList(
const TemplateArgumentList *TemplateArgs) { … }
void ASTRecordWriter::AddASTTemplateArgumentListInfo(
const ASTTemplateArgumentListInfo *ASTTemplArgList) { … }
void ASTRecordWriter::AddUnresolvedSet(const ASTUnresolvedSet &Set) { … }
void ASTRecordWriter::AddCXXBaseSpecifier(const CXXBaseSpecifier &Base) { … }
static uint64_t EmitCXXBaseSpecifiers(ASTWriter &W,
ArrayRef<CXXBaseSpecifier> Bases) { … }
void ASTRecordWriter::AddCXXBaseSpecifiers(ArrayRef<CXXBaseSpecifier> Bases) { … }
static uint64_t
EmitCXXCtorInitializers(ASTWriter &W,
ArrayRef<CXXCtorInitializer *> CtorInits) { … }
void ASTRecordWriter::AddCXXCtorInitializers(
ArrayRef<CXXCtorInitializer *> CtorInits) { … }
void ASTRecordWriter::AddCXXDefinitionData(const CXXRecordDecl *D) { … }
void ASTRecordWriter::AddVarDeclInit(const VarDecl *VD) { … }
void ASTWriter::ReaderInitialized(ASTReader *Reader) { … }
void ASTWriter::IdentifierRead(IdentifierID ID, IdentifierInfo *II) { … }
void ASTWriter::MacroRead(serialization::MacroID ID, MacroInfo *MI) { … }
void ASTWriter::TypeRead(TypeIdx Idx, QualType T) { … }
void ASTWriter::PredefinedDeclBuilt(PredefinedDeclIDs ID, const Decl *D) { … }
void ASTWriter::SelectorRead(SelectorID ID, Selector S) { … }
void ASTWriter::MacroDefinitionRead(serialization::PreprocessedEntityID ID,
MacroDefinitionRecord *MD) { … }
void ASTWriter::ModuleRead(serialization::SubmoduleID ID, Module *Mod) { … }
void ASTWriter::CompletedTagDefinition(const TagDecl *D) { … }
static bool isImportedDeclContext(ASTReader *Chain, const Decl *D) { … }
void ASTWriter::AddedVisibleDecl(const DeclContext *DC, const Decl *D) { … }
void ASTWriter::AddedCXXImplicitMember(const CXXRecordDecl *RD, const Decl *D) { … }
void ASTWriter::ResolvedExceptionSpec(const FunctionDecl *FD) { … }
void ASTWriter::DeducedReturnType(const FunctionDecl *FD, QualType ReturnType) { … }
void ASTWriter::ResolvedOperatorDelete(const CXXDestructorDecl *DD,
const FunctionDecl *Delete,
Expr *ThisArg) { … }
void ASTWriter::CompletedImplicitDefinition(const FunctionDecl *D) { … }
void ASTWriter::VariableDefinitionInstantiated(const VarDecl *D) { … }
void ASTWriter::FunctionDefinitionInstantiated(const FunctionDecl *D) { … }
void ASTWriter::InstantiationRequested(const ValueDecl *D) { … }
void ASTWriter::DefaultArgumentInstantiated(const ParmVarDecl *D) { … }
void ASTWriter::DefaultMemberInitializerInstantiated(const FieldDecl *D) { … }
void ASTWriter::AddedObjCCategoryToInterface(const ObjCCategoryDecl *CatD,
const ObjCInterfaceDecl *IFD) { … }
void ASTWriter::DeclarationMarkedUsed(const Decl *D) { … }
void ASTWriter::DeclarationMarkedOpenMPThreadPrivate(const Decl *D) { … }
void ASTWriter::DeclarationMarkedOpenMPAllocate(const Decl *D, const Attr *A) { … }
void ASTWriter::DeclarationMarkedOpenMPDeclareTarget(const Decl *D,
const Attr *Attr) { … }
void ASTWriter::RedefinedHiddenDefinition(const NamedDecl *D, Module *M) { … }
void ASTWriter::AddedAttributeToRecord(const Attr *Attr,
const RecordDecl *Record) { … }
void ASTWriter::AddedCXXTemplateSpecialization(
const ClassTemplateDecl *TD, const ClassTemplateSpecializationDecl *D) { … }
void ASTWriter::AddedCXXTemplateSpecialization(
const VarTemplateDecl *TD, const VarTemplateSpecializationDecl *D) { … }
void ASTWriter::AddedCXXTemplateSpecialization(const FunctionTemplateDecl *TD,
const FunctionDecl *D) { … }
namespace {
class OMPClauseWriter : public OMPClauseVisitor<OMPClauseWriter> { … };
}
void ASTRecordWriter::writeOMPClause(OMPClause *C) { … }
void OMPClauseWriter::writeClause(OMPClause *C) { … }
void OMPClauseWriter::VisitOMPClauseWithPreInit(OMPClauseWithPreInit *C) { … }
void OMPClauseWriter::VisitOMPClauseWithPostUpdate(OMPClauseWithPostUpdate *C) { … }
void OMPClauseWriter::VisitOMPIfClause(OMPIfClause *C) { … }
void OMPClauseWriter::VisitOMPFinalClause(OMPFinalClause *C) { … }
void OMPClauseWriter::VisitOMPNumThreadsClause(OMPNumThreadsClause *C) { … }
void OMPClauseWriter::VisitOMPSafelenClause(OMPSafelenClause *C) { … }
void OMPClauseWriter::VisitOMPSimdlenClause(OMPSimdlenClause *C) { … }
void OMPClauseWriter::VisitOMPSizesClause(OMPSizesClause *C) { … }
void OMPClauseWriter::VisitOMPFullClause(OMPFullClause *C) { … }
void OMPClauseWriter::VisitOMPPartialClause(OMPPartialClause *C) { … }
void OMPClauseWriter::VisitOMPAllocatorClause(OMPAllocatorClause *C) { … }
void OMPClauseWriter::VisitOMPCollapseClause(OMPCollapseClause *C) { … }
void OMPClauseWriter::VisitOMPDetachClause(OMPDetachClause *C) { … }
void OMPClauseWriter::VisitOMPDefaultClause(OMPDefaultClause *C) { … }
void OMPClauseWriter::VisitOMPProcBindClause(OMPProcBindClause *C) { … }
void OMPClauseWriter::VisitOMPScheduleClause(OMPScheduleClause *C) { … }
void OMPClauseWriter::VisitOMPOrderedClause(OMPOrderedClause *C) { … }
void OMPClauseWriter::VisitOMPNowaitClause(OMPNowaitClause *) { … }
void OMPClauseWriter::VisitOMPUntiedClause(OMPUntiedClause *) { … }
void OMPClauseWriter::VisitOMPMergeableClause(OMPMergeableClause *) { … }
void OMPClauseWriter::VisitOMPReadClause(OMPReadClause *) { … }
void OMPClauseWriter::VisitOMPWriteClause(OMPWriteClause *) { … }
void OMPClauseWriter::VisitOMPUpdateClause(OMPUpdateClause *C) { … }
void OMPClauseWriter::VisitOMPCaptureClause(OMPCaptureClause *) { … }
void OMPClauseWriter::VisitOMPCompareClause(OMPCompareClause *) { … }
void OMPClauseWriter::VisitOMPFailClause(OMPFailClause *C) { … }
void OMPClauseWriter::VisitOMPSeqCstClause(OMPSeqCstClause *) { … }
void OMPClauseWriter::VisitOMPAcqRelClause(OMPAcqRelClause *) { … }
void OMPClauseWriter::VisitOMPAbsentClause(OMPAbsentClause *C) { … }
void OMPClauseWriter::VisitOMPHoldsClause(OMPHoldsClause *C) { … }
void OMPClauseWriter::VisitOMPContainsClause(OMPContainsClause *C) { … }
void OMPClauseWriter::VisitOMPNoOpenMPClause(OMPNoOpenMPClause *) { … }
void OMPClauseWriter::VisitOMPNoOpenMPRoutinesClause(
OMPNoOpenMPRoutinesClause *) { … }
void OMPClauseWriter::VisitOMPNoParallelismClause(OMPNoParallelismClause *) { … }
void OMPClauseWriter::VisitOMPAcquireClause(OMPAcquireClause *) { … }
void OMPClauseWriter::VisitOMPReleaseClause(OMPReleaseClause *) { … }
void OMPClauseWriter::VisitOMPRelaxedClause(OMPRelaxedClause *) { … }
void OMPClauseWriter::VisitOMPWeakClause(OMPWeakClause *) { … }
void OMPClauseWriter::VisitOMPThreadsClause(OMPThreadsClause *) { … }
void OMPClauseWriter::VisitOMPSIMDClause(OMPSIMDClause *) { … }
void OMPClauseWriter::VisitOMPNogroupClause(OMPNogroupClause *) { … }
void OMPClauseWriter::VisitOMPInitClause(OMPInitClause *C) { … }
void OMPClauseWriter::VisitOMPUseClause(OMPUseClause *C) { … }
void OMPClauseWriter::VisitOMPDestroyClause(OMPDestroyClause *C) { … }
void OMPClauseWriter::VisitOMPNovariantsClause(OMPNovariantsClause *C) { … }
void OMPClauseWriter::VisitOMPNocontextClause(OMPNocontextClause *C) { … }
void OMPClauseWriter::VisitOMPFilterClause(OMPFilterClause *C) { … }
void OMPClauseWriter::VisitOMPAlignClause(OMPAlignClause *C) { … }
void OMPClauseWriter::VisitOMPPrivateClause(OMPPrivateClause *C) { … }
void OMPClauseWriter::VisitOMPFirstprivateClause(OMPFirstprivateClause *C) { … }
void OMPClauseWriter::VisitOMPLastprivateClause(OMPLastprivateClause *C) { … }
void OMPClauseWriter::VisitOMPSharedClause(OMPSharedClause *C) { … }
void OMPClauseWriter::VisitOMPReductionClause(OMPReductionClause *C) { … }
void OMPClauseWriter::VisitOMPTaskReductionClause(OMPTaskReductionClause *C) { … }
void OMPClauseWriter::VisitOMPInReductionClause(OMPInReductionClause *C) { … }
void OMPClauseWriter::VisitOMPLinearClause(OMPLinearClause *C) { … }
void OMPClauseWriter::VisitOMPAlignedClause(OMPAlignedClause *C) { … }
void OMPClauseWriter::VisitOMPCopyinClause(OMPCopyinClause *C) { … }
void OMPClauseWriter::VisitOMPCopyprivateClause(OMPCopyprivateClause *C) { … }
void OMPClauseWriter::VisitOMPFlushClause(OMPFlushClause *C) { … }
void OMPClauseWriter::VisitOMPDepobjClause(OMPDepobjClause *C) { … }
void OMPClauseWriter::VisitOMPDependClause(OMPDependClause *C) { … }
void OMPClauseWriter::VisitOMPDeviceClause(OMPDeviceClause *C) { … }
void OMPClauseWriter::VisitOMPMapClause(OMPMapClause *C) { … }
void OMPClauseWriter::VisitOMPAllocateClause(OMPAllocateClause *C) { … }
void OMPClauseWriter::VisitOMPNumTeamsClause(OMPNumTeamsClause *C) { … }
void OMPClauseWriter::VisitOMPThreadLimitClause(OMPThreadLimitClause *C) { … }
void OMPClauseWriter::VisitOMPPriorityClause(OMPPriorityClause *C) { … }
void OMPClauseWriter::VisitOMPGrainsizeClause(OMPGrainsizeClause *C) { … }
void OMPClauseWriter::VisitOMPNumTasksClause(OMPNumTasksClause *C) { … }
void OMPClauseWriter::VisitOMPHintClause(OMPHintClause *C) { … }
void OMPClauseWriter::VisitOMPDistScheduleClause(OMPDistScheduleClause *C) { … }
void OMPClauseWriter::VisitOMPDefaultmapClause(OMPDefaultmapClause *C) { … }
void OMPClauseWriter::VisitOMPToClause(OMPToClause *C) { … }
void OMPClauseWriter::VisitOMPFromClause(OMPFromClause *C) { … }
void OMPClauseWriter::VisitOMPUseDevicePtrClause(OMPUseDevicePtrClause *C) { … }
void OMPClauseWriter::VisitOMPUseDeviceAddrClause(OMPUseDeviceAddrClause *C) { … }
void OMPClauseWriter::VisitOMPIsDevicePtrClause(OMPIsDevicePtrClause *C) { … }
void OMPClauseWriter::VisitOMPHasDeviceAddrClause(OMPHasDeviceAddrClause *C) { … }
void OMPClauseWriter::VisitOMPUnifiedAddressClause(OMPUnifiedAddressClause *) { … }
void OMPClauseWriter::VisitOMPUnifiedSharedMemoryClause(
OMPUnifiedSharedMemoryClause *) { … }
void OMPClauseWriter::VisitOMPReverseOffloadClause(OMPReverseOffloadClause *) { … }
void
OMPClauseWriter::VisitOMPDynamicAllocatorsClause(OMPDynamicAllocatorsClause *) { … }
void OMPClauseWriter::VisitOMPAtomicDefaultMemOrderClause(
OMPAtomicDefaultMemOrderClause *C) { … }
void OMPClauseWriter::VisitOMPAtClause(OMPAtClause *C) { … }
void OMPClauseWriter::VisitOMPSeverityClause(OMPSeverityClause *C) { … }
void OMPClauseWriter::VisitOMPMessageClause(OMPMessageClause *C) { … }
void OMPClauseWriter::VisitOMPNontemporalClause(OMPNontemporalClause *C) { … }
void OMPClauseWriter::VisitOMPInclusiveClause(OMPInclusiveClause *C) { … }
void OMPClauseWriter::VisitOMPExclusiveClause(OMPExclusiveClause *C) { … }
void OMPClauseWriter::VisitOMPOrderClause(OMPOrderClause *C) { … }
void OMPClauseWriter::VisitOMPUsesAllocatorsClause(OMPUsesAllocatorsClause *C) { … }
void OMPClauseWriter::VisitOMPAffinityClause(OMPAffinityClause *C) { … }
void OMPClauseWriter::VisitOMPBindClause(OMPBindClause *C) { … }
void OMPClauseWriter::VisitOMPXDynCGroupMemClause(OMPXDynCGroupMemClause *C) { … }
void OMPClauseWriter::VisitOMPDoacrossClause(OMPDoacrossClause *C) { … }
void OMPClauseWriter::VisitOMPXAttributeClause(OMPXAttributeClause *C) { … }
void OMPClauseWriter::VisitOMPXBareClause(OMPXBareClause *C) { … }
void ASTRecordWriter::writeOMPTraitInfo(const OMPTraitInfo *TI) { … }
void ASTRecordWriter::writeOMPChildren(OMPChildren *Data) { … }
void ASTRecordWriter::writeOpenACCVarList(const OpenACCClauseWithVarList *C) { … }
void ASTRecordWriter::writeOpenACCIntExprList(ArrayRef<Expr *> Exprs) { … }
void ASTRecordWriter::writeOpenACCClause(const OpenACCClause *C) { … }
void ASTRecordWriter::writeOpenACCClauseList(
ArrayRef<const OpenACCClause *> Clauses) { … }