<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 9, 2016, at 5:25 AM, Aboud, Amjad <<a href="mailto:amjad.aboud@intel.com" class="">amjad.aboud@intel.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Hi,<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">As we are talking about the code Adrian added, there is another issue with this code that leads into adding “DW_AT_abstract_origin” twice in the case when we have an inline function that is emitted also as concrete function.</span></div></div></div></blockquote><div><br class=""></div>Thanks for catching this:</div><div><br class=""></div><div>Prevent DW_AT_abstract_origin from being emitted twice for the same subprogram<br class=""><a href="http://reviews.llvm.org/D20072" class="">http://reviews.llvm.org/D20072</a></div><div><br class=""></div><div>-- adrian</div><div><blockquote type="cite" class=""><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Source (test.cpp):<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">int</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> bar(</span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">int</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>x) {<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> <o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> </span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">return</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>x+9;<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">}<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">int</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>foo(</span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">int</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>y) {<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> <span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">return</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>bar(y);<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">}</span><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Command line:<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">clang "-cc1" "-triple" "x86_64-linux" "-emit-obj" "-debug-info-kind=standalone" "-O2" test.cpp "-o -" | llvm-dwarfdump -debug-dump=info –<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">0x0000002a: DW_TAG_subprogram [2] *<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> DW_AT_high_pc [DW_FORM_data4] (0x00000004)<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> DW_AT_APPLE_omit_frame_ptr [DW_FORM_flag_present] (true)<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> DW_AT_frame_base [DW_FORM_exprloc] (<0x1> 57 )<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> <span class="Apple-converted-space"> </span><span style="background-color: yellow; background-position: initial initial; background-repeat: initial initial;" class="">DW_AT_abstract_origin [DW_FORM_ref4] (cu + 0x004b => {0x0000004b} "_Z3bari")<o:p class=""></o:p></span></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> <span style="background-color: yellow; background-position: initial initial; background-repeat: initial initial;" class="">DW_AT_abstract_origin [DW_FORM_ref4] (cu + 0x004b => {0x0000004b} "_Z3bari")</span><o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><a name="_MailEndCompose" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""> </o:p></span></a></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">This also happen due to “finishSubprogramDefinitions”:<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">void</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: rgb(43, 145, 175); background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">DwarfDebug</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">::finishSubprogramDefinitions() {<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> <span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">for</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>(</span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">auto</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>&F : MMI->getModule()->functions())<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> <span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">if</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>(</span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">auto</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>*SP = F.getSubprogram())<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> <span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">if</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>(ProcessedSPNodes.count(SP) &&<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> SP->getUnit()->getEmissionKind() !=<span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: rgb(43, 145, 175); background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">DICompileUnit</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">::</span><span style="font-size: 9.5pt; font-family: Consolas; color: rgb(47, 79, 79); background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">NoDebug</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">)<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> forBothCUs(*CUMap.lookup(SP->getUnit()), [&](</span><span style="font-size: 9.5pt; font-family: Consolas; color: rgb(43, 145, 175); background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">DwarfCompileUnit</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>&</span><span style="font-size: 9.5pt; font-family: Consolas; color: gray; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">CU</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">) {<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> <span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: gray; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">CU</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">.finishSubprogramDefinition(SP); <span class="Apple-converted-space"> </span></span><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><------------- This line adds the first<span class="Apple-converted-space"> </span><span style="background-color: yellow; background-position: initial initial; background-repeat: initial initial;" class="">DW_AT_abstract_origin</span></span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> });<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> <span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">for</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>(</span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">auto</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>*AbsScope : LScopes.getAbstractScopesList())<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> <span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">if</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>(</span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">auto</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>*SP = dyn_cast<</span><span style="font-size: 9.5pt; font-family: Consolas; color: rgb(43, 145, 175); background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">DISubprogram</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">>(AbsScope->getScopeNode()))<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> <span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">if</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>(ProcessedSPNodes.count(SP) &&<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> SP->getUnit()->getEmissionKind() !=<span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: rgb(43, 145, 175); background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">DICompileUnit</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">::</span><span style="font-size: 9.5pt; font-family: Consolas; color: rgb(47, 79, 79); background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">NoDebug</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">)<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> forBothCUs(*CUMap.lookup(SP->getUnit()), [&](</span><span style="font-size: 9.5pt; font-family: Consolas; color: rgb(43, 145, 175); background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">DwarfCompileUnit</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>&</span><span style="font-size: 9.5pt; font-family: Consolas; color: gray; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">CU</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">) {<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> <span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: gray; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">CU</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">.finishSubprogramDefinition(SP); <span class="Apple-converted-space"> </span></span><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><------------- This line adds the second<span class="Apple-converted-space"> </span><span style="background-color: yellow; background-position: initial initial; background-repeat: initial initial;" class="">DW_AT_abstract_origin</span></span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> });<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">}</span><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Regards,<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Amjad<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""> </o:p></span></div><div style="border-style: none none none solid; border-left-color: blue; border-left-width: 1.5pt; padding: 0in 0in 0in 4pt;" class=""><div class=""><div style="border-style: solid none none; border-top-color: rgb(225, 225, 225); border-top-width: 1pt; padding: 3pt 0in 0in;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><a name="_____replyseparator" class=""></a><b class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif;" class="">From:</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="Apple-converted-space"> </span>David Blaikie [<a href="mailto:dblaikie@gmail.com" class="">mailto:dblaikie@gmail.com</a>]<span class="Apple-converted-space"> </span><br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Sunday, May 08, 2016 18:12<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>Aboud, Amjad <<a href="mailto:amjad.aboud@intel.com" class="">amjad.aboud@intel.com</a>><br class=""><b class="">Cc:</b><span class="Apple-converted-space"> </span>Adrian Prantl <<a href="mailto:aprantl@apple.com" class="">aprantl@apple.com</a>>; llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>>; Clang Dev <<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: Debug info scope of explicit casting type does not seem correct<o:p class=""></o:p></span></div></div></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><o:p class=""> </o:p></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">That'd be a bug - we should finish adding attributes to it at some point. If we can detect that it's never going to be handled (that it's been entirely optimized away) by the other codepaths, we should do it up-front. Otherwise we may need to add it to a list somewhere to be handled.<br class=""><br class="">Ah, this probably regressed when we switched the direction of the link in subprograms (from CU->subprogram to subprogram->CU). Adrian?<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><o:p class=""> </o:p></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">On Sun, May 8, 2016 at 1:13 AM, Aboud, Amjad <<a href="mailto:amjad.aboud@intel.com" target="_blank" style="color: purple; text-decoration: underline;" class="">amjad.aboud@intel.com</a>> wrote:<o:p class=""></o:p></div><blockquote style="border-style: none none none solid; border-left-color: rgb(204, 204, 204); border-left-width: 1pt; padding: 0in 0in 0in 6pt; margin-left: 4.8pt; margin-right: 0in;" class=""><div class=""><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">That happens because we create the subprogram below as a context to the “DW_TAG_typedef” that was created as a type to “DW_TAG_pointer_type” that was added to the retained type list because of the explicit cast to (T*).</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">This is the code that creates DW_TAG_subprogram:</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; color: rgb(43, 145, 175); background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">DIE</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>*</span><span style="font-size: 9.5pt; font-family: Consolas; color: rgb(43, 145, 175); background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">DwarfUnit</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">::getOrCreateSubprogramDIE(</span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">const</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: rgb(43, 145, 175); background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">DISubprogram</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>*</span><span style="font-size: 9.5pt; font-family: Consolas; color: gray; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">SP</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">,<span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">bool</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: gray; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">Minimal</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">) {</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> </span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">...</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> </span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> <span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: green; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">// DW_TAG_inlined_subroutine may refer to this DIE.</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> <span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: rgb(43, 145, 175); background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">DIE</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>&SPDie = createAndAddDIE(dwarf::</span><span style="font-size: 9.5pt; font-family: Consolas; color: rgb(47, 79, 79); background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">DW_TAG_subprogram</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">, *ContextDIE,<span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: gray; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">SP</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">);</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> </span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> <span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: green; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">// Stop here and fill this in later, depending on whether or not this</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> <span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: green; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">// subprogram turns out to have inlined instances or not.</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> <span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">if</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>(</span><span style="font-size: 9.5pt; font-family: Consolas; color: gray; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">SP</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">->isDefinition())</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> <span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">return</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>&SPDie; <span class="Apple-converted-space"> </span></span><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><------------- In our case the function returns here, and does not apply attributes</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">.</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> </span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> applySubprogramAttributes(</span><span style="font-size: 9.5pt; font-family: Consolas; color: gray; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">SP</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">, SPDie);</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> <span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">return</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>&SPDie;</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">}</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas;" class=""> </span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">It assumes that later when the function is finalized the attributes will be applied, which is called from this code:</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">void</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: rgb(43, 145, 175); background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">DwarfDebug</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">::finishSubprogramDefinitions() {</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> <span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">for</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>(</span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">auto</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>&F : MMI->getModule()->functions())</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> <span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">if</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>(</span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">auto</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>*SP = F.getSubprogram())</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> <span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">if</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>(ProcessedSPNodes.count(SP) &&</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> SP->getUnit()->getEmissionKind() !=<span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: rgb(43, 145, 175); background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">DICompileUnit</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">::</span><span style="font-size: 9.5pt; font-family: Consolas; color: rgb(47, 79, 79); background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">NoDebug</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">)</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> forBothCUs(*CUMap.lookup(SP->getUnit()), [&](</span><span style="font-size: 9.5pt; font-family: Consolas; color: rgb(43, 145, 175); background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">DwarfCompileUnit</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""><span class="Apple-converted-space"> </span>&</span><span style="font-size: 9.5pt; font-family: Consolas; color: gray; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">CU</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">) {</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> <span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: gray; background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">CU</span><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">.finishSubprogramDefinition(SP);<span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas;" class=""> </span><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><------------- In our case, this code will not be reached for the above subprogram.</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class=""> });</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">...</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 9.5pt; font-family: Consolas; background-color: white;" class="">}</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">However, the function was optimized out and the code will not call “finishSubprogramDefinition” for it, and attributes will not be added.</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Regards,</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Amjad</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><a name="m_3997492950246121290__MailEndCompose" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span></a><o:p class=""></o:p></div><div style="border-style: none none none solid; border-left-color: blue; border-left-width: 1.5pt; padding: 0in 0in 0in 4pt;" class=""><div class=""><div style="border-style: solid none none; border-top-color: rgb(225, 225, 225); border-top-width: 1pt; padding: 3pt 0in 0in;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><a name="m_3997492950246121290______replyseparato" class=""></a><b class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif;" class="">From:</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="Apple-converted-space"> </span>David Blaikie [mailto:<a href="mailto:dblaikie@gmail.com" target="_blank" style="color: purple; text-decoration: underline;" class="">dblaikie@gmail.com</a>]<span class="Apple-converted-space"> </span><br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Saturday, May 07, 2016 21:38</span><o:p class=""></o:p></div><div class=""><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>Aboud, Amjad <<a href="mailto:amjad.aboud@intel.com" target="_blank" style="color: purple; text-decoration: underline;" class="">amjad.aboud@intel.com</a>><br class=""><b class="">Cc:</b><span class="Apple-converted-space"> </span>Adrian Prantl <<a href="mailto:aprantl@apple.com" target="_blank" style="color: purple; text-decoration: underline;" class="">aprantl@apple.com</a>>; llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" style="color: purple; text-decoration: underline;" class="">llvm-dev@lists.llvm.org</a>>; Clang Dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank" style="color: purple; text-decoration: underline;" class="">cfe-dev@lists.llvm.org</a>><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: Debug info scope of explicit casting type does not seem correct<o:p class=""></o:p></div></div></div></div></div><div class=""><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">Under what conditions do we produce a subprogram with no attributes? At first glance that certainly seems not useful, but perhaps there's a reason for it.<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">On Sat, May 7, 2016 at 3:02 AM, Aboud, Amjad <<a href="mailto:amjad.aboud@intel.com" target="_blank" style="color: purple; text-decoration: underline;" class="">amjad.aboud@intel.com</a>> wrote:<o:p class=""></o:p></div><blockquote style="border-style: none none none solid; border-left-color: rgb(204, 204, 204); border-left-width: 1pt; padding: 0in 0in 0in 6pt; margin: 5pt 0in 5pt 4.8pt;" class=""><div class=""><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Hi David,</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">OK, I got that DIE in Compile Unit scope may point to a DIE in subprogram scope.</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">But how about that we are emitting a subprogram entry that has no attributes?</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">0x0000002b: DW_TAG_subprogram [3] *<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">0x0000002c: DW_TAG_typedef [4]<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> DW_AT_type [DW_FORM_ref4] (cu + 0x0040 => {0x00000040})<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000060] = "T")<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> DW_AT_decl_file [DW_FORM_data1] ("c:\temp\ICL\LB\retain.cpp")<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> DW_AT_decl_line [DW_FORM_data1] (16)<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> </span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Regards,</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Amjad</span><o:p class=""></o:p></div><div style="border-style: none none none solid; border-left-color: blue; border-left-width: 1.5pt; padding: 0in 0in 0in 4pt;" class=""><div class=""><div style="border-style: solid none none; border-top-color: rgb(225, 225, 225); border-top-width: 1pt; padding: 3pt 0in 0in;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><a name="m_3997492950246121290_m_-889567712679697" class=""></a><b class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif;" class="">From:</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="Apple-converted-space"> </span>David Blaikie [mailto:<a href="mailto:dblaikie@gmail.com" target="_blank" style="color: purple; text-decoration: underline;" class="">dblaikie@gmail.com</a>]<span class="Apple-converted-space"> </span><br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Saturday, April 30, 2016 17:59<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>Aboud, Amjad <<a href="mailto:amjad.aboud@intel.com" target="_blank" style="color: purple; text-decoration: underline;" class="">amjad.aboud@intel.com</a>><br class=""><b class="">Cc:</b><span class="Apple-converted-space"> </span>Adrian Prantl <<a href="mailto:aprantl@apple.com" target="_blank" style="color: purple; text-decoration: underline;" class="">aprantl@apple.com</a>>; llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" style="color: purple; text-decoration: underline;" class="">llvm-dev@lists.llvm.org</a>>; Clang Dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank" style="color: purple; text-decoration: underline;" class="">cfe-dev@lists.llvm.org</a>><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: Debug info scope of explicit casting type does not seem correct</span><o:p class=""></o:p></div></div></div><div class=""><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div><div class=""><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 12pt; font-family: 'Times New Roman', serif;">Yep, seems fine/reasonable to me. The pointer type has no logical scope so it doesn't really matter where its DIE goes.<br class=""><br class="">GCC does put the pointer type in the function scope in basic cases, but it can also end up in other places. For example:<o:p class=""></o:p></p><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class="">blaikie@blaikie-linux:~/dev$ cat func.cpp</span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class="">void sink(void*);</span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class="">template<typename T></span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class="">void f1() {</span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class=""> T *t;</span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class=""> sink(&t);</span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class="">}</span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class="">void f2() {</span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class=""> struct foo { };</span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class=""> f1<foo>();</span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class="">}</span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class="">blaikie@blaikie-linux:~/dev$ g++-4.7 -std=c++11 func.cpp -g -c && llvm-dwarfdump-tot -debug-dump=info func.o | grep DW_TAG</span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class="">0x0000000b: DW_TAG_compile_unit [1] *</span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class="">0x0000002d: DW_TAG_subprogram [2] * // f2</span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class="">0x00000051: DW_TAG_lexical_block [3] </span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class="">0x00000062: DW_TAG_structure_type [4] </span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class="">0x0000006b: DW_TAG_subprogram [5] * // f1</span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class="">0x00000087: DW_TAG_template_type_parameter [6] </span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class="">0x0000008e: DW_TAG_lexical_block [7] *</span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class="">0x0000009f: DW_TAG_variable [8] </span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class="">0x000000ab: DW_TAG_pointer_type [9] // foo*</span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class=""> </span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class="">& in fact, if you introduce another template that's similar to f1, its variable's type is 0x00ab - so it points into f1's children. Seems GCC puts it in whatever scope first references the pointer type.</span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class=""> </span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class="">I think it's probably as sensible, and a bit simpler, to put any such basic types in the CU scope.</span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class=""> </span><o:p class=""></o:p></pre><pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: 'Courier New';" class=""><span style="" class="">(granted, if GCC and Clang were really smart, the pointer type in f1 could be pointer to 0x0087 - but that would really bloat the debug info (now every different way of writing foo* in every different template would be a separate type description... - that would probably be not good))</span><o:p class=""></o:p></pre></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">On Sat, Apr 30, 2016 at 3:32 AM, Aboud, Amjad <<a href="mailto:amjad.aboud@intel.com" target="_blank" style="color: purple; text-decoration: underline;" class="">amjad.aboud@intel.com</a>> wrote:<o:p class=""></o:p></div><blockquote style="border-style: none none none solid; border-left-color: rgb(204, 204, 204); border-left-width: 1pt; padding: 0in 0in 0in 6pt; margin: 5pt 0in 5pt 4.8pt;" class=""><div class=""><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">Hi,<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">I am wondering if this behavior of creating debug info is correct.<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">A type in compile unit entry is pointing to a type under subprogram entry?!<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">This is the root cause of<span class="Apple-converted-space"> </span><a href="https://llvm.org/bugs/show_bug.cgi?id=27579" target="_blank" style="color: purple; text-decoration: underline;" class="">https://llvm.org/bugs/show_bug.cgi?id=27579</a><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">0x0000000b: DW_TAG_compile_unit [1] *<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">0x00000026: DW_TAG_pointer_type [2]<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> DW_AT_type [DW_FORM_ref4] (cu + 0x002c => {<span style="background-color: yellow; background-position: initial initial; background-repeat: initial initial;" class="">0x0000002c</span>})<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">0x0000002b: DW_TAG_subprogram [3] *<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="background-color: yellow; background-position: initial initial; background-repeat: initial initial;" class="">0x0000002c</span>: DW_TAG_typedef [4]<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> DW_AT_type [DW_FORM_ref4] (cu + 0x0040 => {0x00000040})<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000060] = "T")<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> DW_AT_decl_file [DW_FORM_data1] ("c:\temp\ICL\LB\retain.cpp")<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> DW_AT_decl_line [DW_FORM_data1] (16)<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">0x00000037: NULL<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">command line:<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">clang -cc1 -triple i386-apple-ios9.0.0 -emit-obj -debug-info-kind=limited -O2 test.cpp –o - | llvm-dwarfdump -debug-dump=info -<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">> cat test.cpp<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">class A {<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">public:<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> int x;<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">};<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">class B {<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">public:<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> typedef A type;<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">};<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">template<typename X><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">int foo(void* in) {<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> typedef typename X::type T;<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> const T* p = (T*) in;<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> return p->x;<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">}<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">int bar() {<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">A a;<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> return foo<B>(&a);<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">}<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">Reason for this behavior is the explicit cast “(T*)“, which leads into the following IR:<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.9.0 (trunk 267335)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes:<span class="Apple-converted-space"> </span><span style="background-color: yellow; background-position: initial initial; background-repeat: initial initial;" class="">!3</span>)<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="background-color: yellow; background-position: initial initial; background-repeat: initial initial;" class="">!3</span><span class="Apple-converted-space"> </span>= !{<span style="background-color: yellow; background-position: initial initial; background-repeat: initial initial;" class="">!4</span>}<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="background-color: yellow; background-position: initial initial; background-repeat: initial initial;" class="">!4</span><span class="Apple-converted-space"> </span>= !DIDerivedType(tag: DW_TAG_pointer_type, baseType:<span class="Apple-converted-space"> </span><span style="background-color: yellow; background-position: initial initial; background-repeat: initial initial;" class="">!5</span>, size: 32, align: 32) <----------------- No Scope, leads to compile unit scope!!<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="background-color: yellow; background-position: initial initial; background-repeat: initial initial;" class="">!5</span><span class="Apple-converted-space"> </span>= !DIDerivedType(tag: DW_TAG_typedef, name: "T", scope:<span class="Apple-converted-space"> </span><span style="background-color: yellow; background-position: initial initial; background-repeat: initial initial;" class="">!7</span>, file: !6, line: 16, baseType: !20)<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="background-color: yellow; background-position: initial initial; background-repeat: initial initial;" class="">!7</span><span class="Apple-converted-space"> </span>= distinct !<span style="background-color: yellow; background-position: initial initial; background-repeat: initial initial;" class="">DISubprogram</span>(name: "foo<B>", linkageName: "_Z3fooI1BEiPv", scope: !6, file: !6, line: 15, type: !8, isLocal: false, isDefinition: true, scopeLine: 15, flags: DIFlagPrototyped, isOptimized: true, unit: !0, templateParams: !12, variables: !15)<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">Thanks,<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">Amjad<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div></div><p style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">---------------------------------------------------------------------<br class="">Intel Israel (74) Limited<o:p class=""></o:p></p><p style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">This e-mail and any attachments may contain confidential material for<br class="">the sole use of the intended recipient(s). Any review or distribution<br class="">by others is strictly prohibited. If you are not the intended<br class="">recipient, please contact the sender and delete all copies.<o:p class=""></o:p></p></div></blockquote></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div></div></div></div></div></div><div class=""><div class=""><p style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">---------------------------------------------------------------------<br class="">Intel Israel (74) Limited<o:p class=""></o:p></p><p style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">This e-mail and any attachments may contain confidential material for<br class="">the sole use of the intended recipient(s). Any review or distribution<br class="">by others is strictly prohibited. If you are not the intended<br class="">recipient, please contact the sender and delete all copies.<o:p class=""></o:p></p></div></div></div></blockquote></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""> <o:p class=""></o:p></div></div></div></div></div></div><div class=""><div class=""><p style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">---------------------------------------------------------------------<br class="">Intel Israel (74) Limited<o:p class=""></o:p></p><p style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">This e-mail and any attachments may contain confidential material for<br class="">the sole use of the intended recipient(s). Any review or distribution<br class="">by others is strictly prohibited. If you are not the intended<br class="">recipient, please contact the sender and delete all copies.<o:p class=""></o:p></p></div></div></div></blockquote></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><o:p class=""> </o:p></div></div></div></div><p style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">---------------------------------------------------------------------<br class="">Intel Israel (74) Limited</p><p style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">This e-mail and any attachments may contain confidential material for<br class="">the sole use of the intended recipient(s). Any review or distribution<br class="">by others is strictly prohibited. If you are not the intended<br class="">recipient, please contact the sender and delete all copies.</p></div></blockquote></div><br class=""></body></html>