|
clang 24.0.0git
|
Writes an AST file containing the contents of a translation unit. More...
#include "clang/Serialization/ASTWriter.h"
Public Types | |
| using | RecordData = SmallVector<uint64_t, 64> |
| using | RecordDataImpl = SmallVectorImpl<uint64_t> |
| using | RecordDataRef = ArrayRef<uint64_t> |
Public Member Functions | |
| ASTWriter (llvm::BitstreamWriter &Stream, SmallVectorImpl< char > &Buffer, ModuleCache &ModCache, const CodeGenOptions &CodeGenOpts, ArrayRef< std::shared_ptr< ModuleFileExtension > > Extensions, bool IncludeTimestamps=true, bool BuildingImplicitModule=false, bool GeneratingReducedBMI=false) | |
| Create a new precompiled header writer that outputs to the given bitstream. | |
| ~ASTWriter () override | |
| const LangOptions & | getLangOpts () const |
| const CodeGenOptions & | getCodeGenOpts () const |
| time_t | getTimestampForOutput (time_t ModTime) const |
| Get a timestamp for output into the AST file. | |
| ASTFileSignature | WriteAST (llvm::PointerUnion< Sema *, Preprocessor * > Subject, StringRef OutputFile, Module *WritingModule, StringRef isysroot) |
Write a precompiled header or a module with the AST produced by the Sema object, or a dependency scanner module with the preprocessor state produced by the Preprocessor object. | |
| void | AddToken (const Token &Tok, RecordDataImpl &Record) |
| Emit a token. | |
| void | AddAlignPackInfo (const Sema::AlignPackInfo &Info, RecordDataImpl &Record) |
| Emit a AlignPackInfo. | |
| void | AddFileID (FileID FID, RecordDataImpl &Record) |
| Emit a FileID. | |
| SourceLocation::UIntTy | getEntryOffset (const SrcMgr::SLocEntry &SLoc) const |
The starting offset of SLoc's entry within this module, with the dummy entry skipped. | |
| SourceLocationEncoding::Chain | EmitEntryOffset (const SrcMgr::SLocEntry &SLoc, RecordDataImpl &Record) |
Emit SLoc's entry offset as the record's first field and return a chain anchored at that entry, for delta encoding the locations that follow. | |
| void | AddSourceLocation (SourceLocation Loc, RecordDataImpl &Record) |
| Emit a source location. | |
| void | AddSourceLocation (SourceLocation Loc, RecordDataImpl &Record, SourceLocationEncoding::Chain &Chain) |
Emit a source location, delta encoded against Chain. | |
| SourceLocationEncoding::RawLocEncoding | getRawSourceLocationEncoding (SourceLocation Loc) |
| Return the raw encodings for source locations. | |
| void | AddSourceRange (SourceRange Range, RecordDataImpl &Record) |
| Emit a source range. | |
| void | AddIdentifierRef (const IdentifierInfo *II, RecordDataImpl &Record) |
| Emit a reference to an identifier. | |
| serialization::SelectorID | getSelectorRef (Selector Sel) |
| Get the unique number used to refer to the given selector. | |
| serialization::IdentifierID | getIdentifierRef (const IdentifierInfo *II) |
| Get the unique number used to refer to the given identifier. | |
| serialization::MacroID | getMacroRef (MacroInfo *MI, const IdentifierInfo *Name) |
| Get the unique number used to refer to the given macro. | |
| uint32_t | getMacroDirectivesOffset (const IdentifierInfo *Name) |
| void | AddTypeRef (ASTContext &Context, QualType T, RecordDataImpl &Record) |
| Emit a reference to a type. | |
| serialization::TypeID | GetOrCreateTypeID (ASTContext &Context, QualType T) |
| Force a type to be emitted and get its ID. | |
| const Decl * | getFirstLocalDecl (const Decl *D) |
| Find the first local declaration of a given local redeclarable decl. | |
| bool | IsLocalDecl (const Decl *D) const |
| Is this a local declaration (that is, one that will be written to our AST file)? | |
| llvm::MapVector< serialization::ModuleFile *, const Decl * > | CollectFirstDeclFromEachModule (const Decl *D, bool IncludeLocal) |
| Collect the first declaration from each module file that provides a declaration of D. | |
| void | AddLookupOffsets (const LookupBlockOffsets &Offsets, RecordDataImpl &Record) |
| void | AddMacroRef (MacroInfo *MI, const IdentifierInfo *Name, RecordDataImpl &Record) |
| Emit a reference to a macro. | |
| void | AddDeclRef (const Decl *D, RecordDataImpl &Record) |
| Emit a reference to a declaration. | |
| void | AddEmittedDeclRef (const Decl *D, RecordDataImpl &Record) |
| LocalDeclID | GetDeclRef (const Decl *D) |
| Force a declaration to be emitted and get its local ID to the module file been writing. | |
| LocalDeclID | getDeclID (const Decl *D) |
| Determine the local declaration ID of an already-emitted declaration. | |
| bool | wasDeclEmitted (const Decl *D) const |
| Whether or not the declaration got emitted. | |
| unsigned | getAnonymousDeclarationNumber (const NamedDecl *D) |
| void | AddString (StringRef Str, RecordDataImpl &Record) |
| Add a string to the given record. | |
| void | AddStringBlob (StringRef Str, RecordDataImpl &Record, SmallVectorImpl< char > &Blob) |
| bool | PreparePathForOutput (SmallVectorImpl< char > &Path) |
| Convert a path from this build process into one that is appropriate for emission in the module file. | |
| void | AddPath (StringRef Path, RecordDataImpl &Record) |
| Add a path to the given record. | |
| void | AddPathBlob (StringRef Str, RecordDataImpl &Record, SmallVectorImpl< char > &Blob) |
| void | EmitRecordWithPath (unsigned Abbrev, RecordDataRef Record, StringRef Path) |
| Emit the current record with the given path as a blob. | |
| void | AddVersionTuple (const VersionTuple &Version, RecordDataImpl &Record) |
| Add a version tuple to the given record. | |
| unsigned | getLocalOrImportedSubmoduleID (const Module *Mod) |
| Retrieve or create a submodule ID for this module, or return 0 if the submodule is neither local (a submodle of the currently-written module) nor from an imported module. | |
| void | SetIdentifierOffset (const IdentifierInfo *II, uint32_t Offset) |
| Note that the identifier II occurs at the given offset within the identifier table. | |
| void | SetSelectorOffset (Selector Sel, uint32_t Offset) |
| Note that the selector Sel occurs at the given offset within the method pool/selector table. | |
| unsigned | RecordSwitchCaseID (SwitchCase *S) |
| Record an ID for the given switch-case statement. | |
| unsigned | getSwitchCaseID (SwitchCase *S) |
| Retrieve the ID for the given switch-case statement. | |
| void | ClearSwitchCaseIDs () |
| unsigned | getTypeExtQualAbbrev () const |
| unsigned | getDeclParmVarAbbrev () const |
| unsigned | getDeclRecordAbbrev () const |
| unsigned | getDeclTypedefAbbrev () const |
| unsigned | getDeclVarAbbrev () const |
| unsigned | getDeclFieldAbbrev () const |
| unsigned | getDeclEnumAbbrev () const |
| unsigned | getDeclObjCIvarAbbrev () const |
| unsigned | getDeclCXXMethodAbbrev (FunctionDecl::TemplatedKind Kind) const |
| unsigned | getDeclTemplateTypeParmAbbrev () const |
| unsigned | getDeclUsingShadowAbbrev () const |
| unsigned | getDeclRefExprAbbrev () const |
| unsigned | getCharacterLiteralAbbrev () const |
| unsigned | getIntegerLiteralAbbrev () const |
| unsigned | getExprImplicitCastAbbrev () const |
| unsigned | getBinaryOperatorAbbrev () const |
| unsigned | getCompoundAssignOperatorAbbrev () const |
| unsigned | getCallExprAbbrev () const |
| unsigned | getCXXOperatorCallExprAbbrev () |
| unsigned | getCXXMemberCallExprAbbrev () |
| unsigned | getCompoundStmtAbbrev () const |
| bool | hasChain () const |
| ASTReader * | getChain () const |
| bool | isWritingModule () const |
| bool | isWritingStdCXXNamedModules () const |
| bool | isWritingStdCXXHeaderUnit () const |
| bool | isGeneratingReducedBMI () const |
| bool | getDoneWritingDeclsAndTypes () const |
| bool | isDeclPredefined (const Decl *D) const |
| void | handleVTable (CXXRecordDecl *RD) |
| void | addTouchedModuleFile (serialization::ModuleFile *) |
| Public Member Functions inherited from clang::ASTDeserializationListener | |
| virtual | ~ASTDeserializationListener () |
| virtual void | DeclRead (GlobalDeclID ID, const Decl *D) |
| A decl was deserialized from the AST file. | |
| virtual void | ModuleImportRead (serialization::SubmoduleID ID, SourceLocation ImportLoc) |
| A module import was read from the AST file. | |
| Public Member Functions inherited from clang::ASTMutationListener | |
| virtual | ~ASTMutationListener () |
| virtual void | DeclarationMarkedOpenMPGroupPrivate (const Decl *D) |
| A declaration is marked as OpenMP groupprivate which was not previously marked as groupprivate. | |
Static Public Member Functions | |
| static SourceLocationEncoding::Chain | EmitSourceLocationOffset (SourceLocation::UIntTy Offset, SourceLocation::UIntTy InitialDelta, RecordDataImpl &Record) |
Emit Offset as the next record field and return a chain anchored at Offset + InitialDelta, for delta encoding the locations that follow. | |
Friends | |
| class | ASTDeclWriter |
| class | ASTRecordWriter |
Writes an AST file containing the contents of a translation unit.
The ASTWriter class produces a bitstream containing the serialized representation of a given abstract syntax tree and its supporting data structures. This bitstream can be de-serialized via an instance of the ASTReader class.
Definition at line 97 of file ASTWriter.h.
| using clang::ASTWriter::RecordData = SmallVector<uint64_t, 64> |
Definition at line 103 of file ASTWriter.h.
| using clang::ASTWriter::RecordDataImpl = SmallVectorImpl<uint64_t> |
Definition at line 104 of file ASTWriter.h.
| using clang::ASTWriter::RecordDataRef = ArrayRef<uint64_t> |
Definition at line 105 of file ASTWriter.h.
| ASTWriter::ASTWriter | ( | llvm::BitstreamWriter & | Stream, |
| SmallVectorImpl< char > & | Buffer, | ||
| ModuleCache & | ModCache, | ||
| const CodeGenOptions & | CodeGenOpts, | ||
| ArrayRef< std::shared_ptr< ModuleFileExtension > > | Extensions, | ||
| bool | IncludeTimestamps = true, | ||
| bool | BuildingImplicitModule = false, | ||
| bool | GeneratingReducedBMI = false ) |
Create a new precompiled header writer that outputs to the given bitstream.
Definition at line 5538 of file ASTWriter.cpp.
|
overridedefault |
| void ASTWriter::AddAlignPackInfo | ( | const Sema::AlignPackInfo & | Info, |
| RecordDataImpl & | Record ) |
Emit a AlignPackInfo.
Definition at line 6816 of file ASTWriter.cpp.
References clang::Sema::AlignPackInfo::getRawEncoding().
| void ASTWriter::AddDeclRef | ( | const Decl * | D, |
| RecordDataImpl & | Record ) |
Emit a reference to a declaration.
Definition at line 7166 of file ASTWriter.cpp.
References GetDeclRef().
Referenced by AddEmittedDeclRef().
| void ASTWriter::AddEmittedDeclRef | ( | const Decl * | D, |
| RecordDataImpl & | Record ) |
Definition at line 7159 of file ASTWriter.cpp.
References AddDeclRef(), and wasDeclEmitted().
Referenced by AddLazyVectorEmiitedDecls().
| void ASTWriter::AddFileID | ( | FileID | FID, |
| RecordDataImpl & | Record ) |
Emit a FileID.
Definition at line 6884 of file ASTWriter.cpp.
| void ASTWriter::AddIdentifierRef | ( | const IdentifierInfo * | II, |
| RecordDataImpl & | Record ) |
Emit a reference to an identifier.
Definition at line 6960 of file ASTWriter.cpp.
References getIdentifierRef().
Referenced by AddToken().
| void ASTWriter::AddLookupOffsets | ( | const LookupBlockOffsets & | Offsets, |
| RecordDataImpl & | Record ) |
Definition at line 7144 of file ASTWriter.cpp.
References clang::LookupBlockOffsets::LexicalOffset, clang::VisibleLookupBlockOffsets::ModuleLocalOffset, clang::VisibleLookupBlockOffsets::TULocalOffset, and clang::VisibleLookupBlockOffsets::VisibleOffset.
| void ASTWriter::AddMacroRef | ( | MacroInfo * | MI, |
| const IdentifierInfo * | Name, | ||
| RecordDataImpl & | Record ) |
Emit a reference to a macro.
Definition at line 7152 of file ASTWriter.cpp.
References getMacroRef().
| void ASTWriter::AddPath | ( | StringRef | Path, |
| RecordDataImpl & | Record ) |
Add a path to the given record.
Definition at line 5476 of file ASTWriter.cpp.
References AddString(), and PreparePathForOutput().
| void ASTWriter::AddPathBlob | ( | StringRef | Str, |
| RecordDataImpl & | Record, | ||
| SmallVectorImpl< char > & | Blob ) |
Definition at line 5482 of file ASTWriter.cpp.
References AddStringBlob(), and PreparePathForOutput().
| void ASTWriter::AddSourceLocation | ( | SourceLocation | Loc, |
| RecordDataImpl & | Record ) |
Emit a source location.
Definition at line 6938 of file ASTWriter.cpp.
References getRawSourceLocationEncoding().
Referenced by AddSourceLocation(), AddSourceRange(), and AddToken().
| void ASTWriter::AddSourceLocation | ( | SourceLocation | Loc, |
| RecordDataImpl & | Record, | ||
| SourceLocationEncoding::Chain & | Chain ) |
Emit a source location, delta encoded against Chain.
Definition at line 6943 of file ASTWriter.cpp.
References AddSourceLocation().
| void ASTWriter::AddSourceRange | ( | SourceRange | Range, |
| RecordDataImpl & | Record ) |
| void ASTWriter::AddString | ( | StringRef | Str, |
| RecordDataImpl & | Record ) |
Add a string to the given record.
Definition at line 5449 of file ASTWriter.cpp.
Referenced by AddPath(), and AddToken().
| void ASTWriter::AddStringBlob | ( | StringRef | Str, |
| RecordDataImpl & | Record, | ||
| SmallVectorImpl< char > & | Blob ) |
Definition at line 5454 of file ASTWriter.cpp.
Referenced by AddPathBlob().
| void ASTWriter::AddToken | ( | const Token & | Tok, |
| RecordDataImpl & | Record ) |
Emit a token.
Definition at line 5404 of file ASTWriter.cpp.
References AddIdentifierRef(), AddSourceLocation(), AddString(), AddToken(), clang::T, and Tok.
Referenced by AddToken().
| void ASTWriter::addTouchedModuleFile | ( | serialization::ModuleFile * | MF | ) |
Definition at line 4146 of file ASTWriter.cpp.
| void ASTWriter::AddTypeRef | ( | ASTContext & | Context, |
| QualType | T, | ||
| RecordDataImpl & | Record ) |
Emit a reference to a type.
Definition at line 7079 of file ASTWriter.cpp.
References GetOrCreateTypeID(), and clang::T.
| void ASTWriter::AddVersionTuple | ( | const VersionTuple & | Version, |
| RecordDataImpl & | Record ) |
Add a version tuple to the given record.
Definition at line 5496 of file ASTWriter.cpp.
| void ASTWriter::ClearSwitchCaseIDs | ( | ) |
Definition at line 3277 of file ASTWriterStmt.cpp.
| llvm::MapVector< ModuleFile *, const Decl * > ASTWriter::CollectFirstDeclFromEachModule | ( | const Decl * | D, |
| bool | IncludeLocal ) |
Collect the first declaration from each module file that provides a declaration of D.
Definition at line 7132 of file ASTWriter.cpp.
References clang::Decl::getMostRecentDecl().
| SourceLocationEncoding::Chain ASTWriter::EmitEntryOffset | ( | const SrcMgr::SLocEntry & | SLoc, |
| RecordDataImpl & | Record ) |
Emit SLoc's entry offset as the record's first field and return a chain anchored at that entry, for delta encoding the locations that follow.
Definition at line 6926 of file ASTWriter.cpp.
References EmitSourceLocationOffset(), and getEntryOffset().
| void ASTWriter::EmitRecordWithPath | ( | unsigned | Abbrev, |
| RecordDataRef | Record, | ||
| StringRef | Path ) |
Emit the current record with the given path as a blob.
Definition at line 5489 of file ASTWriter.cpp.
References PreparePathForOutput().
|
static |
Emit Offset as the next record field and return a chain anchored at Offset + InitialDelta, for delta encoding the locations that follow.
Definition at line 6918 of file ASTWriter.cpp.
Referenced by EmitEntryOffset().
Definition at line 7288 of file ASTWriter.cpp.
References clang::Decl::getLexicalDeclContext(), clang::serialization::needsAnonymousDeclarationNumber(), and clang::serialization::numberAnonymousDeclsWithin().
|
inline |
Definition at line 929 of file ASTWriter.h.
|
inline |
Definition at line 933 of file ASTWriter.h.
|
inline |
Definition at line 940 of file ASTWriter.h.
Referenced by getRawSourceLocationEncoding().
|
inline |
Definition at line 926 of file ASTWriter.h.
|
inline |
Definition at line 712 of file ASTWriter.h.
|
inline |
Definition at line 930 of file ASTWriter.h.
|
inline |
Definition at line 937 of file ASTWriter.h.
|
inline |
Definition at line 935 of file ASTWriter.h.
|
inline |
Definition at line 934 of file ASTWriter.h.
|
inline |
Definition at line 903 of file ASTWriter.h.
References clang::FunctionDecl::TK_DependentFunctionTemplateSpecialization, clang::FunctionDecl::TK_DependentNonTemplate, clang::FunctionDecl::TK_FunctionTemplate, clang::FunctionDecl::TK_FunctionTemplateSpecialization, clang::FunctionDecl::TK_MemberSpecialization, and clang::FunctionDecl::TK_NonTemplate.
|
inline |
Definition at line 901 of file ASTWriter.h.
|
inline |
Definition at line 900 of file ASTWriter.h.
| LocalDeclID ASTWriter::getDeclID | ( | const Decl * | D | ) |
Determine the local declaration ID of an already-emitted declaration.
Definition at line 7205 of file ASTWriter.cpp.
References clang::Decl::getGlobalID(), and clang::Decl::isFromASTFile().
|
inline |
Definition at line 902 of file ASTWriter.h.
|
inline |
Definition at line 896 of file ASTWriter.h.
|
inline |
Definition at line 897 of file ASTWriter.h.
| LocalDeclID ASTWriter::GetDeclRef | ( | const Decl * | D | ) |
Force a declaration to be emitted and get its local ID to the module file been writing.
Definition at line 7170 of file ASTWriter.cpp.
References clang::Decl::getGlobalID(), clang::Decl::getOwningModule(), clang::Module::getTopLevelModule(), clang::Decl::isFromASTFile(), and isWritingStdCXXNamedModules().
Referenced by AddDeclRef(), and AddLazyVectorDecls().
|
inline |
Definition at line 925 of file ASTWriter.h.
|
inline |
Definition at line 920 of file ASTWriter.h.
|
inline |
Definition at line 898 of file ASTWriter.h.
|
inline |
Definition at line 923 of file ASTWriter.h.
|
inline |
Definition at line 899 of file ASTWriter.h.
|
inline |
Definition at line 954 of file ASTWriter.h.
Referenced by isLookupResultNotInteresting().
| SourceLocation::UIntTy ASTWriter::getEntryOffset | ( | const SrcMgr::SLocEntry & | SLoc | ) | const |
The starting offset of SLoc's entry within this module, with the dummy entry skipped.
This is what an SLocEntry record stores as its first field.
Definition at line 6912 of file ASTWriter.cpp.
References clang::SrcMgr::SLocEntry::getOffset().
Referenced by EmitEntryOffset().
|
inline |
Definition at line 928 of file ASTWriter.h.
Find the first local declaration of a given local redeclarable decl.
Definition at line 2275 of file ASTWriterDecl.cpp.
References clang::Decl::getCanonicalDecl(), clang::Decl::getPreviousDecl(), and IsLocalDecl().
| IdentifierID ASTWriter::getIdentifierRef | ( | const IdentifierInfo * | II | ) |
Get the unique number used to refer to the given identifier.
Definition at line 6964 of file ASTWriter.cpp.
Referenced by AddIdentifierRef().
|
inline |
Definition at line 927 of file ASTWriter.h.
| const LangOptions & ASTWriter::getLangOpts | ( | ) | const |
Definition at line 5556 of file ASTWriter.cpp.
Referenced by getLocalOrImportedSubmoduleID(), and isLookupResultNotInteresting().
Retrieve or create a submodule ID for this module, or return 0 if the submodule is neither local (a submodle of the currently-written module) nor from an imported module.
Definition at line 2981 of file ASTWriter.cpp.
References getLangOpts(), and clang::Module::getTopLevelModule().
| uint32_t ASTWriter::getMacroDirectivesOffset | ( | const IdentifierInfo * | Name | ) |
Definition at line 6990 of file ASTWriter.cpp.
| MacroID ASTWriter::getMacroRef | ( | MacroInfo * | MI, |
| const IdentifierInfo * | Name ) |
Get the unique number used to refer to the given macro.
Definition at line 6974 of file ASTWriter.cpp.
References clang::MacroInfo::isBuiltinMacro().
Referenced by AddMacroRef().
| TypeID ASTWriter::GetOrCreateTypeID | ( | ASTContext & | Context, |
| QualType | T ) |
Force a type to be emitted and get its ID.
Definition at line 7109 of file ASTWriter.cpp.
References clang::serialization::TypeIdx::getValue(), MakeTypeID(), and clang::T.
Referenced by AddTypeRef().
| SourceLocationEncoding::RawLocEncoding ASTWriter::getRawSourceLocationEncoding | ( | SourceLocation | Loc | ) |
Return the raw encodings for source locations.
Definition at line 6889 of file ASTWriter.cpp.
References clang::SourceLocationEncoding::encode(), clang::ContinuousRangeMap< Int, V, InitialCapacity >::find(), getChain(), clang::serialization::ModuleFile::Index, clang::SourceLocation::isValid(), and clang::serialization::ModuleFile::SLocEntryBaseOffset.
Referenced by AddSourceLocation().
| SelectorID ASTWriter::getSelectorRef | ( | Selector | Sel | ) |
Get the unique number used to refer to the given selector.
Definition at line 6998 of file ASTWriter.cpp.
References clang::Selector::getAsOpaquePtr().
| unsigned ASTWriter::getSwitchCaseID | ( | SwitchCase * | S | ) |
Retrieve the ID for the given switch-case statement.
Definition at line 3272 of file ASTWriterStmt.cpp.
| time_t ASTWriter::getTimestampForOutput | ( | time_t | ModTime | ) | const |
Get a timestamp for output into the AST file.
The actual timestamp of the specified file may be ignored if we have been instructed to not include timestamps in the output file.
Definition at line 5561 of file ASTWriter.cpp.
|
inline |
Definition at line 892 of file ASTWriter.h.
| void ASTWriter::handleVTable | ( | CXXRecordDecl * | RD | ) |
Definition at line 4139 of file ASTWriter.cpp.
References clang::Decl::isInNamedModule().
|
inline |
Definition at line 939 of file ASTWriter.h.
Definition at line 956 of file ASTWriter.h.
Referenced by isLookupResultNotInteresting().
|
inline |
Definition at line 952 of file ASTWriter.h.
Is this a local declaration (that is, one that will be written to our AST file)?
This is the case for declarations that are neither imported from another AST file nor predefined.
Definition at line 807 of file ASTWriter.h.
References clang::Decl::isFromASTFile(), and clang::NUM_PREDEF_DECL_IDS.
Referenced by getFirstLocalDecl().
|
inline |
Definition at line 942 of file ASTWriter.h.
|
inline |
Definition at line 948 of file ASTWriter.h.
|
inline |
Definition at line 944 of file ASTWriter.h.
Referenced by GetDeclRef(), and wasDeclEmitted().
| bool ASTWriter::PreparePathForOutput | ( | SmallVectorImpl< char > & | Path | ) |
Convert a path from this build process into one that is appropriate for emission in the module file.
Definition at line 5460 of file ASTWriter.cpp.
References adjustFilenameForRelocatableAST().
Referenced by AddPath(), AddPathBlob(), and EmitRecordWithPath().
| unsigned ASTWriter::RecordSwitchCaseID | ( | SwitchCase * | S | ) |
Record an ID for the given switch-case statement.
Definition at line 3265 of file ASTWriterStmt.cpp.
| void ASTWriter::SetIdentifierOffset | ( | const IdentifierInfo * | II, |
| uint32_t | Offset ) |
Note that the identifier II occurs at the given offset within the identifier table.
Definition at line 5511 of file ASTWriter.cpp.
References isLocalIdentifierID(), and clang::serialization::NUM_PREDEF_IDENT_IDS.
Note that the selector Sel occurs at the given offset within the method pool/selector table.
Definition at line 5528 of file ASTWriter.cpp.
Whether or not the declaration got emitted.
If not, it wouldn't be emitted.
This may only be called after we've done the job to write the declarations (marked by DoneWritingDeclsAndTypes).
A declaration may only be omitted in reduced BMI.
Definition at line 7218 of file ASTWriter.cpp.
References clang::Decl::getOwningModule(), clang::Decl::isFromASTFile(), and isWritingStdCXXNamedModules().
Referenced by AddEmittedDeclRef(), and isLookupResultNotInteresting().
| ASTFileSignature ASTWriter::WriteAST | ( | llvm::PointerUnion< Sema *, Preprocessor * > | Subject, |
| StringRef | OutputFile, | ||
| Module * | WritingModule, | ||
| StringRef | isysroot ) |
Write a precompiled header or a module with the AST produced by the Sema object, or a dependency scanner module with the preprocessor state produced by the Preprocessor object.
| Subject | The Sema object that processed the AST to be written, or in the case of a dependency scanner module the Preprocessor that holds the state. |
| WritingModule | The module that we are writing. If null, we are writing a precompiled header. |
| isysroot | if non-empty, write a relocatable file whose headers are relative to the given system root. If we're writing a module, its build directory will be used in preference to this if both are available. |
Definition at line 5566 of file ASTWriter.cpp.
References clang::cast(), clang::Preprocessor::getDiagnostics(), clang::Sema::getPreprocessor(), and clang::DiagnosticsEngine::hasUncompilableErrorOccurred().
Referenced by serializeUnit().
|
friend |
|
friend |
Definition at line 101 of file ASTWriter.h.
References ASTRecordWriter.
Referenced by ASTRecordWriter.