aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/DebugInfo/PDB/PDBSymbolData.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-02-12 21:09:24 +0000
committerZachary Turner <zturner@google.com>2015-02-12 21:09:24 +0000
commitc074de041b92af6a8279ea84a3675ab79579ec20 (patch)
tree6dba14e46c1e40f84304087e8ded45dfa6ac04f6 /llvm/lib/DebugInfo/PDB/PDBSymbolData.cpp
parentcf7d164ec1c85e9f4d7a1508486342b67828e408 (diff)
downloadllvm-c074de041b92af6a8279ea84a3675ab79579ec20.zip
llvm-c074de041b92af6a8279ea84a3675ab79579ec20.tar.gz
llvm-c074de041b92af6a8279ea84a3675ab79579ec20.tar.bz2
Add concrete type overloads to PDBSymbol::findChildren().
Frequently you only want to iterate over children of a specific type (e.g. functions). Previously you would get back a generic interface that allowed iteration over the base symbol type, which you would have to dyn_cast<> each one of. With this patch, we allow the user to specify the concrete type as a template parameter, and it will return an iterator which returns instances of the concrete type directly. llvm-svn: 228960
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/PDBSymbolData.cpp')
-rw-r--r--llvm/lib/DebugInfo/PDB/PDBSymbolData.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/PDB/PDBSymbolData.cpp b/llvm/lib/DebugInfo/PDB/PDBSymbolData.cpp
index f605af2..bffad8a 100644
--- a/llvm/lib/DebugInfo/PDB/PDBSymbolData.cpp
+++ b/llvm/lib/DebugInfo/PDB/PDBSymbolData.cpp
@@ -25,9 +25,11 @@ void PDBSymbolData::dump(raw_ostream &OS, int Indent,
if (Level == PDB_DumpLevel::Compact) {
PDB_LocType Loc = getLocationType();
OS << Loc << " data [";
+ int Length;
switch (Loc) {
case PDB_LocType::Static:
OS << format_hex(getRelativeVirtualAddress(), 10);
+ Length = getLength();
break;
case PDB_LocType::TLS:
OS << getAddressSection() << ":" << format_hex(getAddressOffset(), 10);