aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-06-15 23:56:19 +0000
committerZachary Turner <zturner@google.com>2017-06-15 23:56:19 +0000
commit4e950647fb56f4ed019cfb2c12ce62bbdf002cf9 (patch)
tree399b51deb3b98a10bc1da3ffd28b7b1aa8762243 /llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp
parent948a59661787f151f70ac59363729d63f92c56e3 (diff)
downloadllvm-4e950647fb56f4ed019cfb2c12ce62bbdf002cf9.zip
llvm-4e950647fb56f4ed019cfb2c12ce62bbdf002cf9.tar.gz
llvm-4e950647fb56f4ed019cfb2c12ce62bbdf002cf9.tar.bz2
[llvm-pdbutil] Add support for dumping lines and inlinee lines.
llvm-svn: 305529
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp')
-rw-r--r--llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp b/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp
index 1254e23..a9597cd 100644
--- a/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp
+++ b/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp
@@ -363,6 +363,16 @@ Expected<PDBStringTable &> PDBFile::getStringTable() {
return *Strings;
}
+uint32_t PDBFile::getPointerSize() {
+ auto DbiS = getPDBDbiStream();
+ if (!DbiS)
+ return 0;
+ PDB_Machine Machine = DbiS->getMachineType();
+ if (Machine == PDB_Machine::Amd64)
+ return 8;
+ return 4;
+}
+
bool PDBFile::hasPDBDbiStream() const { return StreamDBI < getNumStreams(); }
bool PDBFile::hasPDBGlobalsStream() {