OSDN Git Service

Resubmit "Add pdb-diff test."
authorZachary Turner <zturner@google.com>
Mon, 10 Jul 2017 19:16:49 +0000 (19:16 +0000)
committerZachary Turner <zturner@google.com>
Mon, 10 Jul 2017 19:16:49 +0000 (19:16 +0000)
commit8f321099a36be24bbab44bfb6929e3ed86eff1f5
tree22c13f99c6e140e78ca25f3c4fe9d9e5c60d1db4
parentf3550754a5798c26852c43345448a4901915ae8f
Resubmit "Add pdb-diff test."

This was originally reverted because of two issues.
  1) Printing ANSI color escape codes even when outputting to
     a file
  2) Module name comparisons were failing when comparing a PDB
     generated on one machine to a PDB generated on another
     machine.

I attempted to fix #2 by adding command line options which let
you specify prefixes to strip from the beginning of embedded
paths, which effectively lets us specify a path to "base" each
PDB from and only compare the parts under the base.  But this is
tricky because PDB paths always use Windows path syntax, even
when they are created on non-Windows hosts.  A problem still
existed when constructing the prefix to strip, where we were
accidentally using a host-specific path separator instead of
a Windows path separator.

This resubmission fixes the issue on Linux (and I have verified
that the test now passes on Linux).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307571 91177308-0d34-0410-b5e6-96231b3b80d8
tools/llvm-pdbutil/Diff.cpp
tools/llvm-pdbutil/DiffPrinter.cpp
tools/llvm-pdbutil/DiffPrinter.h
tools/llvm-pdbutil/StreamUtil.cpp
tools/llvm-pdbutil/StreamUtil.h
tools/llvm-pdbutil/llvm-pdbutil.cpp
tools/llvm-pdbutil/llvm-pdbutil.h