================ @@ -105,13 +105,34 @@ static bool isValidBaseType(QualType QTy) { if (RD->hasFlexibleArrayMember()) return false; // RD can be struct, union, class, interface or enum. - // For now, we only handle struct and class. - if (RD->isStruct() || RD->isClass()) + if (RD->isStruct() || RD->isClass() || + (RD->isUnion() && CodeGenOpts.UnionTBAA)) return true; } return false; } +// Give unique tag for compatible types. +std::string CodeGenTBAA::getPointeeName(const Type *Ty) { ---------------- rjmccall wrote:
Since this is always being used to build a larger string, could you make this append to a `raw_ostream`? I guess `Ty` *is* guaranteed to be a canonical type here, because that's apparently a precondition of `getTypeInfoHelper`. Could you assert that? https://github.com/llvm/llvm-project/pull/75177 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits