[llvm] r221076 - Drop DwarfCompileUnit::getLocalLabel* in favor of just mapping through the skeleton explicitly.
David Blaikie
dblaikie at gmail.com
Sat Nov 1 18:35:00 PDT 2014
On Sat, Nov 1, 2014 at 6:21 PM, David Blaikie <dblaikie at gmail.com> wrote:
> Author: dblaikie
> Date: Sat Nov 1 20:21:43 2014
> New Revision: 221076
>
> URL: http://llvm.org/viewvc/llvm-project?rev=221076&view=rev
> Log:
> Drop DwarfCompileUnit::getLocalLabel* in favor of just mapping through the
> skeleton explicitly.
>
> Confusing to do this two different ways - I'm not too wedded to either
> one, but here goes.
>
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*.
>
> Modified:
> llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
> llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h?rev=221076&r1=221075&r2=221076&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h (original)
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h Sat Nov 1
> 20:21:43 2014
> @@ -144,22 +144,6 @@ public:
>
> void collectDeadVariables(DISubprogram SP);
>
> - /// If there's a skeleton then return the begin label for the skeleton
> unit,
> - /// otherwise return the local label for this unit.
> - MCSymbol *getLocalLabelBegin() const {
> - if (Skeleton)
> - return Skeleton->getLabelBegin();
> - return getLabelBegin();
> - }
> -
> - /// If there's a skeleton then return the section symbol for the
> skeleton
> - /// unit, otherwise return the section symbol for this unit.
> - MCSymbol *getLocalSectionSym() const {
> - if (Skeleton)
> - return Skeleton->getSectionSym();
> - return getSectionSym();
> - }
> -
> /// Set the skeleton unit associated with this unit.
> void setSkeleton(DwarfCompileUnit &Skel) { Skeleton = &Skel; }
>
>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=221076&r1=221075&r2=221076&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Sat Nov 1 20:21:43
> 2014
> @@ -1920,6 +1920,10 @@ void DwarfDebug::emitDebugARanges() {
> for (DwarfCompileUnit *CU : CUs) {
> std::vector<ArangeSpan> &List = Spans[CU];
>
> + // Describe the skeleton CU's offset and length, not the dwo file's.
> + if (auto *Skel = CU->getSkeleton())
> + CU = Skel;
> +
> // Emit size of content not including length itself.
> unsigned ContentSize =
> sizeof(int16_t) + // DWARF ARange version number
> @@ -1942,7 +1946,7 @@ void DwarfDebug::emitDebugARanges() {
> Asm->OutStreamer.AddComment("DWARF Arange version number");
> Asm->EmitInt16(dwarf::DW_ARANGES_VERSION);
> Asm->OutStreamer.AddComment("Offset Into Debug Info Section");
> - Asm->EmitSectionOffset(CU->getLocalLabelBegin(),
> CU->getLocalSectionSym());
> + Asm->EmitSectionOffset(CU->getLabelBegin(), CU->getSectionSym());
> Asm->OutStreamer.AddComment("Address Size (in bytes)");
> Asm->EmitInt8(PtrSize);
> Asm->OutStreamer.AddComment("Segment Size (in bytes)");
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141101/e7a57d4d/attachment.html>
More information about the llvm-commits
mailing list