llvm/lib
Zachary Turner b85b70f834 Fix some differences between lld and MSVC generated PDBs.
A couple of things were different about our generated PDBs.

1) We were outputting the wrong Version on the PDB Stream.
   The version we were setting was newer than what MSVC is setting.
   It's not clear what the implications are, but we change LLD
   to use PdbImplVC70, as MSVC does.
2) For the optional debug stream indices in the DBI Stream, we
   were outputting 0 to mean "the stream is not present".  MSVC
   outputs uint16_t(-1), which is the "correct" way to specify
   that a stream is not present.  So we fix that as well.
3) We were setting the PDB Stream signature to 0.  This is supposed
   to be the result of calling time(nullptr).  Although this leads
   to non-deterministic builds, a better way to solve that is by
   having a command line option explicitly for generating a
   reproducible build, and have the default behavior of lld-link
   match the default behavior of link.

To test this, I'm making use of the new and improved `pdb diff`
sub command.  To make it suitable for writing tests against, I had
to modify the diff subcommand slightly to print less verbose output.
Previously it would always print | <column> | <value1> | <value2> |
which is quite verbose, and the values are fragile.  All we really
want to know is "did we produce the same value as link?"  So I added
command line options to print a single character representing the
result status (different, identical, equivalent), and another to
hide the value display.  Note that just inspecting the diff output
used to write the test, you can see some things that are obviously
wrong.  That is just reflective of the fact that this is the state
of affairs today, not that we're asserting that this is "correct".
We can use this as a starting point to discover differences, fix
them, and update the test.

Differential Revision: https://reviews.llvm.org/D35086

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307422 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 18:45:56 +00:00
..
Analysis [DemandedBits] fix formatting; NFC 2017-07-07 14:39:26 +00:00
AsmParser Add dependency from AsmParser to BinaryFormat. 2017-06-07 04:24:33 +00:00
BinaryFormat Revert "Revert "Revert "Replace trivial use of external rc.exe by writing our own .res file.""" 2017-07-05 23:45:50 +00:00
Bitcode Bitcode: Include any strings added to the string table in the module hash. 2017-07-06 17:56:01 +00:00
CodeGen RegisterScavenging: Fix PR33687 2017-07-07 03:02:18 +00:00
DebugInfo Fix some differences between lld and MSVC generated PDBs. 2017-07-07 18:45:56 +00:00
Demangle [ItaniumDemangle] Fix a exponential string copying bug 2017-05-28 23:24:52 +00:00
ExecutionEngine [ORC] Errorize the ORC APIs. 2017-07-07 02:59:13 +00:00
Fuzzer [libFuzzer] change the default max_len from 64 to 4096. This will affect cases where libFuzzer is run w/o initial corpus or with a corpus of very small items. 2017-06-15 22:43:40 +00:00
IR [SafepointIRVerifier] Avoid false positives in GC verifier for compare between pointers 2017-07-07 13:02:29 +00:00
IRReader
LineEditor
Linker Support for taking the max of module flags when linking, use for PIE/PIC 2017-05-23 00:08:00 +00:00
LTO [LTO] Fix the interaction between linker redefined symbols and ThinLTO 2017-07-06 19:58:26 +00:00
MC [WebAssembly] Support weak defined symbols 2017-07-07 02:01:29 +00:00
Object [WebAssembly] Support weak defined symbols 2017-07-07 02:01:29 +00:00
ObjectYAML [ObjectYAML] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-07-01 01:35:55 +00:00
Option [Bash-autocompletion] Show flags which has HelpText or GroupID 2017-07-05 02:36:32 +00:00
Passes Hook the sample PGO machinery in the new PM 2017-06-29 23:33:05 +00:00
ProfileData Prototype: Reduce llvm-profdata merge memory usage further 2017-07-06 19:00:12 +00:00
Support Update the Windows version of updateTripleOSVersion to account for 2017-07-07 10:08:52 +00:00
TableGen [BinaryFormat, Option, TableGen] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-16 00:43:26 +00:00
Target [PPC CodeGen] Expand the bitreverse.i32 intrinsic. 2017-07-07 16:41:55 +00:00
Testing Mark LLVMTestingSupport as not installed in LLVMBuild. 2017-06-19 22:01:50 +00:00
ToolDrivers [GSoC] Flag value completion for clang 2017-06-20 16:31:31 +00:00
Transforms [cloning] Do not duplicate types when cloning functions 2017-07-07 18:24:20 +00:00
XRay Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
CMakeLists.txt [gtest] Create a shared include directory for gtest utilities. 2017-06-14 16:41:50 +00:00
LLVMBuild.txt [gtest] Create a shared include directory for gtest utilities. 2017-06-14 16:41:50 +00:00