OSDN Git Service

[lld] Fix a bug where we continually re-follow type servers.
authorZachary Turner <zturner@google.com>
Thu, 25 May 2017 21:16:03 +0000 (21:16 +0000)
committerZachary Turner <zturner@google.com>
Thu, 25 May 2017 21:16:03 +0000 (21:16 +0000)
commit064b7cce39dd72b0452b59648fcca1e90c7654c3
tree940ad9f555db32c24c2c92f1ab9d76eeda539745
parent522178bccc18c87675d5aa21f1e0a8f1dcc4d908
[lld] Fix a bug where we continually re-follow type servers.

Originally this was intended to be set up so that when linking
a PDB which refers to a type server, it would only visit the
PDB once, and on subsequent visitations it would just skip it
since all the records had already been added.

Due to some C++ scoping issues, this was not occurring and it
was revisiting the type server every time, which caused every
record to end up being thrown away on all subsequent visitations.

This doesn't affect the performance of linking clang-cl generated
object files because we don't use type servers, but when linking
object files and libraries generated with /Zi via MSVC, this means
only 1 object file has to be linked instead of N object files, so
the speedup is quite large.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303920 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/DebugInfo/PDB/Native/PDBTypeServerHandler.h
lib/DebugInfo/PDB/Native/PDBTypeServerHandler.cpp