1; RUN: llc -O0 %s -mtriple=x86_64-apple-darwin -filetype=obj -o %t 2; RUN: llvm-dwarfdump %t | FileCheck %s 3 4; rdar://13071590 5; Check we are not emitting mutliple AT_const_value for a single member. 6; CHECK: .debug_info contents: 7; CHECK: DW_TAG_compile_unit 8; CHECK: DW_TAG_class_type 9; CHECK: DW_TAG_member 10; CHECK: badbit 11; CHECK: DW_AT_const_value [DW_FORM_sdata] (1) 12; CHECK-NOT: DW_AT_const_value 13; CHECK: NULL 14 15%"class.std::basic_ostream" = type { i32 (...)**, %"class.std::basic_os" } 16%"class.std::basic_os" = type { %"class.std::os_base", %"class.std::basic_ostream"*, i8, i8 } 17%"class.std::os_base" = type { i32 (...)**, i64, i64, i32, i32, i32 } 18 19@_ZSt4cout = external global %"class.std::basic_ostream" 20@.str = private unnamed_addr constant [6 x i8] c"c is \00", align 1 21 22define i32 @main() { 23entry: 24 %call1.i = tail call %"class.std::basic_ostream"* @test(%"class.std::basic_ostream"* @_ZSt4cout, i8* getelementptr inbounds ([6 x i8]* @.str, i64 0, i64 0), i64 5) 25 ret i32 0 26} 27 28declare %"class.std::basic_ostream"* @test(%"class.std::basic_ostream"*, i8*, i64) 29 30declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone 31 32!llvm.dbg.cu = !{!0} 33!llvm.module.flags = !{!1803} 34 35!0 = !{!"0x11\004\00clang version 3.3 (trunk 174207)\001\00\000\00\000", !1802, !1, !955, !956, !1786, !955} ; [ DW_TAG_compile_unit ] [/privite/tmp/student2.cpp] [DW_LANG_C_plus_plus] 36!1 = !{!26} 37!4 = !{!"0x39\00std\0048", null, !5} ; [ DW_TAG_namespace ] 38!5 = !{!"0x29", !1801} ; [ DW_TAG_file_type ] 39!25 = !{!"0x28\00_S_os_fmtflags_end\0065536"} ; [ DW_TAG_enumerator ] 40!26 = !{!"0x4\00_Ios_Iostate\00146\0032\0032\000\000\000", !1801, !4, null, !27, null, null, null} ; [ DW_TAG_enumeration_type ] [_Ios_Iostate] [line 146, size 32, align 32, offset 0] [def] [from ] 41!27 = !{!28, !29, !30, !31, !32} 42!28 = !{!"0x28\00_S_goodbit\000"} ; [ DW_TAG_enumerator ] [_S_goodbit :: 0] 43!29 = !{!"0x28\00_S_badbit\001"} ; [ DW_TAG_enumerator ] [_S_badbit :: 1] 44!30 = !{!"0x28\00_S_eofbit\002"} ; [ DW_TAG_enumerator ] [_S_eofbit :: 2] 45!31 = !{!"0x28\00_S_failbit\004"} ; [ DW_TAG_enumerator ] [_S_failbit :: 4] 46!32 = !{!"0x28\00_S_os_ostate_end\0065536"} ; [ DW_TAG_enumerator ] [_S_os_ostate_end :: 65536] 47!49 = !{!"0x2\00os_base\00200\001728\0064\000\000\000", !1801, !4, null, !50, !49, null, null} ; [ DW_TAG_class_type ] [os_base] [line 200, size 1728, align 64, offset 0] [def] [from ] 48!50 = !{!77} 49!54 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !55, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] 50!55 = !{!56} 51!56 = !{!"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] 52!77 = !{!"0xd\00badbit\00331\000\000\000\004096", !1801, !49, !78, i32 1} ; [ DW_TAG_member ] 53!78 = !{!"0x26\00\000\000\000\000\000", null, null, !79} ; [ DW_TAG_const_type ] 54!79 = !{!"0x16\00ostate\00327\000\000\000\000", !1801, !49, !26} ; [ DW_TAG_typedef ] 55!955 = !{} 56!956 = !{!960} 57!960 = !{!"0x2e\00main\00main\00\0073\000\001\000\006\00256\001\0073", !1802, null, !54, null, i32 ()* @main, null, null, !955} ; [ DW_TAG_subprogram ] 58!961 = !{!"0x29", !1802} ; [ DW_TAG_file_type ] 59!1786 = !{!1800} 60!1800 = !{!"0x34\00badbit\00badbit\00badbit\00331\001\001", !5, !5, !78, i32 1, !77} ; [ DW_TAG_variable ] 61!1801 = !{!"os_base.h", !"/privite/tmp"} 62!1802 = !{!"student2.cpp", !"/privite/tmp"} 63!1803 = !{i32 1, !"Debug Info Version", i32 2} 64