17 unsigned VirtualSize,
unsigned BaseSize,
bool HasPtrField)
18 :
Decl(
Decl), Bases(Bases), Fields(Fields), VirtualBases(VirtualBases),
19 BaseSize(BaseSize), VirtualSize(VirtualSize), IsUnion(
Decl->isUnion()),
20 IsAnonymousUnion(IsUnion &&
Decl->isAnonymousStructOrUnion()),
21 HasPtrField(HasPtrField) {
22 for (
const Base &B : this->Bases)
26std::string Record::getName()
const {
28 llvm::raw_string_ostream OS(
Ret);
29 Decl->getNameForDiagnostic(OS, Decl->getASTContext().getPrintingPolicy(),
34bool Record::hasTrivialDtor()
const {
41const Record::Field *Record::findField(
unsigned Offset)
const {
42 if (
const auto *It = llvm::find_if(
44 [=](
const Record::Field &F) ->
bool {
return F.Offset == Offset; });
50const Record::Base *Record::getBase(
const RecordDecl *RD)
const {
52 assert(It != BaseMap.end() &&
"Missing base");
56const Record::Base *Record::getBaseOrNull(
const RecordDecl *RD)
const {
60const Record::Base *Record::getBase(
QualType T)
const {
61 if (
auto *RD =
T->getAsCXXRecordDecl())
66const Record::Base *Record::findBase(
unsigned Offset)
const {
67 if (
const auto *It = llvm::find_if(
69 [=](
const Record::Base &B) ->
bool {
return B.Offset == Offset; });
75const Record::Base *Record::findVirtualBase(
const RecordDecl *FD)
const {
76 if (
const auto *It = llvm::find_if(
78 [=](
const Record::Base &B) ->
bool {
return B.Decl == FD; });
79 It != VirtualBases.end())
Defines the clang::ASTContext interface.
Represents a C++ destructor within a class.
Decl - This represents one declaration (or definition), e.g.
A (possibly-)qualified type.
Represents a struct/union/class.
decl_type * getFirstDecl()
Return the first declaration of this declaration or itself if this is the only declaration.
const CXXDestructorDecl * getDestructor() const
Returns the destructor of the record, if any.
bool isAnonymousUnion() const
Checks if the record is an anonymous union.
PRESERVE_NONE bool Ret(InterpState &S)
Top level wrappers for InstallAPI frontend operations.
const FunctionProtoType * T
U cast(CodeGen::Address addr)