ModuleSummaryAnalysis: Remove some duplicate code. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290003 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Peter Collingbourne 2016-12-16 23:19:02 +00:00
parent 398ecdfe0a
commit 95a614c350

View File

@ -208,11 +208,6 @@ ModuleSummaryIndex llvm::buildModuleSummaryIndex(
SmallPtrSet<GlobalValue *, 8> Used;
// First collect those in the llvm.used set.
collectUsedGlobalVariables(M, Used, /*CompilerUsed*/ false);
for (auto *V : Used) {
if (V->hasLocalLinkage())
LocalsUsed.insert(V);
}
Used.clear();
// Next collect those in the llvm.compiler.used set.
collectUsedGlobalVariables(M, Used, /*CompilerUsed*/ true);
for (auto *V : Used) {