File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -254,6 +254,12 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) {
254254 // mangled names, meaning the metadata emitted below would incorrectly
255255 // mark them as no-alias. Use AnyPtr for such types in both C and C++, as
256256 // C and C++ types may be visible when doing LTO.
257+ //
258+ // Note that using AnyPtr is overly conservative. We could summarize the
259+ // members of the type, as per the C compatibility rule in the future.
260+ // This also covers anonymous structs and unions, which have a different
261+ // compatibility rule, but it doesn't matter because you can never have a
262+ // pointer to an anonymous struct or union.
257263 const auto *RT = Ty->getAs <RecordType>();
258264 if (RT && !RT->getDecl ()->getDeclName ())
259265 return AnyPtr;
You can’t perform that action at this time.
0 commit comments