OSDN Git Service

[FunctionImport] Prefer isa<> to dyn_cast<> as the value is not used.
authorDavide Italiano <davide@freebsd.org>
Thu, 27 Jul 2017 18:38:09 +0000 (18:38 +0000)
committerDavide Italiano <davide@freebsd.org>
Thu, 27 Jul 2017 18:38:09 +0000 (18:38 +0000)
This change makes GCC7 happy again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309305 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/FunctionImport.cpp

index a36314c..de3756e 100644 (file)
@@ -132,7 +132,7 @@ selectCallee(const ModuleSummaryIndex &Index,
         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.