[PATCH] D92599: Fix for Bug 48055.
Eric Christopher via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 4 10:16:07 PST 2020
echristo added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/Evaluator.cpp:190
Type *Ty = cast<PointerType>(Ptr->getType())->getElementType();
- if (!isa<StructType>(Ty))
+ if (!isa<StructType>(Ty) || dyn_cast<StructType>(Ty)->isOpaque())
break;
----------------
You have a dyn_cast here that is immediately dereferenced rather than checked. Might be better to just cast (since we know it's a StructType) or dyn_cast outside of the if?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92599/new/
https://reviews.llvm.org/D92599
More information about the llvm-commits
mailing list