[llvm] [llvm] Migrate away from PointerUnion::dyn_cast (NFC) (PR #123692)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 00:17:36 PST 2025


================
@@ -3560,7 +3560,7 @@ ModuleCallsiteContextGraph::getAllocationCallType(const CallInfo &Call) const {
 
 AllocationType
 IndexCallsiteContextGraph::getAllocationCallType(const CallInfo &Call) const {
-  const auto *AI = Call.call().dyn_cast<AllocInfo *>();
+  const auto *AI = dyn_cast_if_present<AllocInfo *>(Call.call());
----------------
nikic wrote:

Same here, directly dereferenced.

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


More information about the llvm-commits mailing list