clang API Documentation
An external AST source that overrides the layout of a specified set of record types. More...
#include <LayoutOverrideSource.h>
Classes | |
struct | Layout |
The layout of a given record. | |
Public Member Functions | |
LayoutOverrideSource (StringRef Filename) | |
Create a new AST source that overrides the layout of some set of record types. | |
bool | layoutRecordType (const 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) override |
If this particular record type has an overridden layout, return that layout. | |
void | dump () |
Dump the overridden layouts. |
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.
Definition at line 25 of file LayoutOverrideSource.h.
LayoutOverrideSource::LayoutOverrideSource | ( | StringRef | Filename | ) | [explicit] |
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.
Definition at line 30 of file LayoutOverrideSource.cpp.
References Input, clang::isDigit(), clang::isWhitespace(), Line, and parseName().
void LayoutOverrideSource::dump | ( | ) |
Dump the overridden layouts.
Definition at line 191 of file LayoutOverrideSource.cpp.
bool LayoutOverrideSource::layoutRecordType | ( | const 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 | ||
) | [override, virtual] |
If this particular record type has an overridden layout, return that layout.
Reimplemented from clang::ExternalASTSource.
Definition at line 156 of file LayoutOverrideSource.cpp.
References clang::NamedDecl::getIdentifier(), and clang::NamedDecl::getName().