diff options
Diffstat (limited to 'llvm/lib/DWARFLinker/DWARFLinkerDeclContext.cpp')
-rw-r--r-- | llvm/lib/DWARFLinker/DWARFLinkerDeclContext.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/DWARFLinker/DWARFLinkerDeclContext.cpp b/llvm/lib/DWARFLinker/DWARFLinkerDeclContext.cpp index 077fd4494241..c9a5da6676b3 100644 --- a/llvm/lib/DWARFLinker/DWARFLinkerDeclContext.cpp +++ b/llvm/lib/DWARFLinker/DWARFLinkerDeclContext.cpp @@ -80,8 +80,12 @@ PointerIntPair<DeclContext *, 1> DeclContextTree::getChildDeclContext( break; } - const char *Name = DIE.getName(DINameKind::LinkageName); - const char *ShortName = DIE.getName(DINameKind::ShortName); + const char *Name = DIE.getLinkageName(); + const char *ShortName = DIE.getShortName(); + + if (!Name) + Name = ShortName; + StringRef NameRef; StringRef ShortNameRef; StringRef FileRef; |