diff options
author | Adrian McCarthy <amccarth@google.com> | 2017-08-04 22:37:58 +0000 |
---|---|---|
committer | Adrian McCarthy <amccarth@google.com> | 2017-08-04 22:37:58 +0000 |
commit | b41f03e768282b44519d7cce763e1879b02b8471 (patch) | |
tree | 5c7c2da8635b279796609d62b31737851e5ebcf9 /llvm/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp | |
parent | 886b30c4fffe8367214de3121aac7bde184b6bef (diff) | |
download | bcm5719-llvm-b41f03e768282b44519d7cce763e1879b02b8471.tar.gz bcm5719-llvm-b41f03e768282b44519d7cce763e1879b02b8471.zip |
Enable llvm-pdbutil to list enumerations using native PDB reader
This extends the native reader to enable llvm-pdbutil to list the enums in a
PDB and it includes a simple test. It does not yet list the values in the
enumerations, which requires an actual implementation of
NativeEnumSymbol::FindChildren.
To exercise this code, use a command like:
llvm-pdbutil pretty -native -enums foo.pdb
Differential Revision: https://reviews.llvm.org/D35738
llvm-svn: 310144
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp index 3241000b06d..b29d589eaa9 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp @@ -13,7 +13,9 @@ #include "llvm/DebugInfo/PDB/Native/DbiStream.h" #include "llvm/DebugInfo/PDB/Native/InfoStream.h" #include "llvm/DebugInfo/PDB/Native/NativeEnumModules.h" +#include "llvm/DebugInfo/PDB/Native/NativeEnumTypes.h" #include "llvm/DebugInfo/PDB/Native/PDBFile.h" +#include "llvm/DebugInfo/PDB/Native/TpiStream.h" namespace llvm { namespace pdb { @@ -38,6 +40,8 @@ NativeExeSymbol::findChildren(PDB_SymType Type) const { consumeError(Dbi.takeError()); break; } + case PDB_SymType::Enum: + return Session.createTypeEnumerator(codeview::LF_ENUM); default: break; } |