brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.7 KiB · e64e07c Raw
88 lines · cpp
1// Test that call site debug info is (un)supported in various configurations.2 3// Supported: DWARF5, -O1, standalone DI4// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple %s -o - \5// RUN:   -O1 -disable-llvm-passes \6// RUN:   -debug-info-kind=standalone -dwarf-version=5 \7// RUN: | FileCheck %s -check-prefix=HAS-ATTR \8// RUN:     -implicit-check-not=DISubprogram -implicit-check-not=DIFlagAllCallsDescribed9 10// Supported: DWARF4 + LLDB tuning, -O1, limited DI11// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple %s -o - \12// RUN:   -O1 -disable-llvm-passes \13// RUN:   -debugger-tuning=lldb \14// RUN:   -debug-info-kind=standalone -dwarf-version=4 \15// RUN: | FileCheck %s -check-prefix=HAS-ATTR \16// RUN:     -implicit-check-not=DISubprogram -implicit-check-not=DIFlagAllCallsDescribed17 18// Note: DIFlagAllCallsDescribed may have been enabled prematurely when tuning19// for GDB under -gdwarf-4 in https://reviews.llvm.org/D69743. It's possible20// this should have been 'Unsupported' until entry values emission was enabled21// by default.22//23// Supported: DWARF4 + GDB tuning24// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu \25// RUN:   %s -o - -O1 -disable-llvm-passes -debugger-tuning=gdb \26// RUN:   -debug-info-kind=standalone -dwarf-version=4 \27// RUN: | FileCheck %s -check-prefix=HAS-ATTR \28// RUN:     -implicit-check-not=DIFlagAllCallsDescribed29 30// Supported: DWARF4 + LLDB, -O131// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu \32// RUN:   %s -o - -O1 -disable-llvm-passes -debugger-tuning=lldb \33// RUN:   -debug-info-kind=standalone -dwarf-version=4 \34// RUN: | FileCheck %s -check-prefix=HAS-ATTR \35// RUN:     -implicit-check-not=DIFlagAllCallsDescribed36 37// Unsupported: -O038// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu \39// RUN:   %s -o - -O0 -disable-llvm-passes -debugger-tuning=gdb \40// RUN:   -debug-info-kind=standalone -dwarf-version=4 \41// RUN: | FileCheck %s -check-prefix=NO-ATTR42 43// Supported: DWARF4 + LLDB tuning, -O1, line-tables only DI44// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple %s -o - \45// RUN:   -O1 -disable-llvm-passes \46// RUN:   -debugger-tuning=lldb \47// RUN:   -debug-info-kind=line-tables-only -dwarf-version=4 \48// RUN: | FileCheck %s -check-prefix=LINE-TABLES-ONLY49 50// Unsupported: -O051// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple %s -o - \52// RUN:   -O0 \53// RUN:   -debug-info-kind=standalone -dwarf-version=5 \54// RUN: | FileCheck %s -check-prefix=NO-ATTR55 56// Unsupported: DWARF457// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple %s -o - \58// RUN:   -O1 -disable-llvm-passes \59// RUN:   -debug-info-kind=standalone -dwarf-version=4 \60// RUN: | FileCheck %s -check-prefix=NO-ATTR61 62// NO-ATTR-NOT: FlagAllCallsDescribed63 64// HAS-ATTR-DAG: DISubprogram(name: "declaration1", {{.*}}, flags: DIFlagPrototyped65// HAS-ATTR-DAG: DISubprogram(name: "declaration2", {{.*}}, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition66// HAS-ATTR-DAG: DISubprogram(name: "struct1", {{.*}}, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)67// HAS-ATTR-DAG: DISubprogram(name: "struct1", {{.*}}, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition68// HAS-ATTR-DAG: DISubprogram(name: "method1", {{.*}}, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition69// HAS-ATTR-DAG: DISubprogram(name: "force_irgen", {{.*}}, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition70 71// LINE-TABLES-ONLY: DISubprogram(name: "force_irgen", {{.*}}, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition72 73void declaration1();74 75void declaration2();76 77void declaration2() {}78 79struct struct1 {80  struct1() {}81  void method1() {}82};83 84void __attribute__((optnone)) force_irgen() {85  declaration1();86  struct1().method1();87}88