[ASAN] Add doFinalization to reset state
authorKeno Fischer <kfischer@college.harvard.edu>
Sat, 5 Dec 2015 14:42:34 +0000 (14:42 +0000)
committerKeno Fischer <kfischer@college.harvard.edu>
Sat, 5 Dec 2015 14:42:34 +0000 (14:42 +0000)
commitb2387dc751b88b853072fd679fb85ae7dc92e003
treef7efa63ccafbf75479ecafed521bfe7971395f51
parent092921b3d817e8c63e565a633067e2927aa5c85a
[ASAN] Add doFinalization to reset state

Summary: If the same pass manager is used for multiple modules ASAN
complains about GlobalsMD being initialized twice. Fix this by
resetting GlobalsMD in a new doFinalization method to allow this
use case.

Reviewers: kcc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D14962

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254851 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Instrumentation/AddressSanitizer.cpp
test/Instrumentation/AddressSanitizer/twice.ll [new file with mode: 0644]