summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-04-29 17:28:47 +0000
committerZachary Turner <zturner@google.com>2016-04-29 17:28:47 +0000
commit2f09b5091ce055dbc3a803ecb2576540d6abb503 (patch)
tree13a919a417b0870502c6b5c87daa56aa55ed803f /llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp
parent6ba65deeb9b017e4144cdae341dcb9e3564c7c7b (diff)
downloadbcm5719-llvm-2f09b5091ce055dbc3a803ecb2576540d6abb503.tar.gz
bcm5719-llvm-2f09b5091ce055dbc3a803ecb2576540d6abb503.zip
Put PDB parsing code into a pdb namespace.
llvm-svn: 268072
Diffstat (limited to 'llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp')
-rw-r--r--llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp b/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp
index 45096daf097..fec28a9391f 100644
--- a/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp
+++ b/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp
@@ -35,11 +35,11 @@
#include "llvm/DebugInfo/PDB/PDBSymbolExe.h"
#include "llvm/DebugInfo/PDB/PDBSymbolFunc.h"
#include "llvm/DebugInfo/PDB/PDBSymbolThunk.h"
+#include "llvm/DebugInfo/PDB/Raw/DbiStream.h"
+#include "llvm/DebugInfo/PDB/Raw/InfoStream.h"
#include "llvm/DebugInfo/PDB/Raw/MappedBlockStream.h"
#include "llvm/DebugInfo/PDB/Raw/ModInfo.h"
-#include "llvm/DebugInfo/PDB/Raw/PDBDbiStream.h"
#include "llvm/DebugInfo/PDB/Raw/PDBFile.h"
-#include "llvm/DebugInfo/PDB/Raw/PDBInfoStream.h"
#include "llvm/DebugInfo/PDB/Raw/RawSession.h"
#include "llvm/DebugInfo/PDB/Raw/StreamReader.h"
#include "llvm/Support/CommandLine.h"
@@ -61,6 +61,7 @@
#endif
using namespace llvm;
+using namespace llvm::pdb;
namespace opts {
@@ -237,15 +238,15 @@ static void dumpStructure(RawSession &RS) {
}
}
- PDBInfoStream &InfoStream = File.getPDBInfoStream();
- outs() << "Version: " << InfoStream.getVersion() << '\n';
+ InfoStream &IS = File.getPDBInfoStream();
+ outs() << "Version: " << IS.getVersion() << '\n';
outs() << "Signature: ";
- outs().write_hex(InfoStream.getSignature()) << '\n';
- outs() << "Age: " << InfoStream.getAge() << '\n';
- outs() << "Guid: " << InfoStream.getGuid() << '\n';
+ outs().write_hex(IS.getSignature()) << '\n';
+ outs() << "Age: " << IS.getAge() << '\n';
+ outs() << "Guid: " << IS.getGuid() << '\n';
// Let's try to dump out the named stream "/names".
- uint32_t NameStreamIndex = InfoStream.getNamedStreamIndex("/names");
+ uint32_t NameStreamIndex = IS.getNamedStreamIndex("/names");
if (NameStreamIndex != 0) {
MappedBlockStream NameStream(NameStreamIndex, File);
StreamReader Reader(NameStream);
@@ -267,24 +268,23 @@ static void dumpStructure(RawSession &RS) {
reportError("", std::make_error_code(std::errc::not_supported));
}
- PDBDbiStream &DbiStream = File.getPDBDbiStream();
- outs() << "Dbi Version: " << DbiStream.getDbiVersion() << '\n';
- outs() << "Age: " << DbiStream.getAge() << '\n';
- outs() << "Incremental Linking: " << DbiStream.isIncrementallyLinked()
- << '\n';
- outs() << "Has CTypes: " << DbiStream.hasCTypes() << '\n';
- outs() << "Is Stripped: " << DbiStream.isStripped() << '\n';
- outs() << "Machine Type: " << DbiStream.getMachineType() << '\n';
- outs() << "Number of Symbols: " << DbiStream.getNumberOfSymbols() << '\n';
-
- uint16_t Major = DbiStream.getBuildMajorVersion();
- uint16_t Minor = DbiStream.getBuildMinorVersion();
+ DbiStream &DS = File.getPDBDbiStream();
+ outs() << "Dbi Version: " << DS.getDbiVersion() << '\n';
+ outs() << "Age: " << DS.getAge() << '\n';
+ outs() << "Incremental Linking: " << DS.isIncrementallyLinked() << '\n';
+ outs() << "Has CTypes: " << DS.hasCTypes() << '\n';
+ outs() << "Is Stripped: " << DS.isStripped() << '\n';
+ outs() << "Machine Type: " << DS.getMachineType() << '\n';
+ outs() << "Number of Symbols: " << DS.getNumberOfSymbols() << '\n';
+
+ uint16_t Major = DS.getBuildMajorVersion();
+ uint16_t Minor = DS.getBuildMinorVersion();
outs() << "Toolchain Version: " << Major << "." << Minor << '\n';
outs() << "mspdb" << Major << Minor << ".dll version: " << Major << "."
- << Minor << "." << DbiStream.getPdbDllVersion() << '\n';
+ << Minor << "." << DS.getPdbDllVersion() << '\n';
outs() << "Modules: \n";
- for (auto &Modi : DbiStream.modules()) {
+ for (auto &Modi : DS.modules()) {
outs() << Modi.Info.getModuleName() << '\n';
outs().indent(4) << "Debug Stream Index: "
<< Modi.Info.getModuleStreamIndex() << '\n';
OpenPOWER on IntegriCloud