Swift SIL: add some APIs

* `Options.assertConfiguration`
* `Argument.isIndirectResult`
* in `Function`: `selfArgument`, `isTransparent`, `performanceConstraints` and `inlineStrategy`
* `BuiltinInst.substitutionMap`
* `SubstitutionMap.replacementTypes`
* `Type.canBeClass`
This commit is contained in:
Erik Eckstein
2023-05-09 20:27:19 +02:00
parent 82734b6ac2
commit b9169064c6
9 changed files with 143 additions and 0 deletions

View File

@@ -431,6 +431,17 @@ struct BridgedPassContext {
return mod->getOptions().EnableMoveInoutStackProtection;
}
enum class AssertConfiguration {
Debug = swift::SILOptions::Debug,
Release = swift::SILOptions::Release,
Unchecked = swift::SILOptions::Unchecked
};
AssertConfiguration getAssertConfiguration() const {
swift::SILModule *mod = invocation->getPassManager()->getModule();
return (AssertConfiguration)mod->getOptions().AssertConfig;
}
bool enableSimplificationFor(BridgedInstruction inst) const;
};