[llvm] f2f8bdc - Fix `-Wunused-variable` warning. NFC.

Michael Liao via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 17 17:17:09 PDT 2020


Author: Michael Liao
Date: 2020-03-17T20:15:50-04:00
New Revision: f2f8bdc2b166cf3a18181f418e7aa09cf017bb11

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

LOG: Fix `-Wunused-variable` warning. NFC.

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/SCCP.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp
index e668891fe418..708f02b2a425 100644
--- a/llvm/lib/Transforms/Scalar/SCCP.cpp
+++ b/llvm/lib/Transforms/Scalar/SCCP.cpp
@@ -533,7 +533,7 @@ class SCCPSolver : public InstVisitor<SCCPSolver> {
     // values mean that the result of the function changed. We only need to
     // update the call sites with the new function result and do not have to
     // propagate the call arguments.
-    if (auto *Fn = dyn_cast<Function>(I)) {
+    if (isa<Function>(I)) {
       for (User *U : I->users()) {
         if (auto CS = CallSite(U))
           handleCallResult(CS);


        


More information about the llvm-commits mailing list