<commit_before>// RUN: %clang_cc1 -cl-std=CL2.0 -emit-llvm -o - %s | FileCheck %s

void __attribute__((overloadable)) foo(global int *a, global int *b);
void __attribute__((overloadable)) foo(generic int *a, generic int *b);
void __attribute__((overloadable)) bar(generic int *global *a, generic int *global *b);
void __attribute__((overloadable)) bar(generic int *generic *a, generic int *generic *b);

void kernel ker() {
  global int *a;
  global int *b;
  generic int *c;
  local int *d;
  generic int *generic *gengen;
  generic int *local *genloc;
  generic int *global *genglob;
  // CHECK: call void @_Z3fooPU8CLglobaliS0_(i32* undef, i32* undef)
  foo(a, b);
  // CHECK: call void @_Z3fooPU9CLgenericiS0_(i32* undef, i32* undef)
  foo(b, c);
  // CHECK: call void @_Z3fooPU9CLgenericiS0_(i32* undef, i32* undef)
  foo(a, d);

  // CHECK: call void @_Z3barPU9CLgenericPU9CLgenericiS2_(i32** undef, i32** undef)
  bar(gengen, genloc);
  // CHECK: call void @_Z3barPU9CLgenericPU9CLgenericiS2_(i32** undef, i32** undef)
  bar(gengen, genglob);
  // CHECK: call void @_Z3barPU8CLglobalPU9CLgenericiS2_(i32** undef, i32** undef)
  bar(genglob, genglob);
}
<commit_msg>clang/test/SemaOpenCL/overload_addrspace_resolution.cl: Appease MS mangler to specify triple=x86_64-unknown.<commit_after>// RUN: %clang_cc1 -cl-std=CL2.0 -emit-llvm -o - -triple x86_64-unknown-unknown %s | FileCheck %s

void __attribute__((overloadable)) foo(global int *a, global int *b);
void __attribute__((overloadable)) foo(generic int *a, generic int *b);
void __attribute__((overloadable)) bar(generic int *global *a, generic int *global *b);
void __attribute__((overloadable)) bar(generic int *generic *a, generic int *generic *b);

void kernel ker() {
  global int *a;
  global int *b;
  generic int *c;
  local int *d;
  generic int *generic *gengen;
  generic int *local *genloc;
  generic int *global *genglob;
  // CHECK: call void @_Z3fooPU8CLglobaliS0_(i32* undef, i32* undef)
  foo(a, b);
  // CHECK: call void @_Z3fooPU9CLgenericiS0_(i32* undef, i32* undef)
  foo(b, c);
  // CHECK: call void @_Z3fooPU9CLgenericiS0_(i32* undef, i32* undef)
  foo(a, d);

  // CHECK: call void @_Z3barPU9CLgenericPU9CLgenericiS2_(i32** undef, i32** undef)
  bar(gengen, genloc);
  // CHECK: call void @_Z3barPU9CLgenericPU9CLgenericiS2_(i32** undef, i32** undef)
  bar(gengen, genglob);
  // CHECK: call void @_Z3barPU8CLglobalPU9CLgenericiS2_(i32** undef, i32** undef)
  bar(genglob, genglob);
}

{'fraction_non_alphanumeric': 0.1396761133603239, 'fraction_numerical': 0.042105263157894736, 'mean_word_length': 4.968599033816425, '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': '7384584', 'n_tokens_mistral': 1028, 'n_tokens_neox': 961, 'n_words': 260}