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 @@ -235,6 +235,12 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) {
235
235
// mangled names, meaning the metadata emitted below would incorrectly
236
236
// mark them as no-alias. Use AnyPtr for such types in both C and C++, as
237
237
// C and C++ types may be visible when doing LTO.
238
+ //
239
+ // Note that using AnyPtr is overly conservative. We could summarize the
240
+ // members of the type, as per the C compatibility rule in the future.
241
+ // This also covers anonymous structs and unions, which have a different
242
+ // compatibility rule, but it doesn't matter because you can never have a
243
+ // pointer to an anonymous struct or union.
238
244
const auto *RT = Ty->getAs <RecordType>();
239
245
if (RT && !RT->getDecl ()->getDeclName ())
240
246
return AnyPtr;
You can’t perform that action at this time.
0 commit comments