644 changes: 0 additions & 644 deletions llvm/tools/llvm-pdbutil/Diff.cpp

This file was deleted.

45 changes: 0 additions & 45 deletions llvm/tools/llvm-pdbutil/Diff.h

This file was deleted.

147 changes: 0 additions & 147 deletions llvm/tools/llvm-pdbutil/DiffPrinter.cpp

This file was deleted.

172 changes: 0 additions & 172 deletions llvm/tools/llvm-pdbutil/DiffPrinter.h

This file was deleted.

73 changes: 0 additions & 73 deletions llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

#include "Analyze.h"
#include "BytesOutputStyle.h"
#include "Diff.h"
#include "DumpOutputStyle.h"
#include "InputFile.h"
#include "LinePrinter.h"
Expand Down Expand Up @@ -98,8 +97,6 @@ cl::SubCommand
PrettySubcommand("pretty",
"Dump semantic information about types and symbols");

cl::SubCommand DiffSubcommand("diff", "Diff the contents of 2 PDB files");

cl::SubCommand
YamlToPdbSubcommand("yaml2pdb",
"Generate a PDB file from a YAML description");
Expand Down Expand Up @@ -295,44 +292,6 @@ cl::opt<bool> NoEnumDefs("no-enum-definitions",
cl::cat(FilterCategory), cl::sub(PrettySubcommand));
}

namespace diff {
cl::opt<bool> PrintValueColumns(
"values", cl::init(true),
cl::desc("Print one column for each PDB with the field value"),
cl::Optional, cl::sub(DiffSubcommand));
cl::opt<bool>
PrintResultColumn("result", cl::init(false),
cl::desc("Print a column with the result status"),
cl::Optional, cl::sub(DiffSubcommand));

cl::list<std::string>
RawModiEquivalences("modi-equivalence", cl::ZeroOrMore,
cl::value_desc("left,right"),
cl::desc("Modules with the specified indices will be "
"treated as referring to the same module"),
cl::sub(DiffSubcommand));

cl::opt<std::string> LeftRoot(
"left-bin-root", cl::Optional,
cl::desc("Treats the specified path as the root of the tree containing "
"binaries referenced by the left PDB. The root is stripped from "
"embedded paths when doing equality comparisons."),
cl::sub(DiffSubcommand));
cl::opt<std::string> RightRoot(
"right-bin-root", cl::Optional,
cl::desc("Treats the specified path as the root of the tree containing "
"binaries referenced by the right PDB. The root is stripped from "
"embedded paths when doing equality comparisons"),
cl::sub(DiffSubcommand));

cl::opt<std::string> Left(cl::Positional, cl::desc("<left>"),
cl::sub(DiffSubcommand));
cl::opt<std::string> Right(cl::Positional, cl::desc("<right>"),
cl::sub(DiffSubcommand));

llvm::DenseMap<uint32_t, uint32_t> Equivalences;
}

cl::OptionCategory FileOptions("Module & File Options");

namespace bytes {
Expand Down Expand Up @@ -802,18 +761,6 @@ static void dumpAnalysis(StringRef Path) {
ExitOnErr(O->dump());
}

static void diff(StringRef Path1, StringRef Path2) {
std::unique_ptr<IPDBSession> Session1;
std::unique_ptr<IPDBSession> Session2;

auto &File1 = loadPDB(Path1, Session1);
auto &File2 = loadPDB(Path2, Session2);

auto O = llvm::make_unique<DiffStyle>(File1, File2);

ExitOnErr(O->dump());
}

bool opts::pretty::shouldDumpSymLevel(SymLevel Search) {
if (SymTypes.empty())
return true;
Expand Down Expand Up @@ -1241,11 +1188,6 @@ int main(int argc_, const char *argv_[]) {
if (opts::pdb2yaml::DumpModules)
opts::pdb2yaml::DbiStream = true;
}
if (opts::DiffSubcommand) {
if (!opts::diff::PrintResultColumn && !opts::diff::PrintValueColumns) {
llvm::errs() << "WARNING: No diff columns specified\n";
}
}

llvm::sys::InitializeCOMRAII COM(llvm::sys::COMThreadingMode::MultiThreaded);

Expand Down Expand Up @@ -1300,21 +1242,6 @@ int main(int argc_, const char *argv_[]) {
llvm::for_each(opts::dump::InputFilenames, dumpRaw);
} else if (opts::BytesSubcommand) {
llvm::for_each(opts::bytes::InputFilenames, dumpBytes);
} else if (opts::DiffSubcommand) {
for (StringRef S : opts::diff::RawModiEquivalences) {
StringRef Left;
StringRef Right;
std::tie(Left, Right) = S.split(',');
uint32_t X, Y;
if (!to_integer(Left, X) || !to_integer(Right, Y)) {
errs() << formatv("invalid value {0} specified for modi equivalence\n",
S);
exit(1);
}
opts::diff::Equivalences[X] = Y;
}

diff(opts::diff::Left, opts::diff::Right);
} else if (opts::MergeSubcommand) {
if (opts::merge::InputFilenames.size() < 2) {
errs() << "merge subcommand requires at least 2 input files.\n";
Expand Down
7 changes: 0 additions & 7 deletions llvm/tools/llvm-pdbutil/llvm-pdbutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,6 @@ extern llvm::cl::list<ModuleSubsection> DumpModuleSubsections;
extern llvm::cl::opt<bool> DumpModuleSyms;
} // namespace pdb2yaml

namespace diff {
extern llvm::cl::opt<bool> PrintValueColumns;
extern llvm::cl::opt<bool> PrintResultColumn;
extern llvm::DenseMap<uint32_t, uint32_t> Equivalences;
extern llvm::cl::opt<std::string> LeftRoot;
extern llvm::cl::opt<std::string> RightRoot;
} // namespace diff
}

#endif