[MetaRenamer] Add command line options to disable renaming name with specified prefixes
authorDmitry Makogon <d.makogon@g.nsu.ru>
Thu, 9 Dec 2021 11:41:48 +0000 (18:41 +0700)
committerDmitry Makogon <d.makogon@g.nsu.ru>
Thu, 9 Dec 2021 11:45:06 +0000 (18:45 +0700)
commit0b533c18334e010878f0f94b430f669d5efbc88a
tree279c825e272c3a7825f27d4b2d7b8da15651c8fa
parentb2e2eece9aa8db4bcc47c7fed0a9b999a3d96baf
[MetaRenamer] Add command line options to disable renaming name with specified prefixes

This patch adds 4 options for specifying functions, aliases, globals and
structs name prefixes hat don't need to be renamed by MetaRenamer pass.
This is useful if one has some downstream logic that depends directly
on an entity name. MetaRenamer can break this logic, but with the patch
you can tell it not to rename certain names.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D115323
llvm/lib/Transforms/Utils/MetaRenamer.cpp
llvm/test/Transforms/MetaRenamer/exclude-names.ll [new file with mode: 0644]