================
@@ -5854,16 +5854,43 @@ bool Compiler<Emitter>::visitAPValue(const APValue
&Val, PrimType ValType,
return this->emitNull(ValType, 0, nullptr, Info);
APValue::LValueBase Base = Val.getLValueBase();
- ArrayRef<APValue::LValuePathEntry> Path = Val.getLValuePath();
-
- if (const Expr *BaseExpr = Base.dyn_cast<const Expr *>())
- return this->visit(BaseExpr);
- if (const auto *VD = Base.dyn_cast<const ValueDecl *>()) {
+ QualType EntryType;
+ if (const Expr *BaseExpr = Base.dyn_cast<const Expr *>()) {
+ if (!this->visit(BaseExpr))
+ return false;
+ EntryType = BaseExpr->getType();
+ } else if (const auto *VD = Base.dyn_cast<const ValueDecl *>()) {
if (!this->visitDeclRef(VD, Info.asExpr()))
return false;
+ EntryType = VD->getType();
+ } else if (Base.is<TypeInfoLValue>()) {
+ EntryType = Base.getTypeInfoType();
+ if (!this->emitGetTypeid(Base.get<TypeInfoLValue>()
----------------
tbaederr wrote:
Shouldn't the first parameter be `EntryType.getTypePtr()` and the second
`getTypeInfoType()`?
https://github.com/llvm/llvm-project/pull/221390
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits