File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -246,7 +246,8 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) {
246246 // Be conservative if the type isn't a RecordType. We are specifically
247247 // required to do this for member pointers until we implement the
248248 // similar-types rule.
249- if (!Ty->isRecordType ())
249+ const auto *RT = Ty->getAs <RecordType>();
250+ if (!RT)
250251 return AnyPtr;
251252
252253 // For unnamed structs or unions C's compatible types rule applies. Two
@@ -260,8 +261,7 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) {
260261 // This also covers anonymous structs and unions, which have a different
261262 // compatibility rule, but it doesn't matter because you can never have a
262263 // pointer to an anonymous struct or union.
263- const auto *RT = Ty->getAs <RecordType>();
264- if (RT && !RT->getDecl ()->getDeclName ())
264+ if (!RT->getDecl ()->getDeclName ())
265265 return AnyPtr;
266266
267267 // For non-builtin types use the mangled name of the canonical type.
You can’t perform that action at this time.
0 commit comments