diff options
author | Zachary Turner <zturner@google.com> | 2017-02-01 18:30:22 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-02-01 18:30:22 +0000 |
commit | d50c01308e670a9a4feaa5b419dedc8e5dcf7cb5 (patch) | |
tree | 61b9c4528793a514129c002e4eb8721f8ca95256 /llvm/lib/DebugInfo/CodeView | |
parent | cb4ceeda7f9a19a7ff36f4e75815ae4e4ddb1bc1 (diff) | |
download | bcm5719-llvm-d50c01308e670a9a4feaa5b419dedc8e5dcf7cb5.tar.gz bcm5719-llvm-d50c01308e670a9a4feaa5b419dedc8e5dcf7cb5.zip |
[pdb] Add a new command for analyzing hash collisions.
This introduces the `analyze` subcommand. For now there is only
one option, to analyze hash collisions in the type streams. In
the future, however, we could add many more things here, such
as performing size analyses, compacting, and statistics about
the type of records etc.
llvm-svn: 293795
Diffstat (limited to 'llvm/lib/DebugInfo/CodeView')
-rw-r--r-- | llvm/lib/DebugInfo/CodeView/TypeDatabase.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/CodeView/TypeDatabase.cpp b/llvm/lib/DebugInfo/CodeView/TypeDatabase.cpp index aec9e2d904f..f9ded6ce2a8 100644 --- a/llvm/lib/DebugInfo/CodeView/TypeDatabase.cpp +++ b/llvm/lib/DebugInfo/CodeView/TypeDatabase.cpp @@ -106,6 +106,10 @@ StringRef TypeDatabase::getTypeName(TypeIndex Index) const { return "<unknown UDT>"; } +const CVType &TypeDatabase::getTypeRecord(TypeIndex Index) const { + return TypeRecords[Index.getIndex() - TypeIndex::FirstNonSimpleIndex]; +} + bool TypeDatabase::containsTypeIndex(TypeIndex Index) const { uint32_t I = Index.getIndex() - TypeIndex::FirstNonSimpleIndex; return I < CVUDTNames.size(); |