diff options
| author | Eugene Leviant <eleviant@accesssoftek.com> | 2018-09-23 13:27:47 +0000 |
|---|---|---|
| committer | Eugene Leviant <eleviant@accesssoftek.com> | 2018-09-23 13:27:47 +0000 |
| commit | 2b70d616f057d2b6822a0273c1b27ede9abc1d21 (patch) | |
| tree | 8b4b19a63d281c5fd0b18574700027b39dd1cc43 /llvm/lib/Transforms | |
| parent | baf09e5d18f4f61b8c1e4e48ebf9f88eb1b6bde2 (diff) | |
| download | bcm5719-llvm-2b70d616f057d2b6822a0273c1b27ede9abc1d21.tar.gz bcm5719-llvm-2b70d616f057d2b6822a0273c1b27ede9abc1d21.zip | |
[WholeProgramDevirt] Don't process declarations when building type id map
Differential revision: https://reviews.llvm.org/D52175
llvm-svn: 342836
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp b/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp index 0549f0a1b0b..9e080bb1d15 100644 --- a/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp +++ b/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp @@ -665,7 +665,7 @@ void DevirtModule::buildTypeIdentifierMap( for (GlobalVariable &GV : M.globals()) { Types.clear(); GV.getMetadata(LLVMContext::MD_type, Types); - if (Types.empty()) + if (GV.isDeclaration() || Types.empty()) continue; VTableBits *&BitsPtr = GVToBits[&GV]; |

