// RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone -triple %itanium_abi_triple %s -o - | FileCheck %s
// Cases to show some non-trivial types with flags combined with DIFlagNonTrivial and DIFlagTypePassByValue.
// CHECK-DAG: !DICompositeType({{.*}}, name: "Explicit",{{.*}}flags: DIFlagTypePassByValue | DIFlagNonTrivial
Explicit;
// CHECK-DAG: !DICompositeType({{.*}}, name: "Struct",{{.*}}flags: DIFlagTypePassByValue | DIFlagNonTrivial
Struct;
// CHECK-DAG: !DICompositeType({{.*}}, name: "Annotated",{{.*}}flags: DIFlagTypePassByValue | DIFlagNonTrivial
Annotated;
// Check a non-composite type
// CHECK-DAG: !DIGlobalVariable(name: "GlobalVar", {{.*}}type: {{.*}}, isLocal: false, isDefinition: true)
int GlobalVar = 0;
// Cases to test composite type's triviality
// CHECK-DAG: {{.*}}!DIGlobalVariable(name: "Union",
// CHECK-DAG-NEXT: {{^((?!\bDIFlagNonTrivial\b).)*$}}
Union;
// CHECK-DAG: {{.*}}!DIGlobalVariable(name: "Trivial",
// CHECK-DAG-NEXT: {{^((?!\bDIFlagNonTrivial\b).)*$}}
Trivial;
// CHECK-DAG: {{.*}}!DIGlobalVariable(name: "TrivialA",
// CHECK-DAG-NEXT: {{^((?!\bDIFlagNonTrivial\b).)*$}}
TrivialA;
// CHECK-DAG: {{.*}}!DIGlobalVariable(name: "TrivialB",
// CHECK-DAG-NEXT: {{^((?!\bDIFlagNonTrivial\b).)*$}}
TrivialB;
// CHECK-DAG: {{.*}}!DIGlobalVariable(name: "TrivialC",
// CHECK-DAG-NEXT: {{^((?!\bDIFlagNonTrivial\b).)*$}}
TrivialC;
// CHECK-DAG: {{.*}}!DIGlobalVariable(name: "TrivialD",
// CHECK-DAG-NEXT: {{^((?!\bDIFlagNonTrivial\b).)*$}}
;
TrivialD;
// CHECK-DAG: !DICompositeType({{.*}}, name: "NonTrivial",{{.*}}flags: {{.*}}DIFlagNonTrivial
NonTrivial;
// CHECK-DAG: !DICompositeType({{.*}}, name: "NonTrivialA",{{.*}}flags: {{.*}}DIFlagNonTrivial
NonTrivialA;
// CHECK-DAG: !DICompositeType({{.*}}, name: "NonTrivialB",{{.*}}flags: {{.*}}DIFlagNonTrivial
NonTrivialB;
// CHECK-DAG: !DICompositeType({{.*}}, name: "NonTrivialC",{{.*}}flags: {{.*}}DIFlagNonTrivial
NonTrivialC;
// CHECK-DAG: !DICompositeType({{.*}}, name: "NonTrivialD",{{.*}}flags: {{.*}}DIFlagNonTrivial
NonTrivialD;
// CHECK-DAG: !DICompositeType({{.*}}, name: "NonTrivialE",{{.*}}flags: {{.*}}DIFlagNonTrivial
NonTrivialE;