<commit_before>// RUN: %target-swift-frontend -emit-ir -primary-file %s -module-name A | %FileCheck %s

// REQUIRES: CPU=armv7k
// REQUIRES: OS=watchos

import Foundation

func getAClass(managedObjectClass : AnyClass) -> AnyClass{
  let metaClass: AnyClass = object_getClass(managedObjectClass)!
  return metaClass
}

public class ObjCSubclass : NSObject {
  public final var field: Int32 = 0
}

func test(_ o: ObjCSubclass) {
  o.field = 10
}

// CHECK-DAG: declare i8* @object_getClass(i8*)<commit_msg>Second attempt to fix IRGen/objc_object_getClass.swift<commit_after>// RUN: %target-swift-frontend -emit-ir -primary-file %s -module-name A | %FileCheck %s

// REQUIRES: CPU=armv7k
// REQUIRES: OS=watchos

import Foundation

func getAClass(managedObjectClass : AnyClass) -> AnyClass{
  let metaClass: AnyClass = object_getClass(managedObjectClass)!
  return metaClass
}

public class ObjCSubclass : NSObject {
  public final var field: Int32 = 0
}

func test(_ o: ObjCSubclass) {
  o.field = 10
}

// CHECK-DAG: declare i8* @object_getClass(i8*{{.*}})
{'fraction_non_alphanumeric': 0.12132701421800948, 'fraction_numerical': 0.015165876777251185, 'mean_word_length': 4.443298969072165, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '351525', 'n_tokens_mistral': 391, 'n_tokens_neox': 380, 'n_words': 95}