[ASan] Make GlobalsMD member a const reference.
authorLeonard Chan <leonardchan@google.com>
Tue, 1 Oct 2019 20:30:46 +0000 (20:30 +0000)
committerLeonard Chan <leonardchan@google.com>
Tue, 1 Oct 2019 20:30:46 +0000 (20:30 +0000)
commit63663616f5a098e5c789fd91361312f4869f00de
tree611460070e97bf51ccedc34ba5b1d3bae5bb7cff
parent603650213b1aee2a03ba879ba9d8e6eb65a06694
[ASan] Make GlobalsMD member a const reference.

PR42924 points out that copying the GlobalsMetadata type during
construction of AddressSanitizer can result in exteremely lengthened
build times for translation units that have many globals. This can be addressed
by just making the GlobalsMD member in AddressSanitizer a reference to
avoid the copy. The GlobalsMetadata type is already passed to the
constructor as a reference anyway.

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

llvm-svn: 373389
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp