summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/DebugInfo/PDB/PDBApiTest.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-04-12 23:18:21 +0000
committerZachary Turner <zturner@google.com>2017-04-12 23:18:21 +0000
commitc883a8c6dce207a494c6c3a54de1492635acb664 (patch)
treefb2ff9010b62853109fd592e006e560fc2cb4ed7 /llvm/unittests/DebugInfo/PDB/PDBApiTest.cpp
parent1b395144442f4bf872fb772c87d8b6e3bf78cfd7 (diff)
downloadbcm5719-llvm-c883a8c6dce207a494c6c3a54de1492635acb664.tar.gz
bcm5719-llvm-c883a8c6dce207a494c6c3a54de1492635acb664.zip
[llvm-pdbdump] More advanced class definition dumping.
Previously the dumping of class definitions was very primitive, and it made it hard to do more than the most trivial of output formats when dumping. As such, we would only dump one line for each field, and then dump non-layout items like nested types and enums. With this patch, we do a complete analysis of the object hierarchy including aggregate types, bases, virtual bases, vftable analysis, etc. The only immediately visible effects of this are that a) we can now dump a line for the vfptr where before we would treat that as padding, and b) we now don't treat virtual bases that come at the end of a class as padding since we have a more detailed analysis of the class's storage usage. In subsequent patches, we should be able to use this analysis to display a complete graphical view of a class's layout including recursing arbitrarily deep into an object's base class / aggregate member hierarchy. llvm-svn: 300133
Diffstat (limited to 'llvm/unittests/DebugInfo/PDB/PDBApiTest.cpp')
-rw-r--r--llvm/unittests/DebugInfo/PDB/PDBApiTest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/unittests/DebugInfo/PDB/PDBApiTest.cpp b/llvm/unittests/DebugInfo/PDB/PDBApiTest.cpp
index ba09a8e2842..6afe83cd90d 100644
--- a/llvm/unittests/DebugInfo/PDB/PDBApiTest.cpp
+++ b/llvm/unittests/DebugInfo/PDB/PDBApiTest.cpp
@@ -63,7 +63,7 @@ namespace {
class MockSession : public IPDBSession {
uint64_t getLoadAddress() const override { return 0; }
void setLoadAddress(uint64_t Address) override {}
- std::unique_ptr<PDBSymbolExe> getGlobalScope() override {
+ std::unique_ptr<PDBSymbolExe> getGlobalScope() const override {
return nullptr;
}
std::unique_ptr<PDBSymbol> getSymbolById(uint32_t SymbolId) const override {
@@ -226,6 +226,7 @@ public:
MOCK_SYMBOL_ACCESSOR(getMachineType)
MOCK_SYMBOL_ACCESSOR(getThunkOrdinal)
MOCK_SYMBOL_ACCESSOR(getLength)
+ MOCK_SYMBOL_ACCESSOR(getVirtualBaseTableType)
MOCK_SYMBOL_ACCESSOR(getLiveRangeLength)
MOCK_SYMBOL_ACCESSOR(getVirtualAddress)
MOCK_SYMBOL_ACCESSOR(getUdtKind)
OpenPOWER on IntegriCloud