<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Aug 28, 2014, at 9:26 AM, Adrian Prantl <<a href="mailto:aprantl@apple.com" class="">aprantl@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Aug 27, 2014, at 3:44 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><div class="gmail_extra"><br class=""><br class=""><div class="gmail_quote">On Fri, Jan 17, 2014 at 6:12 PM, Adrian Prantl <span dir="ltr" class=""><<a href="mailto:aprantl@apple.com" target="_blank" class="">aprantl@apple.com</a>></span> wrote:<br class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: adrian<br class="">
Date: Fri Jan 17 20:12:00 2014<br class="">
New Revision: 199536<br class="">
<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=199536&view=rev" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=199536&view=rev</a><br class="">
Log:<br class="">
Debug info (LTO): Move the creation of accessibility flags to<br class="">
getOrCreateSubprogramDIE to avoid attributes being added twice when DIEs<br class="">
are merged.<br class=""></blockquote><div class=""><br class=""></div><div class="">I believe this change may've caused DW_AT_accessibility to be emitted for all subprogram DIEs, not just member subprogram DIEs (ie: even for free functions).<br class=""></div></div></div></div></div></blockquote><div class=""><br class=""></div>Confirmed!<br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><br class="">Honestly, probably the right fix is to add another flag (FlagPublic) and then just emit DW_AT_accessibility if one of the three flags is set. This would allow the frontend to omit the flag even for members, if their accessibility is the default (eg: public members in structs, private members in classes) - it's something I've seen GCC do that Clang doesn't (could be a very minor DWARF size reduction benefit).<br class=""></div></div></div></div></div></blockquote><div class=""><br class=""></div><div class="">I agree. Also, the previous default of “everything in a class/struct/union is marked as public” does really only make sense for C++.</div><div class="">I will come up with a patch.</div><div class=""><br class=""></div><div class="">thanks,</div><div class="">adrian</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class="">
<br class="">(I came across this while trying to improve -gmlt, in which case I'd like to not emit accessibility at all, even for member functions)<br class=""><br class="">- David</div><div class=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="">
<a href="rdar://problem/15842330" class="">rdar://problem/15842330</a>.<br class="">
<br class="">
Added:<br class="">
llvm/trunk/test/Linker/type-unique-simple2-a.ll<br class="">
llvm/trunk/test/Linker/type-unique-simple2-b.ll<br class="">
Modified:<br class="">
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp<br class="">
<br class="">
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=199536&r1=199535&r2=199536&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=199536&r1=199535&r2=199536&view=diff</a><br class="">
==============================================================================<br class="">
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp (original)<br class="">
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Fri Jan 17 20:12:00 2014<br class="">
@@ -1191,21 +1191,9 @@ void DwarfUnit::constructTypeDIE(DIE &Bu<br class="">
for (unsigned i = 0, N = Elements.getNumElements(); i < N; ++i) {<br class="">
DIDescriptor Element = Elements.getElement(i);<br class="">
DIE *ElemDie = NULL;<br class="">
- if (Element.isSubprogram()) {<br class="">
- DISubprogram SP(Element);<br class="">
- ElemDie = getOrCreateSubprogramDIE(SP);<br class="">
- if (SP.isProtected())<br class="">
- addUInt(ElemDie, dwarf::DW_AT_accessibility, dwarf::DW_FORM_data1,<br class="">
- dwarf::DW_ACCESS_protected);<br class="">
- else if (SP.isPrivate())<br class="">
- addUInt(ElemDie, dwarf::DW_AT_accessibility, dwarf::DW_FORM_data1,<br class="">
- dwarf::DW_ACCESS_private);<br class="">
- else<br class="">
- addUInt(ElemDie, dwarf::DW_AT_accessibility, dwarf::DW_FORM_data1,<br class="">
- dwarf::DW_ACCESS_public);<br class="">
- if (SP.isExplicit())<br class="">
- addFlag(ElemDie, dwarf::DW_AT_explicit);<br class="">
- } else if (Element.isDerivedType()) {<br class="">
+ if (Element.isSubprogram())<br class="">
+ ElemDie = getOrCreateSubprogramDIE(DISubprogram(Element));<br class="">
+ else if (Element.isDerivedType()) {<br class="">
DIDerivedType DDTy(Element);<br class="">
if (DDTy.getTag() == dwarf::DW_TAG_friend) {<br class="">
ElemDie = createAndAddDIE(dwarf::DW_TAG_friend, Buffer);<br class="">
@@ -1490,6 +1478,19 @@ DIE *DwarfUnit::getOrCreateSubprogramDIE<br class="">
if (SP.isRValueReference())<br class="">
addFlag(SPDie, dwarf::DW_AT_rvalue_reference);<br class="">
<br class="">
+ if (SP.isProtected())<br class="">
+ addUInt(SPDie, dwarf::DW_AT_accessibility, dwarf::DW_FORM_data1,<br class="">
+ dwarf::DW_ACCESS_protected);<br class="">
+ else if (SP.isPrivate())<br class="">
+ addUInt(SPDie, dwarf::DW_AT_accessibility, dwarf::DW_FORM_data1,<br class="">
+ dwarf::DW_ACCESS_private);<br class="">
+ else<br class="">
+ addUInt(SPDie, dwarf::DW_AT_accessibility, dwarf::DW_FORM_data1,<br class="">
+ dwarf::DW_ACCESS_public);<br class="">
+<br class="">
+ if (SP.isExplicit())<br class="">
+ addFlag(SPDie, dwarf::DW_AT_explicit);<br class="">
+<br class="">
return SPDie;<br class="">
}<br class="">
<br class="">
<br class="">
Added: llvm/trunk/test/Linker/type-unique-simple2-a.ll<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/type-unique-simple2-a.ll?rev=199536&view=auto" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/type-unique-simple2-a.ll?rev=199536&view=auto</a><br class="">
==============================================================================<br class="">
--- llvm/trunk/test/Linker/type-unique-simple2-a.ll (added)<br class="">
+++ llvm/trunk/test/Linker/type-unique-simple2-a.ll Fri Jan 17 20:12:00 2014<br class="">
@@ -0,0 +1,129 @@<br class="">
+; REQUIRES: object-emission<br class="">
+;<br class="">
+; RUN: llvm-link %s %p/type-unique-simple2-b.ll -S -o - | llc -filetype=obj -O0 | llvm-dwarfdump -debug-dump=info - | FileCheck %s<br class="">
+;<br class="">
+; Tests for a merge error where attributes are inserted twice into the same DIE.<br class="">
+;<br class="">
+; $ cat ab.h<br class="">
+; typedef int foo_t;<br class="">
+; class A {<br class="">
+; public:<br class="">
+; virtual void setFoo();<br class="">
+; virtual const foo_t getFoo();<br class="">
+; };<br class="">
+;<br class="">
+; $ cat a.cpp<br class="">
+; #include "ab.h"<br class="">
+; foo_t bar() {<br class="">
+; return A().getFoo();<br class="">
+; }<br class="">
+;<br class="">
+; CHECK: _ZN1A6setFooEv<br class="">
+; CHECK: DW_AT_accessibility [DW_FORM_data1] (0x01)<br class="">
+; CHECK-NOT: DW_AT_accessibility<br class="">
+; CHECK: DW_TAG<br class="">
+<br class="">
+; ModuleID = 'a.cpp'<br class="">
+<br class="">
+%class.A = type { i32 (...)** }<br class="">
+<br class="">
+@_ZTV1A = external unnamed_addr constant [4 x i8*]<br class="">
+<br class="">
+; Function Attrs: nounwind<br class="">
+define i32 @_Z3barv() #0 {<br class="">
+entry:<br class="">
+ %tmp = alloca %class.A, align 8<br class="">
+ %0 = bitcast %class.A* %tmp to i8*, !dbg !38<br class="">
+ call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 8, i32 8, i1 false), !dbg !38<br class="">
+ call void @_ZN1AC1Ev(%class.A* %tmp) #1, !dbg !38<br class="">
+ %call = call i32 @_ZN1A6getFooEv(%class.A* %tmp), !dbg !38<br class="">
+ ret i32 %call, !dbg !38<br class="">
+}<br class="">
+<br class="">
+; Function Attrs: nounwind<br class="">
+declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) #1<br class="">
+<br class="">
+; Function Attrs: inlinehint nounwind<br class="">
+define linkonce_odr void @_ZN1AC1Ev(%class.A* %this) unnamed_addr #2 align 2 {<br class="">
+entry:<br class="">
+ %this.addr = alloca %class.A*, align 8<br class="">
+ store %class.A* %this, %class.A** %this.addr, align 8<br class="">
+ call void @llvm.dbg.declare(metadata !{%class.A** %this.addr}, metadata !39), !dbg !41<br class="">
+ %this1 = load %class.A** %this.addr<br class="">
+ call void @_ZN1AC2Ev(%class.A* %this1) #1, !dbg !42<br class="">
+ ret void, !dbg !42<br class="">
+}<br class="">
+<br class="">
+declare i32 @_ZN1A6getFooEv(%class.A*)<br class="">
+<br class="">
+; Function Attrs: nounwind readnone<br class="">
+declare void @llvm.dbg.declare(metadata, metadata) #4<br class="">
+<br class="">
+; Function Attrs: inlinehint nounwind<br class="">
+define linkonce_odr void @_ZN1AC2Ev(%class.A* %this) unnamed_addr #2 align 2 {<br class="">
+entry:<br class="">
+ %this.addr = alloca %class.A*, align 8<br class="">
+ store %class.A* %this, %class.A** %this.addr, align 8<br class="">
+ call void @llvm.dbg.declare(metadata !{%class.A** %this.addr}, metadata !44), !dbg !45<br class="">
+ %this1 = load %class.A** %this.addr<br class="">
+ %0 = bitcast %class.A* %this1 to i8***, !dbg !46<br class="">
+ store i8** getelementptr inbounds ([4 x i8*]* @_ZTV1A, i64 0, i64 2), i8*** %0, !dbg !46<br class="">
+ ret void, !dbg !46<br class="">
+}<br class="">
+<br class="">
+attributes #0 = { nounwind }<br class="">
+attributes #1 = { nounwind }<br class="">
+attributes #2 = { inlinehint nounwind }<br class="">
+attributes #4 = { nounwind readnone }<br class="">
+<br class="">
+!<a href="http://llvm.dbg.cu/" target="_blank" class="">llvm.dbg.cu</a> = !{!0}<br class="">
+!llvm.module.flags = !{!35, !36}<br class="">
+!llvm.ident = !{!37}<br class="">
+<br class="">
+!0 = metadata !{i32 786449, metadata !1, i32 4, metadata !"clang version 3.5 ", i1 false, metadata !"", i32 0, metadata !2, metadata !3, metadata !26, metadata !2, metadata !2, metadata !""} ; [ DW_TAG_compile_unit ] [/<unknown>] [DW_LANG_C_plus_plus]<br class="">
+!1 = metadata !{metadata !"<unknown>", metadata !""}<br class="">
+!2 = metadata !{i32 0}<br class="">
+!3 = metadata !{metadata !4}<br class="">
+!4 = metadata !{i32 786434, metadata !5, null, metadata !"A", i32 2, i64 64, i64 64, i32 0, i32 0, null, metadata !6, i32 0, metadata !"_ZTS1A", null, metadata !"_ZTS1A"} ; [ DW_TAG_class_type ] [A] [line 2, size 64, align 64, offset 0] [def] [from ]<br class="">
+!5 = metadata !{metadata !"./ab.h", metadata !""}<br class="">
+!6 = metadata !{metadata !7, metadata !14, metadata !19}<br class="">
+!7 = metadata !{i32 786445, metadata !5, metadata !8, metadata !"_vptr$A", i32 0, i64 64, i64 0, i64 0, i32 64, metadata !9} ; [ DW_TAG_member ] [_vptr$A] [line 0, size 64, align 0, offset 0] [artificial] [from ]<br class="">
+!8 = metadata !{i32 786473, metadata !5} ; [ DW_TAG_file_type ] [/./ab.h]<br class="">
+!9 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 64, i64 0, i64 0, i32 0, metadata !10} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 0, offset 0] [from __vtbl_ptr_type]<br class="">
+!10 = metadata !{i32 786447, null, null, metadata !"__vtbl_ptr_type", i32 0, i64 64, i64 0, i64 0, i32 0, metadata !11} ; [ DW_TAG_pointer_type ] [__vtbl_ptr_type] [line 0, size 64, align 0, offset 0] [from ]<br class="">
+!11 = metadata !{i32 786453, i32 0, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !12, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]<br class="">
+!12 = metadata !{metadata !13}<br class="">
+!13 = metadata !{i32 786468, null, null, metadata !"int", i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]<br class="">
+!14 = metadata !{i32 786478, metadata !5, metadata !"_ZTS1A", metadata !"setFoo", metadata !"setFoo", metadata !"_ZN1A6setFooEv", i32 4, metadata !15, i1 false, i1 false, i32 1, i32 0, metadata !"_ZTS1A", i32 256, i1 false, null, null, i32 0, metadata !18, i32 4} ; [ DW_TAG_subprogram ] [line 4] [setFoo]<br class="">
+!15 = metadata !{i32 786453, i32 0, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !16, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]<br class="">
+!16 = metadata !{null, metadata !17}<br class="">
+!17 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 64, i64 64, i64 0, i32 1088, metadata !"_ZTS1A"} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [artificial] [from _ZTS1A]<br class="">
+!18 = metadata !{i32 786468}<br class="">
+!19 = metadata !{i32 786478, metadata !5, metadata !"_ZTS1A", metadata !"getFoo", metadata !"getFoo", metadata !"_ZN1A6getFooEv", i32 5, metadata !20, i1 false, i1 false, i32 1, i32 1, metadata !"_ZTS1A", i32 256, i1 false, null, null, i32 0, metadata !25, i32 5} ; [ DW_TAG_subprogram ] [line 5] [getFoo]<br class="">
+!20 = metadata !{i32 786453, i32 0, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !21, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]<br class="">
+!21 = metadata !{metadata !22, metadata !17}<br class="">
+!22 = metadata !{i32 786470, null, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, metadata !23} ; [ DW_TAG_const_type ] [line 0, size 0, align 0, offset 0] [from foo_t]<br class="">
+!23 = metadata !{i32 786454, metadata !24, null, metadata !"foo_t", i32 1, i64 0, i64 0, i64 0, i32 0, metadata !13} ; [ DW_TAG_typedef ] [foo_t] [line 1, size 0, align 0, offset 0] [from int]<br class="">
+!24 = metadata !{metadata !"a.cpp", metadata !""}<br class="">
+!25 = metadata !{i32 786468}<br class="">
+!26 = metadata !{metadata !27, metadata !31, metadata !34}<br class="">
+!27 = metadata !{i32 786478, metadata !24, metadata !28, metadata !"bar", metadata !"bar", metadata !"_Z3barv", i32 2, metadata !29, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 ()* @_Z3barv, null, null, metadata !2, i32 2} ; [ DW_TAG_subprogram ] [line 2] [def] [bar]<br class="">
+!28 = metadata !{i32 786473, metadata !24} ; [ DW_TAG_file_type ] [/a.cpp]<br class="">
+!29 = metadata !{i32 786453, i32 0, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !30, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]<br class="">
+!30 = metadata !{metadata !23}<br class="">
+!31 = metadata !{i32 786478, metadata !5, metadata !"_ZTS1A", metadata !"A", metadata !"A", metadata !"_ZN1AC1Ev", i32 2, metadata !15, i1 false, i1 true, i32 0, i32 0, null, i32 320, i1 false, void (%class.A*)* @_ZN1AC1Ev, null, metadata !32, metadata !2, i32 2} ; [ DW_TAG_subprogram ] [line 2] [def] [A]<br class="">
+!32 = metadata !{i32 786478, null, metadata !"_ZTS1A", metadata !"A", metadata !"A", metadata !"", i32 0, metadata !15, i1 false, i1 false, i32 0, i32 0, null, i32 320, i1 false, null, null, i32 0, metadata !33, i32 0} ; [ DW_TAG_subprogram ] [line 0] [A]<br class="">
+!33 = metadata !{i32 786468}<br class="">
+!34 = metadata !{i32 786478, metadata !5, metadata !"_ZTS1A", metadata !"A", metadata !"A", metadata !"_ZN1AC2Ev", i32 2, metadata !15, i1 false, i1 true, i32 0, i32 0, null, i32 320, i1 false, void (%class.A*)* @_ZN1AC2Ev, null, metadata !32, metadata !2, i32 2} ; [ DW_TAG_subprogram ] [line 2] [def] [A]<br class="">
+!35 = metadata !{i32 2, metadata !"Dwarf Version", i32 2}<br class="">
+!36 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}<br class="">
+!37 = metadata !{metadata !"clang version 3.5 "}<br class="">
+!38 = metadata !{i32 3, i32 0, metadata !27, null}<br class="">
+!39 = metadata !{i32 786689, metadata !31, metadata !"this", null, i32 16777216, metadata !40, i32 1088, i32 0} ; [ DW_TAG_arg_variable ] [this] [line 0]<br class="">
+!40 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 64, i64 64, i64 0, i32 0, metadata !"_ZTS1A"} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from _ZTS1A]<br class="">
+!41 = metadata !{i32 0, i32 0, metadata !31, null}<br class="">
+!42 = metadata !{i32 2, i32 0, metadata !43, null}<br class="">
+!43 = metadata !{i32 786443, metadata !5, metadata !31} ; [ DW_TAG_lexical_block ] [/./ab.h]<br class="">
+!44 = metadata !{i32 786689, metadata !34, metadata !"this", null, i32 16777216, metadata !40, i32 1088, i32 0} ; [ DW_TAG_arg_variable ] [this] [line 0]<br class="">
+!45 = metadata !{i32 0, i32 0, metadata !34, null}<br class="">
+!46 = metadata !{i32 2, i32 0, metadata !34, null}<br class="">
<br class="">
Added: llvm/trunk/test/Linker/type-unique-simple2-b.ll<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/type-unique-simple2-b.ll?rev=199536&view=auto" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/type-unique-simple2-b.ll?rev=199536&view=auto</a><br class="">
==============================================================================<br class="">
--- llvm/trunk/test/Linker/type-unique-simple2-b.ll (added)<br class="">
+++ llvm/trunk/test/Linker/type-unique-simple2-b.ll Fri Jan 17 20:12:00 2014<br class="">
@@ -0,0 +1,88 @@<br class="">
+; RUN: true<br class="">
+; This file belongs to type-unique-simple2-a.ll.<br class="">
+;<br class="">
+; $ cat b.cpp<br class="">
+; #include "ab.h"<br class="">
+; void A::setFoo() {}<br class="">
+; const<br class="">
+; foo_t A::getFoo() { return 1; }<br class="">
+; ModuleID = 'b.cpp'<br class="">
+; target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"<br class="">
+; target triple = "x86_64-apple-macosx10.9.0"<br class="">
+<br class="">
+%class.A = type { i32 (...)** }<br class="">
+<br class="">
+@_ZTV1A = unnamed_addr constant [4 x i8*] [i8* null, i8* bitcast ({ i8*, i8* }* @_ZTI1A to i8*), i8* bitcast (void (%class.A*)* @_ZN1A6setFooEv to i8*), i8* bitcast (i32 (%class.A*)* @_ZN1A6getFooEv to i8*)]<br class="">
+@_ZTVN10__cxxabiv117__class_type_infoE = external global i8*<br class="">
+@_ZTS1A = constant [3 x i8] c"1A\00"<br class="">
+@_ZTI1A = unnamed_addr constant { i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8** @_ZTVN10__cxxabiv117__class_type_infoE, i64 2) to i8*), i8* getelementptr inbounds ([3 x i8]* @_ZTS1A, i32 0, i32 0) }<br class="">
+<br class="">
+; Function Attrs: nounwind<br class="">
+define void @_ZN1A6setFooEv(%class.A* %this) unnamed_addr #0 align 2 {<br class="">
+entry:<br class="">
+ %this.addr = alloca %class.A*, align 8<br class="">
+ store %class.A* %this, %class.A** %this.addr, align 8<br class="">
+ call void @llvm.dbg.declare(metadata !{%class.A** %this.addr}, metadata !32), !dbg !34<br class="">
+ %this1 = load %class.A** %this.addr<br class="">
+ ret void, !dbg !35<br class="">
+}<br class="">
+<br class="">
+; Function Attrs: nounwind readnone<br class="">
+declare void @llvm.dbg.declare(metadata, metadata) #1<br class="">
+<br class="">
+; Function Attrs: nounwind<br class="">
+define i32 @_ZN1A6getFooEv(%class.A* %this) unnamed_addr #0 align 2 {<br class="">
+entry:<br class="">
+ %this.addr = alloca %class.A*, align 8<br class="">
+ store %class.A* %this, %class.A** %this.addr, align 8<br class="">
+ call void @llvm.dbg.declare(metadata !{%class.A** %this.addr}, metadata !36), !dbg !37<br class="">
+ %this1 = load %class.A** %this.addr<br class="">
+ ret i32 1, !dbg !38<br class="">
+}<br class="">
+<br class="">
+attributes #0 = { nounwind }<br class="">
+attributes #1 = { nounwind readnone }<br class="">
+<br class="">
+!<a href="http://llvm.dbg.cu/" target="_blank" class="">llvm.dbg.cu</a> = !{!0}<br class="">
+!llvm.module.flags = !{!29, !30}<br class="">
+!llvm.ident = !{!31}<br class="">
+<br class="">
+!0 = metadata !{i32 786449, metadata !1, i32 4, metadata !"clang version 3.5 ", i1 false, metadata !"", i32 0, metadata !2, metadata !3, metadata !25, metadata !2, metadata !2, metadata !""} ; [ DW_TAG_compile_unit ] [/<unknown>] [DW_LANG_C_plus_plus]<br class="">
+!1 = metadata !{metadata !"<unknown>", metadata !""}<br class="">
+!2 = metadata !{i32 0}<br class="">
+!3 = metadata !{metadata !4}<br class="">
+!4 = metadata !{i32 786434, metadata !5, null, metadata !"A", i32 2, i64 64, i64 64, i32 0, i32 0, null, metadata !6, i32 0, metadata !"_ZTS1A", null, metadata !"_ZTS1A"} ; [ DW_TAG_class_type ] [A] [line 2, size 64, align 64, offset 0] [def] [from ]<br class="">
+!5 = metadata !{metadata !"./ab.h", metadata !""}<br class="">
+!6 = metadata !{metadata !7, metadata !14, metadata !19}<br class="">
+!7 = metadata !{i32 786445, metadata !5, metadata !8, metadata !"_vptr$A", i32 0, i64 64, i64 0, i64 0, i32 64, metadata !9} ; [ DW_TAG_member ] [_vptr$A] [line 0, size 64, align 0, offset 0] [artificial] [from ]<br class="">
+!8 = metadata !{i32 786473, metadata !5} ; [ DW_TAG_file_type ] [/./ab.h]<br class="">
+!9 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 64, i64 0, i64 0, i32 0, metadata !10} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 0, offset 0] [from __vtbl_ptr_type]<br class="">
+!10 = metadata !{i32 786447, null, null, metadata !"__vtbl_ptr_type", i32 0, i64 64, i64 0, i64 0, i32 0, metadata !11} ; [ DW_TAG_pointer_type ] [__vtbl_ptr_type] [line 0, size 64, align 0, offset 0] [from ]<br class="">
+!11 = metadata !{i32 786453, i32 0, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !12, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]<br class="">
+!12 = metadata !{metadata !13}<br class="">
+!13 = metadata !{i32 786468, null, null, metadata !"int", i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]<br class="">
+!14 = metadata !{i32 786478, metadata !5, metadata !"_ZTS1A", metadata !"setFoo", metadata !"setFoo", metadata !"_ZN1A6setFooEv", i32 4, metadata !15, i1 false, i1 false, i32 1, i32 0, metadata !"_ZTS1A", i32 256, i1 false, null, null, i32 0, metadata !18, i32 4} ; [ DW_TAG_subprogram ] [line 4] [setFoo]<br class="">
+!15 = metadata !{i32 786453, i32 0, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !16, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]<br class="">
+!16 = metadata !{null, metadata !17}<br class="">
+!17 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 64, i64 64, i64 0, i32 1088, metadata !"_ZTS1A"} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [artificial] [from _ZTS1A]<br class="">
+!18 = metadata !{i32 786468}<br class="">
+!19 = metadata !{i32 786478, metadata !5, metadata !"_ZTS1A", metadata !"getFoo", metadata !"getFoo", metadata !"_ZN1A6getFooEv", i32 5, metadata !20, i1 false, i1 false, i32 1, i32 1, metadata !"_ZTS1A", i32 256, i1 false, null, null, i32 0, metadata !24, i32 5} ; [ DW_TAG_subprogram ] [line 5] [getFoo]<br class="">
+!20 = metadata !{i32 786453, i32 0, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !21, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]<br class="">
+!21 = metadata !{metadata !22, metadata !17}<br class="">
+!22 = metadata !{i32 786470, null, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, metadata !23} ; [ DW_TAG_const_type ] [line 0, size 0, align 0, offset 0] [from foo_t]<br class="">
+!23 = metadata !{i32 786454, metadata !5, null, metadata !"foo_t", i32 1, i64 0, i64 0, i64 0, i32 0, metadata !13} ; [ DW_TAG_typedef ] [foo_t] [line 1, size 0, align 0, offset 0] [from int]<br class="">
+!24 = metadata !{i32 786468}<br class="">
+!25 = metadata !{metadata !26, metadata !28}<br class="">
+!26 = metadata !{i32 786478, metadata !27, metadata !"_ZTS1A", metadata !"setFoo", metadata !"setFoo", metadata !"_ZN1A6setFooEv", i32 2, metadata !15, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, void (%class.A*)* @_ZN1A6setFooEv, null, metadata !14, metadata !2, i32 2} ; [ DW_TAG_subprogram ] [line 2] [def] [setFoo]<br class="">
+!27 = metadata !{metadata !"b.cpp", metadata !""}<br class="">
+!28 = metadata !{i32 786478, metadata !27, metadata !"_ZTS1A", metadata !"getFoo", metadata !"getFoo", metadata !"_ZN1A6getFooEv", i32 4, metadata !20, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 (%class.A*)* @_ZN1A6getFooEv, null, metadata !19, metadata !2, i32 4} ; [ DW_TAG_subprogram ] [line 4] [def] [getFoo]<br class="">
+!29 = metadata !{i32 2, metadata !"Dwarf Version", i32 2}<br class="">
+!30 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}<br class="">
+!31 = metadata !{metadata !"clang version 3.5 "}<br class="">
+!32 = metadata !{i32 786689, metadata !26, metadata !"this", null, i32 16777216, metadata !33, i32 1088, i32 0} ; [ DW_TAG_arg_variable ] [this] [line 0]<br class="">
+!33 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 64, i64 64, i64 0, i32 0, metadata !"_ZTS1A"} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from _ZTS1A]<br class="">
+!34 = metadata !{i32 0, i32 0, metadata !26, null}<br class="">
+!35 = metadata !{i32 2, i32 0, metadata !26, null}<br class="">
+!36 = metadata !{i32 786689, metadata !28, metadata !"this", null, i32 16777216, metadata !33, i32 1088, i32 0} ; [ DW_TAG_arg_variable ] [this] [line 0]<br class="">
+!37 = metadata !{i32 0, i32 0, metadata !28, null}<br class="">
+!38 = metadata !{i32 4, i32 0, metadata !28, null}<br class="">
<br class="">
<br class="">
_______________________________________________<br class="">
llvm-commits mailing list<br class="">
<a href="mailto:llvm-commits@cs.uiuc.edu" class="">llvm-commits@cs.uiuc.edu</a><br class="">
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank" class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br class="">
</blockquote></div><br class=""></div></div>
</div></blockquote></div><br class=""></div>_______________________________________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@cs.uiuc.edu" class="">llvm-commits@cs.uiuc.edu</a><br class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br class=""></div></blockquote></div><br class=""></div></body></html>