From 6e96a4c64a90e78602adae215989edfe9d0f63c7 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 1 Jul 2016 18:43:29 +0000 Subject: [PATCH] [pdb] Check the display name for , not the linkage name This issue was encountered on libcmt.pdb, which has a type record that looks like this: Struct (0x1094) { TypeLeafKind: LF_STRUCTURE (0x1505) MemberCount: 3 Properties [ (0x200) HasUniqueName (0x200) ] FieldList: (0x1093) DerivedFrom: 0x0 VShape: 0x0 SizeOf: 4 Name: LinkageName: .?AU@@ } The checks for startswith/endswith "" should look at the display name, not the linkage name. llvm-svn: 274376 --- llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp b/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp index 016c51b8f4e0..6c5dd93e8eda 100644 --- a/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp +++ b/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp @@ -66,7 +66,7 @@ TpiStream::~TpiStream() {} // Corresponds to `fUDTAnon`. template static bool isAnonymous(T &Rec) { - StringRef Name = Rec.getUniqueName(); + StringRef Name = Rec.getName(); return Name == "" || Name == "__unnamed" || Name.endswith("::") || Name.endswith("::__unnamed"); }