brintos

brintos / llvm-project-archived public Read only

0
0
Text · 857 B · a17e1e6 Raw
35 lines · c
1// RUN: %clang_cc1 -x c -debug-info-kind=limited -debugger-tuning=gdb -dwarf-version=4 -O -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s2// RUN: %clang_cc1 -x c++ -debug-info-kind=limited -debugger-tuning=gdb -dwarf-version=4 -O -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s3 4#ifdef __cplusplus5extern "C" {6#endif7 8void t1(void);9 10void use(void) { t1(); }11 12__attribute__((nodebug)) void t1(void) {13  int a = 10;14  a++;15}16 17#ifdef __cplusplus18}19#endif20 21// CHECK-LABEL: define{{.*}} void @use()22// CHECK-SAME:  !dbg23// CHECK-SAME:  {24// CHECK:       !dbg25// CHECK:       }26 27// PR50767 Function __attribute__((nodebug)) inconsistency causes crash28// illegal (non-distinct) !dbg metadata was being added to _Z2t1v definition29 30// CHECK-LABEL: define{{.*}} void @t1()31// CHECK-NOT:   !dbg32// CHECK-SAME:  {33// CHECK-NOT:   !dbg34// CHECK:       }35