diff options
author | Thomas Lively <tlively@google.com> | 2021-06-17 07:28:44 -0700 |
---|---|---|
committer | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2021-06-17 14:35:56 -0400 |
commit | ea0b9ee1e1083962da9bfa52fa09870fcc4f72bb (patch) | |
tree | 57503487eaf47f18d93e5601f402084c94b7ad46 /src/passes/pass.cpp | |
parent | 8de4349ebdb6ce398ef4939f9f375a7413d99b09 (diff) | |
download | binaryen-ea0b9ee1e1083962da9bfa52fa09870fcc4f72bb.tar.gz binaryen-ea0b9ee1e1083962da9bfa52fa09870fcc4f72bb.tar.bz2 binaryen-ea0b9ee1e1083962da9bfa52fa09870fcc4f72bb.zip |
Add a extract-function-index pass
This is a useful alternative to extract-function when you don't know the
function's name.
Also moves the extract-function tests to be lit tests and re-uses them as
extract-function-index tests.
Diffstat (limited to 'src/passes/pass.cpp')
-rw-r--r-- | src/passes/pass.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/passes/pass.cpp b/src/passes/pass.cpp index 89b367272..10a688313 100644 --- a/src/passes/pass.cpp +++ b/src/passes/pass.cpp @@ -129,6 +129,9 @@ void PassRegistry::registerPasses() { registerPass("extract-function", "leaves just one function (useful for debugging)", createExtractFunctionPass); + registerPass("extract-function-index", + "leaves just one function selected by index", + createExtractFunctionIndexPass); registerPass( "flatten", "flattens out code, removing nesting", createFlattenPass); registerPass("fpcast-emu", |