1fb09f365SEric Leese // Test that optimized flag is properly included in DWARF. 2fb09f365SEric Leese 3fb09f365SEric Leese // -gsplit-dwarf is supported only on Linux. 4fb09f365SEric Leese // REQUIRES: system-linux 5fb09f365SEric Leese 6*d2b2ab4eSAlex Langford // This test uses lldb's embedded python interpreter 7*d2b2ab4eSAlex Langford // REQUIRES: python 8*d2b2ab4eSAlex Langford 9fb09f365SEric Leese // ObjectFileELF::ApplyRelocations does not implement arm32. 10fb09f365SEric Leese // XFAIL: target-arm && linux-gnu 11fb09f365SEric Leese 12fb09f365SEric Leese // RUN: %clang_host %s -fno-standalone-debug -glldb \ 13fb09f365SEric Leese // RUN: -gdwarf-5 -gpubnames -gsplit-dwarf -O3 -c -o %t1.o 14fb09f365SEric Leese 15fb09f365SEric Leese // RUN: llvm-dwarfdump %t1.o | FileCheck %s --check-prefix DWARFDUMP_O 16fb09f365SEric Leese // RUN: llvm-dwarfdump %t1.dwo | FileCheck %s --check-prefix DWARFDUMP_DWO 17fb09f365SEric Leese // RUN: %lldb -b -o 'script lldb.SBDebugger.Create().CreateTarget("%t1.o").FindFunctions("main",lldb.eFunctionNameTypeAuto).GetContextAtIndex(0).GetFunction().GetIsOptimized()' | FileCheck %s 18fb09f365SEric Leese 19fb09f365SEric Leese // DWARFDUMP_O-NOT: DW_AT_APPLE_optimized 20fb09f365SEric Leese // 21fb09f365SEric Leese // DWARFDUMP_DWO: DW_TAG_compile_unit 22fb09f365SEric Leese // DWARFDUMP_DWO-NOT: DW_TAG_ 23fb09f365SEric Leese // DWARFDUMP_DWO: DW_AT_APPLE_optimized (true) 24fb09f365SEric Leese 25fb09f365SEric Leese // CHECK: (lldb) script lldb.SBDebugger.Create() 26fb09f365SEric Leese // CHECK-NEXT: True 27fb09f365SEric Leese main(void)28fb09f365SEric Leeseint main(void) { return 0; } 29