]> granicus.if.org Git - llvm/commit
InstrProf: Lower coverage mappings by setting their sections appropriately
authorJustin Bogner <mail@justinbogner.com>
Wed, 11 Feb 2015 02:52:44 +0000 (02:52 +0000)
committerJustin Bogner <mail@justinbogner.com>
Wed, 11 Feb 2015 02:52:44 +0000 (02:52 +0000)
commit167ce4489cabd2cd2a4ea3acc8e2f45b478337a6
treebb7e61b34896a6a13dbd7e46500529f166a64748
parenta73810650ebde45bb7b5248e2c5e8b9b3248d332
InstrProf: Lower coverage mappings by setting their sections appropriately

Add handling for __llvm_coverage_mapping to the InstrProfiling
pass. We need to make sure the constant and any profile names it
refers to are in the correct sections, which is easier and cleaner to
do here where we have to know about profiling sections anyway.

This is really tricky to test without a frontend, so I'm committing
the test for the fix in clang. If anyone knows a good way to test this
within LLVM, please let me know.

Fixes PR22531.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228793 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Instrumentation/InstrProfiling.cpp