<commit_before>// RUN: %target-swift-frontend -emit-silgen -sdk %S/Inputs -I %S/Inputs -I %S/Inputs/objc_nonnull_lie_hack/ -enable-source-import -primary-file %s | %FileCheck -check-prefix=SILGEN %s
// RUN: %target-swift-frontend -emit-sil -O -sdk %S/Inputs -I %S/Inputs -I %S/Inputs/objc_nonnull_lie_hack/ -enable-source-import -primary-file %s | %FileCheck -check-prefix=OPT %s

// REQUIRES: objc_interop

import Foundation
import NonNilTest

func checkThatAPINotesAreBeingUsed() {
  let hopefullyNotOptional = NonNilTest.nonNilObject()
  let _: NonNilTest = hopefullyNotOptional
}

// SILGEN-LABEL: sil hidden @_T021objc_nonnull_lie_hack10makeObjectSo8NSObjectCSgyF
// SILGEN:         [[INIT:%.*]] = function_ref @_T0So8NSObjectCABycfC
// SILGEN:         [[NONOPTIONAL:%.*]] = apply [[INIT]]
// SILGEN:         [[OPTIONAL:%.*]] = unchecked_ref_cast [[NONOPTIONAL]]

// OPT-LABEL: sil hidden @_T021objc_nonnull_lie_hack10makeObjectSo8NSObjectCSgyF
// OPT:         [[OPT:%.*]] = unchecked_ref_cast
// OPT:         switch_enum [[OPT]] : $Optional<NSObject>, case #Optional.some!enumelt.1:
func makeObject() -> NSObject? {
  let foo: NSObject? = NSObject()
  if foo == nil {
    print("nil")
  }
  return foo<commit_msg>[test] Re-disable objc_nonnull_lie_hack.swift.<commit_after>// RUN: %target-swift-frontend -emit-silgen -sdk %S/Inputs -I %S/Inputs -I %S/Inputs/objc_nonnull_lie_hack/ -enable-source-import -primary-file %s | %FileCheck -check-prefix=SILGEN %s
// RUN: %target-swift-frontend -emit-sil -O -sdk %S/Inputs -I %S/Inputs -I %S/Inputs/objc_nonnull_lie_hack/ -enable-source-import -primary-file %s | %FileCheck -check-prefix=OPT %s

// REQUIRES: objc_interop
// REQUIRES: rdar33495516

import Foundation
import NonNilTest

func checkThatAPINotesAreBeingUsed() {
  let hopefullyNotOptional = NonNilTest.nonNilObject()
  let _: NonNilTest = hopefullyNotOptional
}

// SILGEN-LABEL: sil hidden @_T021objc_nonnull_lie_hack10makeObjectSo8NSObjectCSgyF
// SILGEN:         [[INIT:%.*]] = function_ref @_T0So8NSObjectCABycfC
// SILGEN:         [[NONOPTIONAL:%.*]] = apply [[INIT]]
// SILGEN:         [[OPTIONAL:%.*]] = unchecked_ref_cast [[NONOPTIONAL]]

// OPT-LABEL: sil hidden @_T021objc_nonnull_lie_hack10makeObjectSo8NSObjectCSgyF
// OPT:         [[OPT:%.*]] = unchecked_ref_cast
// OPT:         switch_enum [[OPT]] : $Optional<NSObject>, case #Optional.some!enumelt.1:
func makeObject() -> NSObject? {
  let foo: NSObject? = NSObject()
  if foo == nil {
    print("nil")
  }
  return foo
{'fraction_non_alphanumeric': 0.1489787745294353, 'fraction_numerical': 0.015218261914297157, 'mean_word_length': 4.006012024048096, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7544281', 'n_tokens_mistral': 926, 'n_tokens_neox': 936, 'n_words': 179}