class LayoutOverrideSource
Declaration
class LayoutOverrideSource : public ExternalASTSource { /* full declaration omitted */ };
Description
An external AST source that overrides the layout of a specified set of record types. This class is used only for testing the ability of external AST sources to override the layout of record types. Its input is the output format of the command-line argument -fdump-record-layouts.
Declared at: clang/include/clang/Frontend/LayoutOverrideSource.h:24
Inherits from: ExternalASTSource
Member Variables
- private llvm::StringMap<Layout> Layouts
- The set of layouts that will be overridden.
Method Overview
- public LayoutOverrideSource(llvm::StringRef Filename)
- public void dump()
- public bool layoutRecordType(const clang::RecordDecl * Record, uint64_t & Size, uint64_t & Alignment, llvm::DenseMap<const FieldDecl *, uint64_t> & FieldOffsets, llvm::DenseMap<const CXXRecordDecl *, CharUnits> & BaseOffsets, llvm::DenseMap<const CXXRecordDecl *, CharUnits> & VirtualBaseOffsets)
Inherited from ExternalASTSource:
- public CompleteRedeclChain
- public CompleteType
- public CompleteType
- public FindExternalLexicalDecls
- public FindExternalLexicalDecls
- public FindExternalVisibleDeclsByName
- public FindFileRegionDecls
- public FinishedDeserializing
- public GetExternalCXXBaseSpecifiers
- public GetExternalCXXCtorInitializers
- public GetExternalDecl
- public GetExternalDeclStmt
- public GetExternalSelector
- public GetNumExternalSelectors
- public PrintStats
- public ReadComments
- protected SetExternalVisibleDeclsForName
- protected SetNoExternalVisibleDeclsForName
- public StartTranslationUnit
- public StartedDeserializing
- public classof
- public completeVisibleDeclsMap
- public getGeneration
- public getMemoryBufferSizes
- public getMemoryBufferSizes
- public getModule
- public getSourceDescriptor
- public hasExternalDefinitions
- protected incrementGeneration
- public isA
- public layoutRecordType
- public updateOutOfDateIdentifier
Methods
¶LayoutOverrideSource(llvm::StringRef Filename)
LayoutOverrideSource(llvm::StringRef Filename)
Description
Create a new AST source that overrides the layout of some set of record types. The file is the result of passing -fdump-record-layouts to a file.
Declared at: clang/include/clang/Frontend/LayoutOverrideSource.h:45
Parameters
- llvm::StringRef Filename
¶void dump()
void dump()
Description
Dump the overridden layouts.
Declared at: clang/include/clang/Frontend/LayoutOverrideSource.h:58
¶bool layoutRecordType(
const clang::RecordDecl* Record,
uint64_t& Size,
uint64_t& Alignment,
llvm::DenseMap<const FieldDecl*, uint64_t>&
FieldOffsets,
llvm::DenseMap<const CXXRecordDecl*,
CharUnits>& BaseOffsets,
llvm::DenseMap<const CXXRecordDecl*,
CharUnits>& VirtualBaseOffsets)
bool layoutRecordType(
const clang::RecordDecl* Record,
uint64_t& Size,
uint64_t& Alignment,
llvm::DenseMap<const FieldDecl*, uint64_t>&
FieldOffsets,
llvm::DenseMap<const CXXRecordDecl*,
CharUnits>& BaseOffsets,
llvm::DenseMap<const CXXRecordDecl*,
CharUnits>& VirtualBaseOffsets)
Description
If this particular record type has an overridden layout, return that layout.
Declared at: clang/include/clang/Frontend/LayoutOverrideSource.h:50
Parameters
- const clang::RecordDecl* Record
- uint64_t& Size
- uint64_t& Alignment
- llvm::DenseMap<const FieldDecl*, uint64_t>& FieldOffsets
- llvm::DenseMap<const CXXRecordDecl*, CharUnits>& BaseOffsets
- llvm::DenseMap<const CXXRecordDecl*, CharUnits>& VirtualBaseOffsets