brintos

brintos / llvm-project-archived public Read only

0
0
Text · 923 B · dd27acd Raw
26 lines · cpp
1// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -debug-info-kind=constructor %s -o - | FileCheck %s2 3// Test that clang doesn't crash while resolving temporary debug metadata of4// a record with collisions in the record's enum users.5 6// CHECK:      !DICompositeType(tag: DW_TAG_enumeration_type,7// CHECK-SAME:                  scope: [[SCOPE:![0-9]+]]8// CHECK-SAME:                  elements: [[ELEMENTS:![0-9]+]]9// CHECK:      [[SCOPE]] = !DICompositeType(tag: DW_TAG_structure_type10// CHECK-SAME:                              name: "Struct1<Struct3>"11// CHECK:      [[ELEMENTS]] = !{[[ELEMENT:![0-9]+]]}12// CHECK:      [[ELEMENT]] = !DIEnumerator(name: "enumValue1"13 14template <typename> struct Struct1 {15  enum { enumValue1 };16  Struct1();17};18void function2() {19  struct Struct3 {};20  int i = Struct1<Struct3>::enumValue1;21}22void function3() {23  struct Struct3 {};24  int i = Struct1<Struct3>::enumValue1;25}26