llvm-project/llvm/test/Transforms/StripSymbols
Davide Italiano 84bd58e915 [opt] Strip coverage if debug info is not present.
If -coverage is passed, but -g is not, clang populates the PassManager
pipeline with StripSymbols(debugOnly = true).
The stripSymbol pass therefore scans the list of named metadata,
drops !llvm.dbg.cu, but leaves !llvm.gcov and !0 (the compileUnit MD)
around. The verifier runs, and finds out that there's a CU not listed
in !llvm.dbg.cu (as it was previously dropped) -> crash.
When we strip debug info, so, check if there's coverage data,
and strip it as well, in order to avoid pending metadata left around.

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

llvm-svn: 284418
2016-10-17 20:05:35 +00:00
..
2007-01-15-llvm.used.ll
2010-06-30-StripDebug.ll DebugInfo: New metadata representation for global variables. 2016-09-13 01:12:59 +00:00
2010-08-25-crash.ll [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
block-address.ll
strip-cov.ll [opt] Strip coverage if debug info is not present. 2016-10-17 20:05:35 +00:00
strip-dead-debug-info.ll DebugInfo: New metadata representation for global variables. 2016-09-13 01:12:59 +00:00