1 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -emit-llvm -disable-llvm-passes -o - -hlsl-entry main %s -debug-info-kind=standalone -dwarf-version=4 | FileCheck %s
\r
16 [numthreads(1, 1, 1)]
\r
18 Pair Vals = {1, 2.0};
\r
19 Vals.First = Vals.getFirst();
\r
20 Vals.Second = Vals.getSecond();
\r
23 // This tests reference like `this` in HLSL
\r
24 // CHECK: %call = call noundef i32 @"?getFirst@Pair@@QAAHXZ"(ptr noundef nonnull align 4 dereferenceable(8) %Vals)
\r
25 // CHECK-NEXT: %First = getelementptr inbounds %struct.Pair, ptr %Vals, i32 0, i32 0
\r
26 // CHECK-NEXT: store i32 %call, ptr %First, align 4
\r
27 // CHECK-NEXT: %call1 = call noundef float @"?getSecond@Pair@@QAAMXZ"(ptr noundef nonnull align 4 dereferenceable(8) %Vals)
\r
28 // CHECK-NEXT: %Second = getelementptr inbounds %struct.Pair, ptr %Vals, i32 0, i32 1
\r
30 // CHECK: [[Pair:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Pair"
\r
31 // CHECK: [[getFirst:![0-9]+]] = distinct !DISubprogram(name: "getFirst"
\r
32 // CHECK-SAME: scope: [[Pair]]
\r
33 // CHECK: [[FirstThis:![0-9]+]] = !DILocalVariable(name: "this", arg: 1, scope: [[getFirst]], type: [[thisType:![0-9]+]]
\r
34 // CHECK: [[thisType]] = !DIDerivedType(tag: DW_TAG_reference_type, baseType: [[Pair]], size: 32)
\r