forked from OSchip/llvm-project
[pdb] Check the display name for <unnamed-tag>, 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: <field list> (0x1093) DerivedFrom: 0x0 VShape: 0x0 SizeOf: 4 Name: <unnamed-tag> LinkageName: .?AU<unnamed-tag>@@ } The checks for startswith/endswith "<unnamed-tag>" should look at the display name, not the linkage name. llvm-svn: 274376
This commit is contained in:
parent
a89746907f
commit
6e96a4c64a
|
@ -66,7 +66,7 @@ TpiStream::~TpiStream() {}
|
||||||
|
|
||||||
// Corresponds to `fUDTAnon`.
|
// Corresponds to `fUDTAnon`.
|
||||||
template <typename T> static bool isAnonymous(T &Rec) {
|
template <typename T> static bool isAnonymous(T &Rec) {
|
||||||
StringRef Name = Rec.getUniqueName();
|
StringRef Name = Rec.getName();
|
||||||
return Name == "<unnamed-tag>" || Name == "__unnamed" ||
|
return Name == "<unnamed-tag>" || Name == "__unnamed" ||
|
||||||
Name.endswith("::<unnamed-tag>") || Name.endswith("::__unnamed");
|
Name.endswith("::<unnamed-tag>") || Name.endswith("::__unnamed");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue