<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Dec 1, 2013 at 5:53 PM, Alp Toker <span dir="ltr"><<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
On 02/12/2013 01:05, Rui Ueyama wrote:<div><div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Sun, Dec 1, 2013 at 3:58 PM, Alp Toker <<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a> <mailto:<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a>>> wrote:<br>
<br>
    Author: alp<br>
    Date: Sun Dec  1 17:58:45 2013<br>
    New Revision: 196054<br>
<br>
    URL: <a href="http://llvm.org/viewvc/llvm-project?rev=196054&view=rev" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project?rev=196054&view=rev</a><br>
    Log:<br>
    Fix "don't" typos missed in previous commit<br>
<br>
    Modified:<br>
        lld/trunk/include/lld/<u></u>ReaderWriter/<u></u>ELFLinkingContext.h<br>
        lld/trunk/lib/ReaderWriter/<u></u>ELF/DefaultLayout.h<br>
        lld/trunk/lib/ReaderWriter/<u></u>ELF/ExecutableWriter.h<br>
        lld/trunk/lib/ReaderWriter/<u></u>ELF/OutputELFWriter.h<br>
        lld/trunk/lib/ReaderWriter/<u></u>ELF/SectionChunks.h<br>
        lld/trunk/lib/ReaderWriter/<u></u>ELF/SegmentChunks.h<br>
        lld/trunk/test/elf/X86_64/<u></u>largebss.test<br>
<br>
    Modified: lld/trunk/include/lld/<u></u>ReaderWriter/<u></u>ELFLinkingContext.h<br>
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/ReaderWriter/ELFLinkingContext.h?rev=196054&r1=196053&r2=196054&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/include/lld/<u></u>ReaderWriter/<u></u>ELFLinkingContext.h?rev=<u></u>196054&r1=196053&r2=196054&<u></u>view=diff</a><br>


    ==============================<u></u>==============================<u></u>==================<br>
    --- lld/trunk/include/lld/<u></u>ReaderWriter/<u></u>ELFLinkingContext.h (original)<br>
    +++ lld/trunk/include/lld/<u></u>ReaderWriter/<u></u>ELFLinkingContext.h Sun Dec<br>
     1 17:58:45 2013<br>
    @@ -45,9 +45,9 @@ public:<br>
       /// creates.<br>
       enum class OutputMagic : uint8_t {<br>
         DEFAULT, // The default mode, no specific magic set<br>
    -    NMAGIC,  // Disallow shared libraries and dont align sections<br>
    +    NMAGIC,  // Disallow shared libraries and don't align sections<br>
                  // PageAlign Data, Mark Text Segment/Data segment RW<br>
    -    OMAGIC   // Disallow shared libraries and dont align sections,<br>
    +    OMAGIC   // Disallow shared libraries and don't align sections,<br>
                  // Mark Text Segment/Data segment RW<br>
       };<br>
<br>
<br>
    Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/DefaultLayout.h<br>
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h?rev=196054&r1=196053&r2=196054&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/<u></u>DefaultLayout.h?rev=196054&r1=<u></u>196053&r2=196054&view=diff</a><br>


    ==============================<u></u>==============================<u></u>==================<br>
    --- lld/trunk/lib/ReaderWriter/<u></u>ELF/DefaultLayout.h (original)<br>
    +++ lld/trunk/lib/ReaderWriter/<u></u>ELF/DefaultLayout.h Sun Dec  1<br>
    17:58:45 2013<br>
    @@ -639,7 +639,7 @@ template <class ELFT> void DefaultLayout<br>
             lookupSectionFlag &= ~(llvm::ELF::SHF_TLS);<br>
