empty_global_struct.hlsl 454 B

12345678910111213141516171819
  1. // RUN: %dxc -E main -T ps_6_0 %s -Zi -Od | FileCheck %s
  2. // CHECK-DAG: ![[S:.*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "S", {{.*}}, align: 8,
  3. // CHECK-DAG: !DIGlobalVariable(name: "foo", {{.*}}, type: ![[S]], isLocal: true, isDefinition: true)
  4. // Exclude quoted source file (see readme)
  5. // CHECK-LABEL: {{!"[^"]*\\0A[^"]*"}}
  6. struct S {
  7. float f() {
  8. return 420;
  9. }
  10. };
  11. static S foo;
  12. float main() : SV_Target {
  13. return foo.f();
  14. }