1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/unittests/DebugInfo
Zachary Turner ae9d9f3bb3 [PDB] Fix linking of function symbols and local variables.
The compiler outputs PROC32_ID symbols into the object files
for functions, and these symbols have an embedded type index
which, when copied to the PDB, refer to the IPI stream.  However,
the symbols themselves are also converted into regular symbols
(e.g. S_GPROC32_ID -> S_GPROC32), and type indices in the regular
symbol records refer to the TPI stream.  So this patch applies
two fixes to function records.
  1. It converts ID symbols to the proper non-ID record type.
  2. After remapping the type index from the object file's index
     space to the PDB file/IPI stream's index space, it then
     remaps that index to the TPI stream's index space by.

Besides functions, during the remapping process we were also
discarding symbol record types which we did not recognize.
In particular, we were discarding S_BPREL32 records, which is
what MSVC uses to describe local variables on the stack.  So
this patch fixes that as well by copying them to the PDB.

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

llvm-svn: 310394
2017-08-08 18:34:44 +00:00
..
CodeView [PDB] Fix linking of function symbols and local variables. 2017-08-08 18:34:44 +00:00
DWARF Don't pass the code model to MC 2017-08-02 20:32:26 +00:00
MSF [pdb/lld] Write a valid FPM. 2017-08-02 22:31:39 +00:00
PDB [MSF] Move MSF unit tests to their own unittest target. 2017-08-02 22:26:09 +00:00
CMakeLists.txt [MSF] Move MSF unit tests to their own unittest target. 2017-08-02 22:26:09 +00:00