<br>
             Segment<ELFT> *segment;<br>
    -        // We need a separate segment for sections that dont have<br>
    +        // We need a separate segment for sections that don't have<br>
             // the segment type to be PT_LOAD<br>
             if (segmentType != llvm::ELF::PT_LOAD) {<br>
               const AdditionalSegmentKey key(segmentType,<br>
    lookupSectionFlag);<br>
    @@ -706,7 +706,7 @@ template <class ELFT> void DefaultLayout<br>
       uint64_t offset = 0;<br>
       for (auto si : _segments) {<br>
         si->setOrdinal(++ordinal);<br>
    -    // Dont assign offsets for segments that are not loadable<br>
    +    // Don't assign offsets for segments that are not loadable<br>
         if (si->segmentType() != llvm::ELF::PT_LOAD)<br>
           continue;<br>
         si->assignOffsets(offset);<br>
    @@ -742,7 +742,7 @@ DefaultLayout<ELFT>::<u></u>assignVirtualAddres<br>
       while (true) {<br>
         for (auto si : _segments) {<br>
           si->finalize();<br>
    -      // Dont add PT_NULL segments into the program header<br>
    +      // Don't add PT_NULL segments into the program header<br>
           if (si->segmentType() != llvm::ELF::PT_NULL)<br>
             newSegmentHeaderAdded = _programHeader->addSegment(si)<u></u>;<br>
         }<br>
    @@ -778,7 +778,7 @@ DefaultLayout<ELFT>::<u></u>assignVirtualAddres<br>
           } else {<br>
             si->setVAddr(virtualAddress);<br>
             // The first segment has the virtualAddress set to the<br>
    base address as<br>
    -        // we have added the file header and the program header<br>
    dont align the<br>
    +        // we have added the file header and the program header<br>
    don't align the<br>
             // first segment to the pagesize<br>
             si->assignVirtualAddress(<u></u>address);<br>
             si->setMemSize(address - virtualAddress);<br>
    @@ -841,7 +841,7 @@ DefaultLayout<ELFT>::<u></u>assignOffsetsForMis<br>
       uint64_t fileoffset = 0;<br>
       uint64_t size = 0;<br>
       for (auto si : _segments) {<br>
    -    // Dont calculate offsets from non loadable segments<br>
    +    // Don't calculate offsets from non loadable segments<br>
         if ((si->segmentType() != llvm::ELF::PT_LOAD) &&<br>
             (si->segmentType() != llvm::ELF::PT_NULL))<br>
           continue;<br>
<br>
    Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/ExecutableWriter.h<br>
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ExecutableWriter.h?rev=196054&r1=196053&r2=196054&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/<u></u>ExecutableWriter.h?rev=196054&<u></u>r1=196053&r2=196054&view=diff</a><br>


    ==============================<u></u>==============================<u></u>==================<br>
    --- lld/trunk/lib/ReaderWriter/<u></u>ELF/ExecutableWriter.h (original)<br>
    +++ lld/trunk/lib/ReaderWriter/<u></u>ELF/ExecutableWriter.h Sun Dec  1<br>
    17:58:45 2013<br>
    @@ -122,7 +122,7 @@ template <class ELFT> void ExecutableWri<br>
<br>
       auto bssSection = this->_layout-><u></u>findOutputSection(".bss");<br>
<br>
    -  // If we dont find a bss section, then dont set these values<br>
    +  // If we don't find a bss section, then don't set these values<br>
       if (bssSection) {<br>
         (*bssStartAtomIter)->_<u></u>virtualAddr = bssSection->virtualAddr();<br>
         (*bssEndAtomIter)->_<u></u>virtualAddr =<br>
<br>
    Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/OutputELFWriter.h<br>
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/OutputELFWriter.h?rev=196054&r1=196053&r2=196054&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/<u></u>OutputELFWriter.h?rev=196054&<u></u>r1=196053&r2=196054&view=diff</a><br>


    ==============================<u></u>==============================<u></u>==================<br>
    --- lld/trunk/lib/ReaderWriter/<u></u>ELF/OutputELFWriter.h (original)<br>
    +++ lld/trunk/lib/ReaderWriter/<u></u>ELF/OutputELFWriter.h Sun Dec  1<br>
    17:58:45 2013<br>
    @@ -188,7 +188,7 @@ void OutputELFWriter<ELFT>::<u></u>buildDynamic<br>
       // The dynamic symbol table need to be sorted earlier because<br>
    the hash<br>
       // table needs to be built using the dynamic symbol table. It<br>
    would be<br>
       // late to sort the symbols due to that in finalize. In the<br>
    dynamic symbol<br>
    -  // table finalize, we call the symbol table finalize and we<br>
    dont want to<br>
    +  // table finalize, we call the symbol table finalize and we<br>
    don't want to<br>
       // sort again<br>
       _dynamicSymbolTable-><u></u>sortSymbols();<br>
<br>
<br>
    Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/SectionChunks.h<br>
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h?rev=196054&r1=196053&r2=196054&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/<u></u>SectionChunks.h?rev=196054&r1=<u></u>196053&r2=196054&view=diff</a><br>


    ==============================<u></u>==============================<u></u>==================<br>
    --- lld/trunk/lib/ReaderWriter/<u></u>ELF/SectionChunks.h (original)<br>
    +++ lld/trunk/lib/ReaderWriter/<u></u>ELF/SectionChunks.h Sun Dec  1<br>
    17:58:45 2013<br>
    @@ -790,7 +790,7 @@ void SymbolTable<ELFT>::<u></u>addUndefinedAtom<br>
     }<br>
<br>
     /// Add a symbol to the symbol Table, definedAtoms which get<br>
    added to the symbol<br>
    -/// section dont have their virtual addresses set at the time of<br>
    adding the<br>
    +/// section don't have their virtual addresses set at the time of<br>
    adding the<br>
     /// symbol to the symbol table(Example: dynamic symbols), the<br>
    addresses needs<br>
     /// to be updated in the table before writing the dynamic symbol<br>
    table<br>
     /// information<br>
    @@ -885,7 +885,7 @@ public:<br>
<br>
       virtual void finalize() {<br>
         // Defined symbols which have been added into the dynamic<br>
    symbol table<br>
    -    // dont have their addresses known until addresses have been<br>
    assigned<br>
    +    // don't have their addresses known until addresses have been<br>
    assigned<br>
         // so lets update the symbol values after they have got assigned<br>
         for (auto &ste: this->_symbolTable) {<br>
           const lld::AtomLayout *atomLayout = ste._atomLayout;<br>
    @@ -894,7 +894,7 @@ public:<br>
           ste._symbol.st_value = atomLayout->_virtualAddr;<br>
         }<br>
<br>
    -    // Dont sort the symbols<br>
    +    // Don't sort the symbols<br>
         SymbolTable<ELFT>::finalize(<u></u>false);<br>
       }<br>
<br>
<br>
    Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/SegmentChunks.h<br>
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.h?rev=196054&r1=196053&r2=196054&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/<u></u>SegmentChunks.h?rev=196054&r1=<u></u>196053&r2=196054&view=diff</a><br>


    ==============================<u></u>==============================<u></u>==================<br>
    --- lld/trunk/lib/ReaderWriter/<u></u>ELF/SegmentChunks.h (original)<br>
    +++ lld/trunk/lib/ReaderWriter/<u></u>ELF/SegmentChunks.h Sun Dec  1<br>
    17:58:45 2013<br>
    @@ -570,7 +570,7 @@ template <class ELFT> void Segment<ELFT><br>
             tlsStartAddr += section->memSize();<br>
           section->setMemSize(addr + section->memSize() -<br>
    section->virtualAddr());<br>
           // TBSS section is special that it doesnot contribute to<br>
    memory of any<br>
<br>
<br>
We should probably s/doesnot/doesn't/ as well?<br>
</blockquote>
<br></div></div>
Done with a couple of other fixes in r196056. I see a few more potential grammar issues that but will hand it over to you.<br>
<br>
I'm planning to run this on LLVM core and clang, but only after we're sure there are no false-positives and 3.4 has been finalized so as not to make backporting difficult for Bill in the next couple of weeks given the size of the patches.<br>

</blockquote><div><br></div><div>Yeah, I guess simple sed wouldn't work as weird spelling might be a valid identifier in code. I'm wondering if clang-format has a feature to fix typos only in comments...</div><div>

<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
FWIW lld had the one of the lowest typo counts per line amongst the LLVM modules :-)<br>
<br>
Alp.<br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
    -      // segment, If we see a tbss section, dont add memory size<br>
    to addr<br>
    +      // segment, If we see a tbss section, don't add memory size<br>
    to addr<br>
           // The fileOffset is automatically taken care of since TBSS<br>
    section does<br>
           // not endup using file size<br>
           if (section->order() != DefaultLayout<ELFT>::ORDER_<u></u>TBSS)<br>
<br>
    Modified: lld/trunk/test/elf/X86_64/<u></u>largebss.test<br>
    URL:<br>
    <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/largebss.test?rev=196054&r1=196053&r2=196054&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/test/elf/<u></u>X86_64/largebss.test?rev=<u></u>196054&r1=196053&r2=196054&<u></u>view=diff</a><br>


    ==============================<u></u>==============================<u></u>==================<br>
    --- lld/trunk/test/elf/X86_64/<u></u>largebss.test (original)<br>
    +++ lld/trunk/test/elf/X86_64/<u></u>largebss.test Sun Dec  1 17:58:45 2013<br>
    @@ -1,5 +1,5 @@<br>
     # This tests the functionality of handling BSS symbols<br>
    -# BSS symbols dont occupy file content and are associated with<br>
    typeZeroFill<br>
    +# BSS symbols don't occupy file content and are associated with<br>
    typeZeroFill<br>
     # Any typeZeroFill content wouldnot have space reserved in the<br>
    file to store<br>
     # its content<br>
<br>
<br>
<br>
    ______________________________<u></u>_________________<br>
    llvm-commits mailing list<br></div></div>
    <a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a> <mailto:<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.<u></u>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><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
-- <br>
<a href="http://www.nuanti.com" target="_blank">http://www.nuanti.com</a><br>
the browser experts<br>
<br>
</font></span></blockquote></div><br></div></div>