brintos

brintos / llvm-project-archived public Read only

0
0
Text · 921 B · 2db4e86 Raw
26 lines · c
1// Test that optimized flag is properly included in DWARF.2 3// -gsplit-dwarf is supported only on Linux.4// REQUIRES: system-linux5 6// This test uses lldb's embedded python interpreter7// REQUIRES: python8 9// RUN: %clang_host %s -fno-standalone-debug -glldb \10// RUN:   -gdwarf-5 -gpubnames -gsplit-dwarf -O3 -c -o %t1.o11 12// RUN: llvm-dwarfdump %t1.o | FileCheck %s --check-prefix DWARFDUMP_O13// RUN: llvm-dwarfdump %t1.dwo | FileCheck %s --check-prefix DWARFDUMP_DWO14// RUN: %lldb -b -o 'script lldb.SBDebugger.Create().CreateTarget("%t1.o").FindFunctions("main",lldb.eFunctionNameTypeAuto).GetContextAtIndex(0).GetFunction().GetIsOptimized()' | FileCheck %s15 16// DWARFDUMP_O-NOT: DW_AT_APPLE_optimized17//18// DWARFDUMP_DWO: DW_TAG_compile_unit19// DWARFDUMP_DWO-NOT: DW_TAG_20// DWARFDUMP_DWO: DW_AT_APPLE_optimized	(true)21 22// CHECK: (lldb) script lldb.SBDebugger.Create()23// CHECK-NEXT: True24 25int main(void) { return 0; }26