<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Nov 1, 2014 at 6:21 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: dblaikie<br>
Date: Sat Nov 1 20:21:43 2014<br>
New Revision: 221076<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=221076&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=221076&view=rev</a><br>
Log:<br>
Drop DwarfCompileUnit::getLocalLabel* in favor of just mapping through the skeleton explicitly.<br>
<br>
Confusing to do this two different ways - I'm not too wedded to either<br>
one, but here goes.<br></blockquote><div><br>Forgot to mention - the two ways I was referring to were the use of getLocalLabel* and mapping through the skeleton explicitly (which is what was being done in the pubnames emission code) - so I standardized on the latter. Open to standardizing on the former... *shrug*.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Modified:<br>
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h<br>
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp<br>
<br>
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h?rev=221076&r1=221075&r2=221076&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h?rev=221076&r1=221075&r2=221076&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h (original)<br>
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h Sat Nov 1 20:21:43 2014<br>
@@ -144,22 +144,6 @@ public:<br>
<br>
void collectDeadVariables(DISubprogram SP);<br>
<br>
- /// If there's a skeleton then return the begin label for the skeleton unit,<br>
- /// otherwise return the local label for this unit.<br>
- MCSymbol *getLocalLabelBegin() const {<br>
- if (Skeleton)<br>
- return Skeleton->getLabelBegin();<br>
- return getLabelBegin();<br>
- }<br>
-<br>
- /// If there's a skeleton then return the section symbol for the skeleton<br>
- /// unit, otherwise return the section symbol for this unit.<br>
- MCSymbol *getLocalSectionSym() const {<br>
- if (Skeleton)<br>
- return Skeleton->getSectionSym();<br>
- return getSectionSym();<br>
- }<br>
-<br>
/// Set the skeleton unit associated with this unit.<br>
void setSkeleton(DwarfCompileUnit &Skel) { Skeleton = &Skel; }<br>
<br>
<br>
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=221076&r1=221075&r2=221076&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=221076&r1=221075&r2=221076&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Sat Nov 1 20:21:43 2014<br>
@@ -1920,6 +1920,10 @@ void DwarfDebug::emitDebugARanges() {<br>
for (DwarfCompileUnit *CU : CUs) {<br>
std::vector<ArangeSpan> &List = Spans[CU];<br>
<br>
+ // Describe the skeleton CU's offset and length, not the dwo file's.<br>
+ if (auto *Skel = CU->getSkeleton())<br>
+ CU = Skel;<br>
+<br>
// Emit size of content not including length itself.<br>
unsigned ContentSize =<br>
sizeof(int16_t) + // DWARF ARange version number<br>
@@ -1942,7 +1946,7 @@ void DwarfDebug::emitDebugARanges() {<br>
Asm->OutStreamer.AddComment("DWARF Arange version number");<br>
Asm->EmitInt16(dwarf::DW_ARANGES_VERSION);<br>
Asm->OutStreamer.AddComment("Offset Into Debug Info Section");<br>
- Asm->EmitSectionOffset(CU->getLocalLabelBegin(), CU->getLocalSectionSym());<br>
+ Asm->EmitSectionOffset(CU->getLabelBegin(), CU->getSectionSym());<br>
Asm->OutStreamer.AddComment("Address Size (in bytes)");<br>
Asm->EmitInt8(PtrSize);<br>
Asm->OutStreamer.AddComment("Segment Size (in bytes)");<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>