[llvm] ffc6e59 - Replace dyn_cast with isa when the result isn't used (NFC)

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Sun May 17 16:15:32 PDT 2020


Author: Mehdi Amini
Date: 2020-05-17T23:15:17Z
New Revision: ffc6e593d2717e16187fe118342db28ff3be5351

URL: https://github.com/llvm/llvm-project/commit/ffc6e593d2717e16187fe118342db28ff3be5351
DIFF: https://github.com/llvm/llvm-project/commit/ffc6e593d2717e16187fe118342db28ff3be5351.diff

LOG: Replace dyn_cast with isa when the result isn't used (NFC)

Fix build warning: unused variable 'BB'

Added: 
    

Modified: 
    llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp b/llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp
index d271bca3cfdc..363b4b59ec54 100644
--- a/llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp
@@ -264,7 +264,7 @@ bool InlineAsmLowering::lowerInlineAsm(
 
       OpInfo.CallOperandVal = const_cast<Value *>(Call.getArgOperand(ArgNo++));
 
-      if (const auto *BB = dyn_cast<BasicBlock>(OpInfo.CallOperandVal)) {
+      if (isa<BasicBlock>(OpInfo.CallOperandVal)) {
         LLVM_DEBUG(dbgs() << "Basic block input operands not supported yet\n");
         return false;
       }


        


More information about the llvm-commits mailing list