13#ifndef LLVM_CLANG_AST_INTERP_DESCRIPTOR_H
14#define LLVM_CLANG_AST_INTERP_DESCRIPTOR_H
29using DeclTy = llvm::PointerUnion<const Decl *, const Expr *>;
30using InitMapPtr = std::optional<std::pair<bool, std::shared_ptr<InitMap>>>;
36 bool IsMutable,
bool IsActive,
bool InUnion,
49 std::byte *DstFieldPtr,
76 LLVM_PREFERRED_TYPE(
bool)
82 LLVM_PREFERRED_TYPE(
bool)
85 LLVM_PREFERRED_TYPE(
bool)
88 LLVM_PREFERRED_TYPE(
bool)
91 LLVM_PREFERRED_TYPE(
bool)
95 LLVM_PREFERRED_TYPE(
bool)
97 LLVM_PREFERRED_TYPE(
bool)
100 LLVM_PREFERRED_TYPE(
bool)
111 void dump(llvm::raw_ostream &OS)
const;
113static_assert(
sizeof(GlobalInlineDescriptor) !=
sizeof(InlineDescriptor),
"");
121 const unsigned ElemSize;
125 const unsigned MDSize;
127 const unsigned AllocSize;
130 static constexpr unsigned UnknownSizeMark = (
unsigned)-1;
152 const std::optional<PrimType>
PrimT = std::nullopt;
204 const Decl *
asDecl()
const {
return dyn_cast<const Decl *>(Source); }
205 const Expr *
asExpr()
const {
return dyn_cast<const Expr *>(Source); }
209 return dyn_cast_if_present<ValueDecl>(
asDecl());
213 return dyn_cast_if_present<VarDecl>(
asDecl());
217 return dyn_cast_if_present<FieldDecl>(
asDecl());
221 return dyn_cast_if_present<RecordDecl>(
asDecl());