<commit_before>// Tests that with -conditional-runtime-records, IRGen marks class, struct,
// enum, protocol, and protocol conformance records as conditionally removable
// via !llvm.used.conditional metadata.

// RUN: %target-build-swift -Xfrontend -disable-objc-interop -Xfrontend -conditional-runtime-records \
// RUN:    %s -emit-ir -o - | %FileCheck %s

public protocol TheProtocol {
}

public class Class: TheProtocol {
}

public struct Struct {
}

public enum Enum {
}

// CHECK:      @llvm.used = appending global [
// CHECK-SAME:   @"$s4main11TheProtocolHr"
// CHECK-SAME:   @"$s4main5ClassCAA11TheProtocolAAHc"
// CHECK-SAME:   @"$s4main5ClassCHn"
// CHECK-SAME:   @"$s4main6StructVHn"
// CHECK-SAME:   @"$s4main4EnumOHn"
// CHECK-SAME: ], section "llvm.metadata"

// CHECK:      !llvm.used.conditional = !{[[C1:!.*]], [[C2:!.*]], [[C3:!.*]], [[C4:!.*]], [[C5:!.*]]}
// CHECK:      [[C1]]  = !{{{.*}} @"$s4main11TheProtocolHr", i32 0, {{.*}} @"$s4main11TheProtocolMp"}<commit_msg>Update the conditional-dead-strip-ir.swift test to work after LLVM rebranch (#39578)<commit_after>// Tests that with -conditional-runtime-records, IRGen marks class, struct,
// enum, protocol, and protocol conformance records as conditionally removable
// via !llvm.used.conditional metadata.

// RUN: %target-build-swift -Xfrontend -disable-objc-interop -Xfrontend -conditional-runtime-records \
// RUN:    %s -emit-ir -o - | %FileCheck %s

public protocol TheProtocol {
}

public class Class: TheProtocol {
}

public struct Struct {
}

public enum Enum {
}

// CHECK:      @llvm.{{(compiler.)?}}used = appending global [
// CHECK-SAME:   @"$s4main11TheProtocolHr"
// CHECK-SAME:   @"$s4main5ClassCAA11TheProtocolAAHc"
// CHECK-SAME:   @"$s4main5ClassCHn"
// CHECK-SAME:   @"$s4main6StructVHn"
// CHECK-SAME:   @"$s4main4EnumOHn"
// CHECK-SAME: ], section "llvm.metadata"

// CHECK:      !llvm.used.conditional = !{[[C1:!.*]], [[C2:!.*]], [[C3:!.*]], [[C4:!.*]], [[C5:!.*]]}
// CHECK:      [[C1]]  = !{{{.*}} @"$s4main11TheProtocolHr", i32 0, {{.*}} @"$s4main11TheProtocolMp"}
{'fraction_non_alphanumeric': 0.19980648282535074, 'fraction_numerical': 0.029511369134010642, 'mean_word_length': 3.7981438515081205, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5439876', 'n_tokens_mistral': 811, 'n_tokens_neox': 757, 'n_words': 160}