libswift: Infrastructure to call libswift function passes from the SILOptimizer's PassManager

With the macro SWIFT_FUNCTION_PASS a new libswift function pass can be defined in Passes.def.
The SWIFT_FUNCTION_PASS_WITH_LEGACY is similar, but it allows to keep an original C++ “legacy” implementation of the pass, which is used if the compiler is not built with libswift.
This commit is contained in:
Erik Eckstein
2021-04-23 19:35:48 +02:00
parent b82173e0c6
commit 81f5e2f467
14 changed files with 345 additions and 3 deletions

View File

@@ -3,3 +3,8 @@ module SILBridging {
export *
}
module OptimizerBridging {
header "SILOptimizer/OptimizerBridging.h"
export *
}