aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2016-07-01 18:43:29 +0000
committerReid Kleckner <rnk@google.com>2016-07-01 18:43:29 +0000
commit6e96a4c64a90e78602adae215989edfe9d0f63c7 (patch)
tree13e63ade3889406ba54fff97dfac1fac89be04a7 /llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp
parenta89746907fa675380b42f984ed00cabf40ab6444 (diff)
downloadllvm-6e96a4c64a90e78602adae215989edfe9d0f63c7.zip
llvm-6e96a4c64a90e78602adae215989edfe9d0f63c7.tar.gz
llvm-6e96a4c64a90e78602adae215989edfe9d0f63c7.tar.bz2
[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
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp')
-rw-r--r--llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp b/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp
index 016c51b..6c5dd93 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 <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");
}