2 Commits

Author SHA1 Message Date
Vedant Kumar
9e729a33ef [opt] Introduce -strip-named-metadata
This renames and generalizes -strip-module-flags to erase all named
metadata from a module. This makes it easier to diff IR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333977 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-05 00:56:08 +00:00
Vedant Kumar
701cfb8f82 [opt] Add a -strip-module-flags option
The -strip-module-flags option strips llvm.module.flags metadata from a
module at the beginning of the opt pipeline.

This will be used to test whether the output of a pass is debug info
(DI) invariant.

E.g, after applying synthetic debug info to a test case, we'd like to
strip out all DI-related metadata and check that the final IR is
identical to a baseline file without any DI applied, to check that
optimizations aren't inhibited by debug info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333860 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-04 00:11:48 +00:00