commit | 2b70d616f057d2b6822a0273c1b27ede9abc1d21 | [log] [tgz] |
---|---|---|
author | Eugene Leviant <eleviant@accesssoftek.com> | Sun Sep 23 13:27:47 2018 +0000 |
committer | Eugene Leviant <eleviant@accesssoftek.com> | Sun Sep 23 13:27:47 2018 +0000 |
tree | 8b4b19a63d281c5fd0b18574700027b39dd1cc43 | |
parent | baf09e5d18f4f61b8c1e4e48ebf9f88eb1b6bde2 [diff] [blame] |
[WholeProgramDevirt] Don't process declarations when building type id map Differential revision: https://reviews.llvm.org/D52175 llvm-svn: 342836
diff --git a/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp b/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp index 0549f0a..9e080bb 100644 --- a/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp +++ b/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
@@ -665,7 +665,7 @@ 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];