diff options
| author | evgeny <eleviant@accesssoftek.com> | 2019-11-15 16:13:19 +0300 |
|---|---|---|
| committer | evgeny <eleviant@accesssoftek.com> | 2019-11-15 16:13:19 +0300 |
| commit | 3d708bf5c2672cae01e5ecb0ed1877e3d56ee451 (patch) | |
| tree | 24fe2d3ee2ecc0286cd4a07a4b90d890605a8fdb /llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp | |
| parent | 5f0c3bad2f03b9bba7f899d7b0ce667ca355f69d (diff) | |
| download | bcm5719-llvm-3d708bf5c2672cae01e5ecb0ed1877e3d56ee451.tar.gz bcm5719-llvm-3d708bf5c2672cae01e5ecb0ed1877e3d56ee451.zip | |
Recommit "[ThinLTO] Add correctness check for RO/WO variable import"
ValueInfo has user-defined 'operator bool' which allows incorrect implicit conversion
to GlobalValue::GUID (which is unsigned long). This causes bugs which are hard to
track and should be removed in future.
Diffstat (limited to 'llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp')
| -rw-r--r-- | llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp b/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp index 6bc86594c77..f4561b303eb 100644 --- a/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp +++ b/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp @@ -711,7 +711,7 @@ void runWholeProgramDevirtOnIndex( void updateIndexWPDForExports( ModuleSummaryIndex &Summary, - function_ref<bool(StringRef, GlobalValue::GUID)> isExported, + function_ref<bool(StringRef, ValueInfo)> isExported, std::map<ValueInfo, std::vector<VTableSlotSummary>> &LocalWPDTargetsMap) { for (auto &T : LocalWPDTargetsMap) { auto &VI = T.first; @@ -719,7 +719,7 @@ void updateIndexWPDForExports( assert(VI.getSummaryList().size() == 1 && "Devirt of local target has more than one copy"); auto &S = VI.getSummaryList()[0]; - if (!isExported(S->modulePath(), VI.getGUID())) + if (!isExported(S->modulePath(), VI)) continue; // It's been exported by a cross module import. |

