Files
Erik Eckstein ec3d9dd9c7 Optimizer: add the ObjCBridgingOptimization to optimize ObjectiveC bridging operations.
Removes redundant ObjectiveC <-> Swift bridging calls.
Basically, if a value is bridged from ObjectiveC to Swift an then back to ObjectiveC again, then just re-use the original ObjectiveC value.

Also in this commit: add an additional DCE pass before ownership elimination. It can cleanup dead code which is left behind by the ObjCBridgingOptimization.

rdar://89987440
2022-06-08 22:51:57 +02:00

10 lines
255 B
C

#include <Foundation/NSString.h>
void useNSString(NSString * _Nonnull s);
void useOptNSString(NSString * _Nullable s);
NSString * _Nonnull returnNSString();
NSString * _Nullable returnOptNSString(BOOL some);
NSString * _Nonnull returnNullNSString();