[clang] [TBAA] Extend pointer TBAA to pointers of non-builtin types. (PR #110569)

John McCall via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 15 13:05:17 PDT 2024


================
@@ -221,21 +221,27 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) {
       PtrDepth++;
       Ty = Ty->getPointeeType().getTypePtr();
     } while (Ty->isPointerType());
-    // TODO: Implement C++'s type "similarity" and consider dis-"similar"
-    // pointers distinct for non-builtin types.
+
+    SmallString<256> TyName;
----------------
rjmccall wrote:

Could you move the last part of the comment above ("Computing...") so that it applies to the first block here, maybe with a new lead-in, like "When the underlying type is a builtin type, we compute the pointee type string recursively, which is implicitly..."

https://github.com/llvm/llvm-project/pull/110569


More information about the cfe-commits mailing list