Files
swift-mirror/test/IRGen/Inputs/StaticInline.h
Michael Gottesman 723c6212f2 Run ObjCARCContract when optimizing no matter the IRGenOutputKind.
Previously, we were just running ObjCARCContract when codegening. This is out of
character with the rest of the LLVM passes in Swift, namely that after these
have run, an IR pass no longer contains any compiler intrinsics. This can be
seen by SwiftARCContract running in the -O pipeline.

This commit harmonizes the behavior here.

For testing purposes, I added a flag that disables the running of
ObjCARCContract for testing purposes.

rdar://34824507
2017-10-06 08:59:58 -07:00

21 lines
820 B
Objective-C

#import <Foundation/Foundation.h>
static inline NSString *staticInlineFun() {
return [[NSLocale currentLocale] localeIdentifier];
}
static inline __attribute__((ns_returns_retained))
NSURL *_Nullable test(NSFileManager *self_, NSURL *originalItemURL,
NSURL *newItemURL, NSString *_Nullable backupItemName,
NSFileManagerItemReplacementOptions options,
NSError **_Nullable error) {
NSURL *result = nil;
BOOL success = [self_ replaceItemAtURL:originalItemURL
withItemAtURL:newItemURL
backupItemName:backupItemName
options:options
resultingItemURL:&result
error:error];
return success ? result : nil;
}