diff options
author | Zachary Turner <zturner@google.com> | 2017-04-13 21:11:00 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-04-13 21:11:00 +0000 |
commit | 4dc4f01a86569977ad6fc2a0bb605731055f0a92 (patch) | |
tree | 86e89154bab5ec96eaa55ad9d395c46f6612640c /llvm/tools/llvm-pdbdump/LinePrinter.cpp | |
parent | 60f54ac8c5d46fb73d23fe45ae326d492474e57c (diff) | |
download | bcm5719-llvm-4dc4f01a86569977ad6fc2a0bb605731055f0a92.tar.gz bcm5719-llvm-4dc4f01a86569977ad6fc2a0bb605731055f0a92.zip |
[llvm-pdbdump] Recursively dump class layout.
llvm-svn: 300258
Diffstat (limited to 'llvm/tools/llvm-pdbdump/LinePrinter.cpp')
-rw-r--r-- | llvm/tools/llvm-pdbdump/LinePrinter.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/llvm/tools/llvm-pdbdump/LinePrinter.cpp b/llvm/tools/llvm-pdbdump/LinePrinter.cpp index e5dd66fd9aa..d4a5a8d859e 100644 --- a/llvm/tools/llvm-pdbdump/LinePrinter.cpp +++ b/llvm/tools/llvm-pdbdump/LinePrinter.cpp @@ -12,6 +12,7 @@ #include "llvm-pdbdump.h" #include "llvm/ADT/STLExtras.h" +#include "llvm/DebugInfo/PDB/UDTLayout.h" #include "llvm/Support/Regex.h" #include <algorithm> @@ -70,8 +71,20 @@ void LinePrinter::NewLine() { OS.indent(CurrentIndent); } -bool LinePrinter::IsTypeExcluded(llvm::StringRef TypeName) { - return IsItemExcluded(TypeName, IncludeTypeFilters, ExcludeTypeFilters); +bool LinePrinter::IsClassExcluded(const ClassLayout &Class) { + if (IsTypeExcluded(Class.getUDTName(), Class.getClassSize())) + return true; + if (Class.deepPaddingSize() < opts::pretty::PaddingThreshold) + return true; + return false; +} + +bool LinePrinter::IsTypeExcluded(llvm::StringRef TypeName, uint32_t Size) { + if (IsItemExcluded(TypeName, IncludeTypeFilters, ExcludeTypeFilters)) + return true; + if (Size < opts::pretty::SizeThreshold) + return true; + return false; } bool LinePrinter::IsSymbolExcluded(llvm::StringRef SymbolName) { |