[PATCH] D91151: [VE][NFC] Change cast to dyn_cast

Kazushi Marukawa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 10 04:49:30 PST 2020


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG543b30db06bf: [VE][NFC] Change cast to dyn_cast (authored by kaz7).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91151/new/

https://reviews.llvm.org/D91151

Files:
  llvm/lib/Target/VE/VEISelDAGToDAG.cpp


Index: llvm/lib/Target/VE/VEISelDAGToDAG.cpp
===================================================================
--- llvm/lib/Target/VE/VEISelDAGToDAG.cpp
+++ llvm/lib/Target/VE/VEISelDAGToDAG.cpp
@@ -236,7 +236,7 @@
       Addr.getOpcode() == ISD::TargetGlobalTLSAddress)
     return false; // direct calls.
 
-  if (ConstantSDNode *CN = cast<ConstantSDNode>(Addr)) {
+  if (auto *CN = dyn_cast<ConstantSDNode>(Addr)) {
     if (isInt<32>(CN->getSExtValue())) {
       Base = CurDAG->getTargetConstant(0, SDLoc(Addr), MVT::i32);
       Index = CurDAG->getTargetConstant(0, SDLoc(Addr), MVT::i32);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91151.304140.patch
Type: text/x-patch
Size: 598 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201110/2b2aaf9a/attachment.bin>


More information about the llvm-commits mailing list