16 FieldList &&SrcFields, VirtualBaseList &&SrcVirtualBases,
17 unsigned VirtualSize,
unsigned BaseSize)
18 :
Decl(
Decl), Bases(
std::move(SrcBases)), Fields(
std::move(SrcFields)),
19 BaseSize(BaseSize), VirtualSize(VirtualSize), IsUnion(
Decl->isUnion()) {
20 for (
Base &
V : SrcVirtualBases)
21 VirtualBases.push_back({
V.Decl,
V.Offset + BaseSize,
V.Desc,
V.R});
25 for (Field &F : Fields)
26 FieldMap[F.Decl] = &F;
27 for (
Base &
V : VirtualBases)
28 VirtualBaseMap[
V.Decl] = &
V;
31const std::string Record::getName()
const {
33 llvm::raw_string_ostream OS(
Ret);
39const Record::Field *Record::getField(
const FieldDecl *FD)
const {
41 assert(It != FieldMap.end() &&
"Missing field");
45const Record::Base *Record::getBase(
const RecordDecl *FD)
const {
46 auto It = BaseMap.find(FD);
47 assert(It != BaseMap.end() &&
"Missing base");
51const Record::Base *Record::getBase(
QualType T)
const {
54 return BaseMap.lookup(RD);
59const Record::Base *Record::getVirtualBase(
const RecordDecl *FD)
const {
60 auto It = VirtualBaseMap.find(FD);
61 assert(It != VirtualBaseMap.end() &&
"Missing virtual base");
Defines the clang::ASTContext interface.
const clang::PrintingPolicy & getPrintingPolicy() const
Decl - This represents one declaration (or definition), e.g.
ASTContext & getASTContext() const LLVM_READONLY
Represents a member of a struct/union/class.
decl_type * getFirstDecl()
Return the first declaration of this declaration or itself if this is the only declaration.
A (possibly-)qualified type.
Represents a struct/union/class.
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
const T * getAs() const
Member-template getAs<specific type>'.
bool Ret(InterpState &S, CodePtr &PC, APValue &Result)
The JSON file list parser is used to communicate input to InstallAPI.
const FunctionProtoType * T