diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2017-05-04 18:03:25 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2017-05-04 18:03:25 +0000 |
commit | 9667b91b13102c2e0e795cd5b167f8f452064f43 (patch) | |
tree | 838dc778e1166eb4cf403f93ec62a685e6662b69 /clang/lib/CodeGen/BackendUtil.cpp | |
parent | 3207d30fddbace150087655f17f286e135f4d68d (diff) | |
download | bcm5719-llvm-9667b91b13102c2e0e795cd5b167f8f452064f43.tar.gz bcm5719-llvm-9667b91b13102c2e0e795cd5b167f8f452064f43.zip |
Re-apply r302108, "IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI."
with a fix for the clang backend.
llvm-svn: 302176
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r-- | clang/lib/CodeGen/BackendUtil.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 03883805199..aa5b5267abd 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -974,10 +974,14 @@ static void runThinLTOBackend(ModuleSummaryIndex *CombinedIndex, Module *M, // via a WriteIndexesThinBackend. FunctionImporter::ImportMapTy ImportList; for (auto &GlobalList : *CombinedIndex) { + // Ignore entries for undefined references. + if (GlobalList.second.SummaryList.empty()) + continue; + auto GUID = GlobalList.first; - assert(GlobalList.second.size() == 1 && + assert(GlobalList.second.SummaryList.size() == 1 && "Expected individual combined index to have one summary per GUID"); - auto &Summary = GlobalList.second[0]; + auto &Summary = GlobalList.second.SummaryList[0]; // Skip the summaries for the importing module. These are included to // e.g. record required linkage changes. if (Summary->modulePath() == M->getModuleIdentifier()) |