<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Apr 16, 2013, at 2:32 PM, Eli Bendersky <<a href="mailto:eliben@google.com">eliben@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="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 dir="ltr">On Tue, Apr 16, 2013 at 12:05 PM, Jim Grosbach<span class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:grosbach@apple.com" target="_blank">grosbach@apple.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">DL and dl often are used for debugloc elsewhere. Thoughts on alternatives?</blockquote><div><br></div><div>Good point. I don't think there should be a lot of places where there's a conflict between the two, and wherever it is, the conflict can be resolved by using longer an more meaningful names. I'm not sure it's the only place in LLVM code where there's such a conflict...</div><div><br></div><div>Eli</div><div><br></div><div> </div><div><br></div></div></div></div></div></blockquote><div><br></div><div>Sounds reasonable. Just something that caught my eye. Thanks!</div><div><br></div><div>-Jim</div><br><blockquote type="cite"><div style="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 dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div class="HOEnZb"><div class="h5">On Apr 16, 2013, at 8:41 AM, Eli Bendersky <<a href="mailto:eliben@google.com">eliben@google.com</a>> wrote:<br><br>> Author: eliben<br>> Date: Tue Apr 16 10:41:18 2013<br>> New Revision: 179601<br>><br>> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=179601&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=179601&view=rev</a><br>> Log:<br>> Cleanup naming: DataLayout s/TD/DL/<br>><br>><br>> Modified:<br>>    llvm/trunk/include/llvm/IR/DataLayout.h<br>>    llvm/trunk/lib/IR/DataLayout.cpp<br>><br>> Modified: llvm/trunk/include/llvm/IR/DataLayout.h<br>> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DataLayout.h?rev=179601&r1=179600&r2=179601&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DataLayout.h?rev=179601&r1=179600&r2=179601&view=diff</a><br>> ==============================================================================<br>> --- llvm/trunk/include/llvm/IR/DataLayout.h (original)<br>> +++ llvm/trunk/include/llvm/IR/DataLayout.h Tue Apr 16 10:41:18 2013<br>> @@ -171,13 +171,13 @@ public:<br>>   /// Initialize target data from properties stored in the module.<br>>   explicit DataLayout(const Module *M);<br>><br>> -  DataLayout(const DataLayout &TD) :<br>> +  DataLayout(const DataLayout &DL) :<br>>     ImmutablePass(ID),<br>> -    LittleEndian(TD.isLittleEndian()),<br>> -    StackNaturalAlign(TD.StackNaturalAlign),<br>> -    LegalIntWidths(TD.LegalIntWidths),<br>> -    Alignments(TD.Alignments),<br>> -    Pointers(TD.Pointers),<br>> +    LittleEndian(DL.isLittleEndian()),<br>> +    StackNaturalAlign(DL.StackNaturalAlign),<br>> +    LegalIntWidths(DL.LegalIntWidths),<br>> +    Alignments(DL.Alignments),<br>> +    Pointers(DL.Pointers),<br>>     LayoutMap(0)<br>>   { }<br>><br>> @@ -426,7 +426,7 @@ public:<br>><br>> private:<br>>   friend class DataLayout;   // Only DataLayout can create this class<br>> -  StructLayout(StructType *ST, const DataLayout &TD);<br>> +  StructLayout(StructType *ST, const DataLayout &DL);<br>> };<br>><br>><br>><br>> Modified: llvm/trunk/lib/IR/DataLayout.cpp<br>> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DataLayout.cpp?rev=179601&r1=179600&r2=179601&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DataLayout.cpp?rev=179601&r1=179600&r2=179601&view=diff</a><br>> ==============================================================================<br>> --- llvm/trunk/lib/IR/DataLayout.cpp (original)<br>> +++ llvm/trunk/lib/IR/DataLayout.cpp Tue Apr 16 10:41:18 2013<br>> @@ -41,7 +41,7 @@ char DataLayout::ID = 0;<br>> // Support for StructLayout<br>> //===----------------------------------------------------------------------===//<br>><br>> -StructLayout::StructLayout(StructType *ST, const DataLayout &TD) {<br>> +StructLayout::StructLayout(StructType *ST, const DataLayout &DL) {<br>>   assert(!ST->isOpaque() && "Cannot get layout of opaque structs");<br>>   StructAlignment = 0;<br>>   StructSize = 0;<br>> @@ -50,7 +50,7 @@ StructLayout::StructLayout(StructType *S<br>>   // Loop over each of the elements, placing them in memory.<br>>   for (unsigned i = 0, e = NumElements; i != e; ++i) {<br>>     Type *Ty = ST->getElementType(i);<br>> -    unsigned TyAlign = ST->isPacked() ? 1 : TD.getABITypeAlignment(Ty);<br>> +    unsigned TyAlign = ST->isPacked() ? 1 : DL.getABITypeAlignment(Ty);<br>><br>>     // Add padding if necessary to align the data element properly.<br>>     if ((StructSize & (TyAlign-1)) != 0)<br>> @@ -60,7 +60,7 @@ StructLayout::StructLayout(StructType *S<br>>     StructAlignment = std::max(TyAlign, StructAlignment);<br>><br>>     MemberOffsets[i] = StructSize;<br>> -    StructSize += TD.getTypeAllocSize(Ty); // Consume space for this data item<br>> +    StructSize += DL.getTypeAllocSize(Ty); // Consume space for this data item<br>>   }<br>><br>>   // Empty structures have alignment of 1 byte.<br>><br>><br>> _______________________________________________<br>> llvm-commits mailing list<br>><span class="Apple-converted-space"> </span><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>><span class="Apple-converted-space"> </span><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br></div></div></blockquote></div><br></div></div></div><br class="Apple-interchange-newline"></blockquote></div><br></body></html>