16 FieldList &&SrcFields, VirtualBaseList &&SrcVirtualBases,
17 unsigned VirtualSize,
unsigned BaseSize,
bool HasPtrField)
18 :
Decl(
Decl), Bases(
std::move(SrcBases)), Fields(
std::move(SrcFields)),
19 BaseSize(BaseSize), VirtualSize(VirtualSize), IsUnion(
Decl->isUnion()),
20 IsAnonymousUnion(IsUnion &&
Decl->isAnonymousStructOrUnion()),
21 HasPtrField(HasPtrField) {
22 for (
Base &
V : SrcVirtualBases)
23 VirtualBases.emplace_back(
V.Decl,
V.Desc,
V.R,
V.Offset + BaseSize);
27 if (!this->HasPtrField)
28 this->HasPtrField |= B.R->hasPtrField();
30 for (
Base &
V : VirtualBases) {
31 VirtualBaseMap[
V.Decl] = &
V;
32 if (!this->HasPtrField)
33 this->HasPtrField |=
V.R->hasPtrField();
37std::string Record::getName()
const {
39 llvm::raw_string_ostream OS(
Ret);
40 Decl->getNameForDiagnostic(OS, Decl->getASTContext().getPrintingPolicy(),
45bool Record::hasTrivialDtor()
const {
52const Record::Base *Record::getBase(
const RecordDecl *FD)
const {
53 auto It = BaseMap.find(FD);
54 assert(It != BaseMap.end() &&
"Missing base");
58const Record::Base *Record::getBase(
QualType T)
const {
59 if (
auto *RD = T->getAsCXXRecordDecl())
60 return BaseMap.lookup(RD);
64const Record::Base *Record::getVirtualBase(
const RecordDecl *FD)
const {
65 auto It = VirtualBaseMap.find(FD);
66 assert(It != VirtualBaseMap.end() &&
"Missing virtual base");
Defines the clang::ASTContext interface.
Represents a C++ destructor within a class.
Decl - This represents one declaration (or definition), e.g.
bool isTrivial() const
Whether this function is "trivial" in some specialized C++ senses.
A (possibly-)qualified type.
Represents a struct/union/class.
const CXXDestructorDecl * getDestructor() const
Returns the destructor of the record, if any.
bool isAnonymousUnion() const
Checks if the record is an anonymous union.
bool Ret(InterpState &S, CodePtr &PC)
The JSON file list parser is used to communicate input to InstallAPI.
for(const auto &A :T->param_types())