Final fix for PR 23499 and IR test case.
authorDiego Novillo <dnovillo@google.com>
Wed, 27 May 2015 19:34:01 +0000 (19:34 +0000)
committerDiego Novillo <dnovillo@google.com>
Wed, 27 May 2015 19:34:01 +0000 (19:34 +0000)
commitb72f3e0d320eb05d24e61380289f209290aafe45
tree742dc6b97efc74855b9796211a3d6153691e5bd2
parent3c41ae83f2938c231d9c05b28ee7e8a1fffcaa20
Final fix for PR 23499 and IR test case.

This fixes a bit I forgot in r238335. In addition to the data record and
the counter, we can also move the name of the counter to the comdat for
the associated function.

I'm also adding an IR test case to check that these three elements are
placed in the proper comdat.

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