@@ -237,6 +237,10 @@ struct BridgedFunction {
237237 return getFunction ()->isAvailableExternally ();
238238 }
239239
240+ bool isTransparent () const {
241+ return getFunction ()->isTransparent () == swift::IsTransparent;
242+ }
243+
240244 bool isGlobalInitFunction () const {
241245 return getFunction ()->isGlobalInit ();
242246 }
@@ -253,6 +257,20 @@ struct BridgedFunction {
253257 return getFunction ()->getEffectsKind ();
254258 }
255259
260+ swift::PerformanceConstraints getPerformanceConstraints () const {
261+ return getFunction ()->getPerfConstraints ();
262+ }
263+
264+ enum class InlineStrategy {
265+ InlineDefault = swift::InlineDefault,
266+ NoInline = swift::NoInline,
267+ AlwaysInline = swift::AlwaysInline
268+ };
269+
270+ InlineStrategy getInlineStrategy () const {
271+ return (InlineStrategy)getFunction ()->getInlineStrategy ();
272+ }
273+
256274 bool needsStackProtection () const {
257275 return getFunction ()->needsStackProtection ();
258276 }
@@ -364,6 +382,25 @@ struct OptionalBridgedInstruction {
364382 }
365383};
366384
385+ struct BridgedTypeArray {
386+ llvm::ArrayRef<swift::Type> typeArray;
387+
388+ SWIFT_IMPORT_UNSAFE
389+ static BridgedTypeArray fromReplacementTypes (swift::SubstitutionMap substMap) {
390+ return {substMap.getReplacementTypes ()};
391+ }
392+
393+ SwiftInt getCount () const { return SwiftInt (typeArray.size ()); }
394+
395+ SWIFT_IMPORT_UNSAFE
396+ swift::SILType getAt (SwiftInt index) const {
397+ auto ty = swift::CanType (typeArray[index]);
398+ if (ty->isLegalSILType ())
399+ return swift::SILType::getPrimitiveObjectType (ty);
400+ return swift::SILType ();
401+ }
402+ };
403+
367404struct BridgedInstruction {
368405 SwiftObject obj;
369406
@@ -457,6 +494,12 @@ struct BridgedInstruction {
457494 return getAs<swift::BuiltinInst>()->getBuiltinInfo ().ID ;
458495 }
459496
497+ SWIFT_IMPORT_UNSAFE
498+ swift::SubstitutionMap BuiltinInst_getSubstitutionMap () const {
499+ return getAs<swift::BuiltinInst>()->getSubstitutions ();
500+ }
501+
502+
460503 bool AddressToPointerInst_needsStackProtection () const {
461504 return getAs<swift::AddressToPointerInst>()->needsStackProtection ();
462505 }
0 commit comments