[llvm] r274376 - [pdb] Check the display name for <unnamed-tag>, not the linkage name
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 1 11:43:30 PDT 2016
Author: rnk
Date: Fri Jul 1 13:43:29 2016
New Revision: 274376
URL: http://llvm.org/viewvc/llvm-project?rev=274376&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/DebugInfo/PDB/Raw/TpiStream.cpp
Modified: llvm/trunk/lib/DebugInfo/PDB/Raw/TpiStream.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Raw/TpiStream.cpp?rev=274376&r1=274375&r2=274376&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Raw/TpiStream.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Raw/TpiStream.cpp Fri Jul 1 13:43:29 2016
@@ -66,7 +66,7 @@ TpiStream::~TpiStream() {}
// Corresponds to `fUDTAnon`.
template <typename T> static bool isAnonymous(T &Rec) {
- StringRef Name = Rec.getUniqueName();
+ StringRef Name = Rec.getName();
return Name == "<unnamed-tag>" || Name == "__unnamed" ||
Name.endswith("::<unnamed-tag>") || Name.endswith("::__unnamed");
}
More information about the llvm-commits
mailing list