brintos

brintos / llvm-project-archived public Read only

0
0
Text · 860 B · f39de0d Raw
31 lines · c
1// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s2 3enum { A = 1 };4int func1(int a) {5  switch(a) {6  case A: return 10;7  default: break;8  }9  return 0;10}11// CHECK:       !DICompositeType(tag: DW_TAG_enumeration_type12// CHECK-SAME:  elements: [[TEST1_ENUMS:![0-9]*]]13// CHECK:       [[TEST1_ENUMS]] = !{[[TEST1_E:![0-9]*]]}14// CHECK:       [[TEST1_E]] = !DIEnumerator(name: "A", value: 1)15 16// Test ImplicitCast of switch case enum value17enum { B = 2 };18typedef unsigned long long __t1;19typedef __t1 __t2;20int func2(__t2 a) {21  switch(a) {22  case B: return 10;23  default: break;24  }25  return 0;26}27// CHECK:       !DICompositeType(tag: DW_TAG_enumeration_type28// CHECK-SAME:  elements: [[TEST2_ENUMS:![0-9]*]]29// CHECK:       [[TEST2_ENUMS]] = !{[[TEST2_E:![0-9]*]]}30// CHECK:       [[TEST2_E]] = !DIEnumerator(name: "B", value: 2)31