<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;"><div>Rui,</div><div><br></div><div>Where exactly was the warning? Which compilers? </div><div><br></div><div>-Nick</div><br><div><div>On Jun 24, 2013, at 8:53 AM, Rui Ueyama <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> wrote:</div><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">Shankar,<div><br></div><div>We usually treat compiler warnings as errors as a policy, don't we? I hesitate to reintroduce the code that compiler warns. I'll leave it to Nick. If the code is resurrected, it should be with a pragma to supress the warning, I think.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jun 23, 2013 at 8:17 PM, Shankar Easwaran<span class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:shankare@codeaurora.org" target="_blank">shankare@codeaurora.org</a>></span><span class="Apple-converted-space"> </span>wrote:<br><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;">Hi Rui,<br><br>The writer was supposed to use _targetInfo, which MachO writer was not using at present.<br><br>I am not sure if we wanted to remove the un-referenced field, _targetInfo though.<br><br>Does any build recognize unused private variables ? If the buildbot is not checking for it, I would leave the original changes around.<br><br>Thanks<br><br>Shankar Easwaran<div class="HOEnZb"><div class="h5"><br><br>On 6/22/2013 5:12 PM, Rui Ueyama wrote:<br><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;">Author: ruiu<br>Date: Sat Jun 22 17:12:30 2013<br>New Revision: 184651<br><br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=184651&view=rev" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project?rev=184651&view=rev</a><br>Log:<br>Fix unused field warning.<br><br>Modified:<br> lld/trunk/lib/ReaderWriter/<u></u>MachO/WriterMachO.cpp<br><br>Modified: lld/trunk/lib/ReaderWriter/<u></u>MachO/WriterMachO.cpp<br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/WriterMachO.cpp?rev=184651&r1=184650&r2=184651&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/MachO/<u></u>WriterMachO.cpp?rev=184651&r1=<u></u>184650&r2=184651&view=diff</a><br>==============================<u></u>==============================<u></u>==================<br>--- lld/trunk/lib/ReaderWriter/<u></u>MachO/WriterMachO.cpp (original)<br>+++ lld/trunk/lib/ReaderWriter/<u></u>MachO/WriterMachO.cpp Sat Jun 22 17:12:30 2013<br>@@ -106,7 +106,6 @@ protected:<br> <span class="Apple-converted-space"> </span>class SectionChunk : public Chunk {<br> <span class="Apple-converted-space"> </span>public:<br> <span class="Apple-converted-space"> </span>static SectionChunk* make(DefinedAtom::ContentType,<br>- const MachOTargetInfo &ti,<br> MachOWriter &writer);<br> <span class="Apple-converted-space"> </span>virtual StringRef segmentName() const;<br> <span class="Apple-converted-space"> </span>virtual bool occupiesNoDiskSpace();<br>@@ -128,12 +127,10 @@ private:<br> <span class="Apple-converted-space"> </span>SectionChunk(StringRef seg,<br> StringRef sect,<br> uint32_t flags,<br>- const MachOTargetInfo &ti,<br> MachOWriter &writer);<br> <span class="Apple-converted-space"> </span>StringRef _segmentName;<br> <span class="Apple-converted-space"> </span>StringRef _sectionName;<br>- const MachOTargetInfo &_targetInfo;<br> <span class="Apple-converted-space"> </span>MachOWriter &_writer;<br> <span class="Apple-converted-space"> </span>uint32_t _flags;<br> <span class="Apple-converted-space"> </span>uint32_t _permissions;<br>@@ -456,46 +453,38 @@ void Chunk::assignFileOffset(<u></u>uint64_t &c<br> <span class="Apple-converted-space"> </span>//===-------------------------<u></u>------------------------------<u></u>---------------===//<br> <span class="Apple-converted-space"> </span>SectionChunk::SectionChunk(<u></u>StringRef seg, StringRef sect,<br>- uint32_t flags, const MachOTargetInfo &ti,<br>- MachOWriter &writer)<br>- : _segmentName(seg), _sectionName(sect), _targetInfo(ti),<br>- _writer(writer), _flags(flags), _permissions(0) {<br>+ uint32_t flags, MachOWriter &writer)<br>+ : _segmentName(seg), _sectionName(sect), _writer(writer),<br>+ _flags(flags), _permissions(0) {<br> <span class="Apple-converted-space"> </span>}<br> <span class="Apple-converted-space"> </span>SectionChunk* SectionChunk::make(<u></u>DefinedAtom::ContentType type,<br>- const MachOTargetInfo &ti,<br> MachOWriter &writer) {<br> <span class="Apple-converted-space"> </span>switch ( type ) {<br> <span class="Apple-converted-space"> </span>case DefinedAtom::typeCode:<br> <span class="Apple-converted-space"> </span>return new SectionChunk("__TEXT", "__text",<br>- S_REGULAR | S_ATTR_PURE_INSTRUCTIONS,<br>- ti, writer);<br>+ S_REGULAR | S_ATTR_PURE_INSTRUCTIONS, writer);<br> <span class="Apple-converted-space"> </span>break;<br> <span class="Apple-converted-space"> </span>case DefinedAtom::typeCString:<br> return new SectionChunk("__TEXT", "__cstring",<br>- S_CSTRING_LITERALS,<br>- ti, writer);<br>+ S_CSTRING_LITERALS, writer);<br> break;<br> <span class="Apple-converted-space"> </span>case DefinedAtom::typeStub:<br> <span class="Apple-converted-space"> </span>return new SectionChunk("__TEXT", "__stubs",<br>- S_SYMBOL_STUBS | S_ATTR_PURE_INSTRUCTIONS,<br>- ti, writer);<br>+ S_SYMBOL_STUBS | S_ATTR_PURE_INSTRUCTIONS, writer);<br> <span class="Apple-converted-space"> </span>break;<br> <span class="Apple-converted-space"> </span>case DefinedAtom::typeStubHelper:<br> <span class="Apple-converted-space"> </span>return new SectionChunk("__TEXT", "__stub_helper",<br>- S_REGULAR | S_ATTR_PURE_INSTRUCTIONS,<br>- ti, writer);<br>+ S_REGULAR | S_ATTR_PURE_INSTRUCTIONS, writer);<br> <span class="Apple-converted-space"> </span>break;<br> <span class="Apple-converted-space"> </span>case DefinedAtom::typeLazyPointer:<br> <span class="Apple-converted-space"> </span>return new SectionChunk("__DATA", "__la_symbol_ptr",<br>- S_LAZY_SYMBOL_POINTERS,<br>- ti, writer);<br>+ S_LAZY_SYMBOL_POINTERS, writer);<br> <span class="Apple-converted-space"> </span>break;<br> <span class="Apple-converted-space"> </span>case DefinedAtom::typeGOT:<br> <span class="Apple-converted-space"> </span>return new SectionChunk("__DATA", "__got",<br>- S_NON_LAZY_SYMBOL_POINTERS,<br>- ti, writer);<br>+ S_NON_LAZY_SYMBOL_POINTERS, writer);<br> <span class="Apple-converted-space"> </span>break;<br> <span class="Apple-converted-space"> </span>default:<br> <span class="Apple-converted-space"> </span>assert(0 && "TO DO: add support for more sections");<br>@@ -1320,7 +1309,7 @@ void MachOWriter::createChunks(<u></u>const lld<br> <span class="Apple-converted-space"> </span>DefinedAtom::ContentType type = atom->contentType();<br> <span class="Apple-converted-space"> </span>auto pos = map.find(type);<br> <span class="Apple-converted-space"> </span>if ( pos == map.end() ) {<br>- SectionChunk *chunk = SectionChunk::make(type, _targetInfo, *this);<br>+ SectionChunk *chunk = SectionChunk::make(type, *this);<br> <span class="Apple-converted-space"> </span>map[type] = chunk;<br> <span class="Apple-converted-space"> </span>chunk->appendAtom(atom);<br> <span class="Apple-converted-space"> </span>}<br><br><br>______________________________<u></u>_________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">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/<u></u>mailman/listinfo/llvm-commits</a><br><br><br></blockquote><br><br></div></div><span class="HOEnZb"><font color="#888888">--<span class="Apple-converted-space"> </span><br>Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation</font></span></blockquote></div></div></div></blockquote></div><br></body></html>