================ @@ -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) { ---------------- dybv-sc wrote:
Changed function to append to raw_ostream. `Ty` here is coming from `getPointeeType()` so it may be not canonical, right? 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