[llvm-pdbdump] Add support for printing source files and compilands.

This adds two command line options to llvm-pdbdump.

--source-files prints a flat list of all source files in the PDB.

--compilands prints a list of all compilands (e.g. object files)
             that the PDB knows about, and for each one, a list of
             source files that the compiland is composed of as well
             as a hash of the original source file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227276 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Zachary Turner
2015-01-28 00:33:00 +00:00
parent 63f47de72c
commit e32b7636e7
3 changed files with 149 additions and 5 deletions

View File

@@ -174,3 +174,16 @@ raw_ostream &llvm::operator<<(raw_ostream &Stream,
outs() << " {" << llvm::format_hex((DWORD)MachineType, 2, true) << "}";
return Stream;
}
raw_ostream &llvm::operator<<(raw_ostream &Stream, HashAlgorithm Algorithm) {
switch (Algorithm) {
PRINT_ENUM_VALUE_CASE(HashNone, "None")
PRINT_ENUM_VALUE_CASE(HashMD5, "MD5")
PRINT_ENUM_VALUE_CASE(HashSHA1, "SHA-1")
default:
outs() << "(Unknown)";
break;
}
outs() << " {" << (DWORD)Algorithm << "}";
return Stream;
}