summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-06-15 20:55:51 +0000
committerZachary Turner <zturner@google.com>2017-06-15 20:55:51 +0000
commitda504b794cf3154ec9b3f0fb728f1b3880a8bb77 (patch)
tree95d7f819b11df9e7368116ed40595259d29bc539 /llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp
parent60aac43813beccb33f72d15967ae4f21a789238d (diff)
downloadbcm5719-llvm-da504b794cf3154ec9b3f0fb728f1b3880a8bb77.tar.gz
bcm5719-llvm-da504b794cf3154ec9b3f0fb728f1b3880a8bb77.zip
Revert "[llvm-pdbutil] rewrite the "raw" output style."
This reverts commit 83ea17ebf2106859a51fbc2a86031b44d33696ad. This is failing due to some strange template problems, so reverting until it can be straightened out. llvm-svn: 305505
Diffstat (limited to 'llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp')
-rw-r--r--llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp21
1 files changed, 7 insertions, 14 deletions
diff --git a/llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp b/llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp
index ae3138efb13..8f7aba6d30c 100644
--- a/llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp
+++ b/llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp
@@ -32,13 +32,6 @@ using namespace llvm;
using namespace llvm::codeview;
using namespace llvm::pdb;
-static bool checkModuleSubsection(opts::ModuleSubsection MS) {
- return any_of(opts::pdb2yaml::DumpModuleSubsections,
- [=](opts::ModuleSubsection M) {
- return M == MS || M == opts::ModuleSubsection::All;
- });
-}
-
YAMLOutputStyle::YAMLOutputStyle(PDBFile &File)
: File(File), Out(outs()), Obj(File.getAllocator()) {
Out.setWriteDefaultValues(!opts::pdb2yaml::Minimal);
@@ -100,8 +93,8 @@ Error YAMLOutputStyle::dumpFileHeaders() {
}
Error YAMLOutputStyle::dumpStringTable() {
- bool RequiresStringTable = opts::pdb2yaml::DumpModuleFiles ||
- !opts::pdb2yaml::DumpModuleSubsections.empty();
+ bool RequiresStringTable = opts::shared::DumpModuleFiles ||
+ !opts::shared::DumpModuleSubsections.empty();
bool RequestedStringTable = opts::pdb2yaml::StringTable;
if (!RequiresStringTable && !RequestedStringTable)
return Error::success();
@@ -208,7 +201,7 @@ Error YAMLOutputStyle::dumpDbiStream() {
Obj.DbiStream->PdbDllRbld = DS.getPdbDllRbld();
Obj.DbiStream->PdbDllVersion = DS.getPdbDllVersion();
Obj.DbiStream->VerHeader = DS.getDbiVersion();
- if (opts::pdb2yaml::DumpModules) {
+ if (opts::shared::DumpModules) {
const auto &Modules = DS.modules();
for (uint32_t I = 0; I < Modules.getModuleCount(); ++I) {
DbiModuleDescriptor MI = Modules.getModuleDescriptor(I);
@@ -218,7 +211,7 @@ Error YAMLOutputStyle::dumpDbiStream() {
DMI.Mod = MI.getModuleName();
DMI.Obj = MI.getObjFileName();
- if (opts::pdb2yaml::DumpModuleFiles) {
+ if (opts::shared::DumpModuleFiles) {
auto Files = Modules.source_files(I);
DMI.SourceFiles.assign(Files.begin(), Files.end());
}
@@ -238,7 +231,7 @@ Error YAMLOutputStyle::dumpDbiStream() {
auto ExpectedST = File.getStringTable();
if (!ExpectedST)
return ExpectedST.takeError();
- if (!opts::pdb2yaml::DumpModuleSubsections.empty() &&
+ if (!opts::shared::DumpModuleSubsections.empty() &&
ModS.hasDebugSubsections()) {
auto ExpectedChecksums = ModS.findChecksumsSubsection();
if (!ExpectedChecksums)
@@ -249,7 +242,7 @@ Error YAMLOutputStyle::dumpDbiStream() {
for (const auto &SS : ModS.subsections()) {
opts::ModuleSubsection OptionKind = convertSubsectionKind(SS.kind());
- if (!checkModuleSubsection(OptionKind))
+ if (!opts::checkModuleSubsection(OptionKind))
continue;
auto Converted =
@@ -260,7 +253,7 @@ Error YAMLOutputStyle::dumpDbiStream() {
}
}
- if (opts::pdb2yaml::DumpModuleSyms) {
+ if (opts::shared::DumpModuleSyms) {
DMI.Modi.emplace();
DMI.Modi->Signature = ModS.signature();
OpenPOWER on IntegriCloud