summaryrefslogtreecommitdiffstats
path: root/llvm/tools/dsymutil/DwarfLinker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/dsymutil/DwarfLinker.cpp')
-rw-r--r--llvm/tools/dsymutil/DwarfLinker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/dsymutil/DwarfLinker.cpp b/llvm/tools/dsymutil/DwarfLinker.cpp
index 1aa15c5fb67..8489189cc16 100644
--- a/llvm/tools/dsymutil/DwarfLinker.cpp
+++ b/llvm/tools/dsymutil/DwarfLinker.cpp
@@ -1780,7 +1780,7 @@ static bool analyzeContextInfo(const DWARFDebugInfoEntryMinimal *DIE,
// definitions match)."
//
// We treat non-C++ modules like namespaces for this reason.
- if (DIE->getTag() == dwarf::DW_TAG_module &&
+ if (DIE->getTag() == dwarf::DW_TAG_module && ParentIdx == 0 &&
DIE->getAttributeValueAsString(&CU.getOrigUnit(), dwarf::DW_AT_name,
"") != CU.getClangModuleName()) {
InImportedModule = true;
OpenPOWER on IntegriCloud