[llvm] r309305 - [FunctionImport] Prefer isa<> to dyn_cast<> as the value is not used.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 27 11:38:09 PDT 2017

Author: davide
Date: Thu Jul 27 11:38:09 2017
New Revision: 309305

URL: http://llvm.org/viewvc/llvm-project?rev=309305&view=rev
[FunctionImport] Prefer isa<> to dyn_cast<> as the value is not used.

This change makes GCC7 happy again.


Modified: llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp?rev=309305&r1=309304&r2=309305&view=diff
--- llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp Thu Jul 27 11:38:09 2017
@@ -132,7 +132,7 @@ selectCallee(const ModuleSummaryIndex &I
         if (GlobalValue::isInterposableLinkage(GVSummary->linkage()))
           // There is no point in importing these, we can't inline them
           return false;
-        if (auto *AS = dyn_cast<AliasSummary>(GVSummary))
+        if (isa<AliasSummary>(GVSummary))
           // Aliases can't point to "available_externally".
           // FIXME: we should import alias as available_externally *function*,
           // the destination module does not need to know it is an alias.

More information about the llvm-commits mailing list