<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 Sep 10, 2015, at 9:21 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=""><div class="gmail_quote">On Thu, Sep 10, 2015 at 9:17 PM, Frederic Riss via llvm-commits <span dir="ltr" class=""><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: friss<br class="">
Date: Thu Sep 10 23:17:25 2015<br class="">
New Revision: 247385<br class="">
<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=247385&view=rev" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=247385&view=rev</a><br class="">
Log:<br class="">
[dsymutil] Rename some variables NFC.<br class="">
<br class="">
lldb doesn't like having variables named as an existing type. </blockquote><div class=""><br class=""></div><div class="">Filed a bug for that?</div></div></div></div></div></blockquote><div><br class=""></div><div>Yes, but an internal one. I suppose this also affects open source LLDB, but honestly I never built it so I’d feel a bit uncomfortable filling a bugzilla PR about that.</div><div>(BTW, I didn’t forget our other thread, I’m currently composing a reply).</div><div><br class=""></div><div>Fred</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In order to<br class="">
ease debugging, rename those variables to avoid that conflict.<br class="">
<br class="">
Modified:<br class="">
llvm/trunk/tools/dsymutil/DwarfLinker.cpp<br class="">
<br class="">
Modified: llvm/trunk/tools/dsymutil/DwarfLinker.cpp<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/dsymutil/DwarfLinker.cpp?rev=247385&r1=247384&r2=247385&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/dsymutil/DwarfLinker.cpp?rev=247385&r1=247384&r2=247385&view=diff</a><br class="">
==============================================================================<br class="">
--- llvm/trunk/tools/dsymutil/DwarfLinker.cpp (original)<br class="">
+++ llvm/trunk/tools/dsymutil/DwarfLinker.cpp Thu Sep 10 23:17:25 2015<br class="">
@@ -1998,7 +1998,7 @@ unsigned DwarfLinker::shouldKeepDIE(cons<br class="">
/// back to lookForDIEsToKeep while adding TF_DependencyWalk to the<br class="">
/// TraversalFlags to inform it that it's not doing the primary DIE<br class="">
/// tree walk.<br class="">
-void DwarfLinker::keepDIEAndDenpendencies(const DWARFDebugInfoEntryMinimal &DIE,<br class="">
+void DwarfLinker::keepDIEAndDenpendencies(const DWARFDebugInfoEntryMinimal &Die,<br class="">
CompileUnit::DIEInfo &MyInfo,<br class="">
const DebugMapObject &DMO,<br class="">
CompileUnit &CU, bool UseODR) {<br class="">
@@ -2017,8 +2017,8 @@ void DwarfLinker::keepDIEAndDenpendencie<br class="">
// Then we need to mark all the DIEs referenced by this DIE's<br class="">
// attributes as kept.<br class="">
DataExtractor Data = Unit.getDebugInfoExtractor();<br class="">
- const auto *Abbrev = DIE.getAbbreviationDeclarationPtr();<br class="">
- uint32_t Offset = DIE.getOffset() + getULEB128Size(Abbrev->getCode());<br class="">
+ const auto *Abbrev = Die.getAbbreviationDeclarationPtr();<br class="">
+ uint32_t Offset = Die.getOffset() + getULEB128Size(Abbrev->getCode());<br class="">
<br class="">
// Mark all DIEs referenced through atttributes as kept.<br class="">
for (const auto &AttrSpec : Abbrev->attributes()) {<br class="">
@@ -2032,7 +2032,7 @@ void DwarfLinker::keepDIEAndDenpendencie<br class="">
Val.extractValue(Data, &Offset, &Unit);<br class="">
CompileUnit *ReferencedCU;<br class="">
if (const auto *RefDIE =<br class="">
- resolveDIEReference(Val, Unit, DIE, ReferencedCU)) {<br class="">
+ resolveDIEReference(Val, Unit, Die, ReferencedCU)) {<br class="">
uint32_t RefIdx = ReferencedCU->getOrigUnit().getDIEIndex(RefDIE);<br class="">
CompileUnit::DIEInfo &Info = ReferencedCU->getInfo(RefIdx);<br class="">
// If the referenced DIE has a DeclContext that has already been<br class="">
@@ -2067,10 +2067,10 @@ void DwarfLinker::keepDIEAndDenpendencie<br class="">
/// also called, but during these dependency walks the file order is<br class="">
/// not respected. The TF_DependencyWalk flag tells us which kind of<br class="">
/// traversal we are currently doing.<br class="">
-void DwarfLinker::lookForDIEsToKeep(const DWARFDebugInfoEntryMinimal &DIE,<br class="">
+void DwarfLinker::lookForDIEsToKeep(const DWARFDebugInfoEntryMinimal &Die,<br class="">
const DebugMapObject &DMO, CompileUnit &CU,<br class="">
unsigned Flags) {<br class="">
- unsigned Idx = CU.getOrigUnit().getDIEIndex(&DIE);<br class="">
+ unsigned Idx = CU.getOrigUnit().getDIEIndex(&Die);<br class="">
CompileUnit::DIEInfo &MyInfo = CU.getInfo(Idx);<br class="">
bool AlreadyKept = MyInfo.Keep;<br class="">
<br class="">
@@ -2083,12 +2083,12 @@ void DwarfLinker::lookForDIEsToKeep(cons<br class="">
// We must not call shouldKeepDIE while called from keepDIEAndDenpendencies,<br class="">
// because it would screw up the relocation finding logic.<br class="">
if (!(Flags & TF_DependencyWalk))<br class="">
- Flags = shouldKeepDIE(DIE, CU, MyInfo, Flags);<br class="">
+ Flags = shouldKeepDIE(Die, CU, MyInfo, Flags);<br class="">
<br class="">
// If it is a newly kept DIE mark it as well as all its dependencies as kept.<br class="">
if (!AlreadyKept && (Flags & TF_Keep)) {<br class="">
bool UseOdr = (Flags & TF_DependencyWalk) ? (Flags & TF_ODR) : CU.hasODR();<br class="">
- keepDIEAndDenpendencies(DIE, MyInfo, DMO, CU, UseOdr);<br class="">
+ keepDIEAndDenpendencies(Die, MyInfo, DMO, CU, UseOdr);<br class="">
}<br class="">
// The TF_ParentWalk flag tells us that we are currently walking up<br class="">
// the parent chain of a required DIE, and we don't want to mark all<br class="">
@@ -2096,13 +2096,13 @@ void DwarfLinker::lookForDIEsToKeep(cons<br class="">
// DW_TAG_namespace node in the parent chain). There are however a<br class="">
// set of DIE types for which we want to ignore that directive and still<br class="">
// walk their children.<br class="">
- if (dieNeedsChildrenToBeMeaningful(DIE.getTag()))<br class="">
+ if (dieNeedsChildrenToBeMeaningful(Die.getTag()))<br class="">
Flags &= ~TF_ParentWalk;<br class="">
<br class="">
- if (!DIE.hasChildren() || (Flags & TF_ParentWalk))<br class="">
+ if (!Die.hasChildren() || (Flags & TF_ParentWalk))<br class="">
return;<br class="">
<br class="">
- for (auto *Child = DIE.getFirstChild(); Child && !Child->isNULL();<br class="">
+ for (auto *Child = Die.getFirstChild(); Child && !Child->isNULL();<br class="">
Child = Child->getSibling())<br class="">
lookForDIEsToKeep(*Child, DMO, CU, Flags);<br class="">
}<br class="">
<br class="">
<br class="">
_______________________________________________<br class="">
llvm-commits mailing list<br class="">
<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="">
</blockquote></div><br class=""></div></div>
</div></blockquote></div><br class=""></body></html>