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