summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2017-01-03 23:19:29 +0000
committerTeresa Johnson <tejohnson@google.com>2017-01-03 23:19:29 +0000
commit5a8dba5bda08a50e5d401c8e5648c6fd47c31c63 (patch)
treebbbf5c3071bc9edaf9a2f35da4267474808326d3 /llvm/lib
parent491fe5bec0460ac663e1fa83d198189c7bbb4f8e (diff)
downloadbcm5719-llvm-5a8dba5bda08a50e5d401c8e5648c6fd47c31c63.tar.gz
bcm5719-llvm-5a8dba5bda08a50e5d401c8e5648c6fd47c31c63.zip
[ThinLTO] Import type as decl only when non-null Identifier
As per post-commit review for r289993 (D27775), we can only safely import a type as a decl if it has an Identifier, as the Name alone is not enough to be unique across modules. llvm-svn: 290915
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Bitcode/Reader/MetadataLoader.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
index cd08268d47b..5da421a79b7 100644
--- a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
+++ b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
@@ -749,7 +749,7 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata(
// handles the case where this is type ODRed with a definition needed
// by the importing module, in which case the existing definition is
// used.
- if (IsImporting && !ImportFullTypeDefinitions &&
+ if (IsImporting && !ImportFullTypeDefinitions && Identifier &&
(Tag == dwarf::DW_TAG_enumeration_type ||
Tag == dwarf::DW_TAG_class_type ||
Tag == dwarf::DW_TAG_structure_type ||
OpenPOWER on IntegriCloud