[lld] r196053 - Fix a variety of typos in function names and comments

Alp Toker alp at nuanti.com
Sun Dec 1 15:51:36 PST 2013


Author: alp
Date: Sun Dec  1 17:51:36 2013
New Revision: 196053

URL: http://llvm.org/viewvc/llvm-project?rev=196053&view=rev
Log:
Fix a variety of typos in function names and comments

No change in functionality.

Modified:
    lld/trunk/include/lld/Core/DefinedAtom.h
    lld/trunk/include/lld/Core/Instrumentation.h
    lld/trunk/include/lld/Passes/LayoutPass.h
    lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h
    lld/trunk/lib/ReaderWriter/ELF/File.h
    lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h
    lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.h
    lld/trunk/lib/ReaderWriter/LinkerScript.cpp
    lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
    lld/trunk/lib/ReaderWriter/Native/ReaderNative.cpp
    lld/trunk/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp
    lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp
    lld/trunk/test/elf/Inputs/shared.c

Modified: lld/trunk/include/lld/Core/DefinedAtom.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/DefinedAtom.h?rev=196053&r1=196052&r2=196053&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/DefinedAtom.h (original)
+++ lld/trunk/include/lld/Core/DefinedAtom.h Sun Dec  1 17:51:36 2013
@@ -97,7 +97,7 @@ public:
 
   enum Merge {
     mergeNo,                // Another atom with same name is error
-    mergeAsTentative,       // Is ANSI C tentative defintion, can be coalesced
+    mergeAsTentative,       // Is ANSI C tentative definition, can be coalesced
     mergeAsWeak,            // is C++ inline definition that was not inlined,
                             // but address was not taken, so atom can be hidden
                             // by linker

Modified: lld/trunk/include/lld/Core/Instrumentation.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/Instrumentation.h?rev=196053&r1=196052&r2=196053&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/Instrumentation.h (original)
+++ lld/trunk/include/lld/Core/Instrumentation.h Sun Dec  1 17:51:36 2013
@@ -61,7 +61,7 @@ public:
 /// A task cannot transfer threads.
 ///
 /// SBRM is used to ensure task starts and ends are ballanced. The lifetime of
-/// a task is either the liftime of this object, or until end is called.
+/// a task is either the lifetime of this object, or until end is called.
 class ScopedTask {
   __itt_domain *_domain;
 

Modified: lld/trunk/include/lld/Passes/LayoutPass.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Passes/LayoutPass.h?rev=196053&r1=196052&r2=196053&view=diff
==============================================================================
--- lld/trunk/include/lld/Passes/LayoutPass.h (original)
+++ lld/trunk/include/lld/Passes/LayoutPass.h Sun Dec  1 17:51:36 2013
@@ -28,7 +28,7 @@ class MutableFile;
 
 /// This linker pass does the layout of the atoms. The pass is done after the
 /// order their .o files were found on the command line, then by order of the
-/// atoms (address) in the .o file.  But some atoms have a prefered location
+/// atoms (address) in the .o file.  But some atoms have a preferred location
 /// in their section (such as pinned to the start or end of the section), so
 /// the sort must take that into account too.
 class LayoutPass : public Pass {

Modified: lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h?rev=196053&r1=196052&r2=196053&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h Sun Dec  1 17:51:36 2013
@@ -205,7 +205,7 @@ public:
   }
 
   // Merge sections with the same name into a MergedSections
-  void mergeSimiliarSections();
+  void mergeSimilarSections();
 
   void assignSectionsToSegments();
 
@@ -571,7 +571,7 @@ ErrorOr<const lld::AtomLayout &> Default
 /// Merge sections with the same name into a MergedSections
 template<class ELFT>
 void
-DefaultLayout<ELFT>::mergeSimiliarSections() {
+DefaultLayout<ELFT>::mergeSimilarSections() {
   MergedSections<ELFT> *mergedSection;
 
   for (auto &si : _sections) {
@@ -603,7 +603,7 @@ template <class ELFT> void DefaultLayout
     return A->order() < B->order();
   });
   // Merge all sections
-  mergeSimiliarSections();
+  mergeSimilarSections();
   // Set the ordinal after sorting the sections
   int ordinal = 1;
   for (auto msi : _mergedSections) {
@@ -639,7 +639,7 @@ template <class ELFT> void DefaultLayout
         lookupSectionFlag &= ~(llvm::ELF::SHF_TLS);
 
         Segment<ELFT> *segment;
-        // We need a seperate segment for sections that dont have
+        // We need a separate segment for sections that dont have
         // the segment type to be PT_LOAD
         if (segmentType != llvm::ELF::PT_LOAD) {
           const AdditionalSegmentKey key(segmentType, lookupSectionFlag);

Modified: lld/trunk/lib/ReaderWriter/ELF/File.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/File.h?rev=196053&r1=196052&r2=196053&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/File.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/File.h Sun Dec  1 17:51:36 2013
@@ -224,7 +224,7 @@ public:
     // Divide the section that contains mergeable strings into tokens
     // TODO
     // a) add resolver support to recognize multibyte chars
-    // b) Create a seperate section chunk to write mergeable atoms
+    // b) Create a separate section chunk to write mergeable atoms
     std::vector<MergeString *> tokens;
     for (const Elf_Shdr *msi : _mergeStringSections) {
       auto sectionName = _objFile->getSectionName(msi);
@@ -400,7 +400,7 @@ public:
             (uint8_t *)sectionContents->data() + symbol->st_value, contentSize);
 
         // If the linker finds that a section has global atoms that are in a
-        // mergeable section, treat them as defined atoms as they shouldnt be
+        // mergeable section, treat them as defined atoms as they shouldn't be
         // merged away as well as these symbols have to be part of symbol
         // resolution
         if (isMergeableStringSection(section)) {

Modified: lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h?rev=196053&r1=196052&r2=196053&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h Sun Dec  1 17:51:36 2013
@@ -284,7 +284,7 @@ const lld::AtomLayout &AtomSection<ELFT>
   DefinedAtom::Alignment atomAlign = definedAtom->alignment();
   uint64_t align2 = 1u << atomAlign.powerOf2;
   // Align the atom to the required modulus/ align the file offset and the
-  // memory offset seperately this is required so that BSS symbols are handled
+  // memory offset separately this is required so that BSS symbols are handled
   // properly as the BSS symbols only occupy memory size and not file size
   uint64_t fOffset = alignOffset(this->fileSize(), atomAlign);
   uint64_t mOffset = alignOffset(this->memSize(), atomAlign);
@@ -393,7 +393,7 @@ void AtomSection<ELFT>::write(ELFWriter
 
 /// \brief A MergedSections represents a set of sections grouped by the same
 /// name. The output file that gets written by the linker has sections grouped
-/// by similiar names
+/// by similar names
 template<class ELFT>
 class MergedSections {
 public:

Modified: lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.h?rev=196053&r1=196052&r2=196053&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.h Sun Dec  1 17:51:36 2013
@@ -103,8 +103,8 @@ private:
   uint64_t _memSize;
 };
 
-/// \brief A segment contains a set of sections, that have similiar properties
-//  the sections are already seperated based on different flags and properties
+/// \brief A segment contains a set of sections, that have similar properties
+//  the sections are already separated based on different flags and properties
 //  the segment is just a way to concatenate sections to segments
 template<class ELFT>
 class Segment : public Chunk<ELFT> {
@@ -457,7 +457,7 @@ template <class ELFT> void Segment<ELFT>
       uint64_t newOffset = llvm::RoundUpToAlignment(curOffset, (*si)->align2());
       SegmentSlice<ELFT> *slice = nullptr;
       // If the newOffset computed is more than a page away, lets create
-      // a seperate segment, so that memory is not used up while running
+      // a separate segment, so that memory is not used up while running
       if (((newOffset - curOffset) > this->_context.getPageSize()) &&
           (_outputMagic != ELFLinkingContext::OutputMagic::NMAGIC &&
            _outputMagic != ELFLinkingContext::OutputMagic::OMAGIC)) {

Modified: lld/trunk/lib/ReaderWriter/LinkerScript.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/LinkerScript.cpp?rev=196053&r1=196052&r2=196053&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/LinkerScript.cpp (original)
+++ lld/trunk/lib/ReaderWriter/LinkerScript.cpp Sun Dec  1 17:51:36 2013
@@ -140,7 +140,7 @@ void Lexer::skipWhitespace() {
         if (!_buffer.empty() && _buffer[0] == '/')
           _buffer = _buffer.drop_front();
 
-        // Scan for /'s. We're done if it is preceeded by a *.
+        // Scan for /'s. We're done if it is preceded by a *.
         while (true) {
           if (_buffer.empty())
             break;

Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp?rev=196053&r1=196052&r2=196053&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp Sun Dec  1 17:51:36 2013
@@ -426,7 +426,7 @@ void MachOFileLayout::buildFileOffsets()
   DEBUG_WITH_TYPE("MachOFileLayout", 
                   llvm::dbgs() << "buildFileOffsets()\n");
   for (const Segment &sg : _file.segments) {
-    // FIXME: 4096  should be infered from segments in normalized file.
+    // FIXME: 4096 should be inferred from segments in normalized file.
     _segInfo[&sg].fileOffset = llvm::RoundUpToAlignment(fileOffset, 4096);
     if ((_seg1addr == INT64_MAX) && sg.access)
       _seg1addr = sg.address;

Modified: lld/trunk/lib/ReaderWriter/Native/ReaderNative.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/Native/ReaderNative.cpp?rev=196053&r1=196052&r2=196053&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/Native/ReaderNative.cpp (original)
+++ lld/trunk/lib/ReaderWriter/Native/ReaderNative.cpp Sun Dec  1 17:51:36 2013
@@ -266,7 +266,7 @@ class File : public lld::File {
 public:
 
   /// Instantiates a File object from a native object file.  Ownership
-  /// of the MemoryBuffer is transfered to the resulting File object.
+  /// of the MemoryBuffer is transferred to the resulting File object.
   static error_code make(const LinkingContext &context,
                          std::unique_ptr<MemoryBuffer> mb,
                          std::vector<std::unique_ptr<lld::File> > &result) {
@@ -599,7 +599,7 @@ private:
     return make_error_code(NativeReaderError::success);
   }
 
-  // instantiate array of Referemces from v1 ivar data in file
+  // instantiate array of References from v1 ivar data in file
   error_code processReferencesV1(const uint8_t *base,
                                  const NativeChunk *chunk) {
     uint8_t *refsStart, *refsEnd;
@@ -619,7 +619,7 @@ private:
     return make_error_code(NativeReaderError::success);
   }
 
-  // instantiate array of Referemces from v2 ivar data in file
+  // instantiate array of References from v2 ivar data in file
   error_code processReferencesV2(const uint8_t *base,
                                  const NativeChunk *chunk) {
     uint8_t *refsStart, *refsEnd;

Modified: lld/trunk/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp?rev=196053&r1=196052&r2=196053&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp Sun Dec  1 17:51:36 2013
@@ -66,7 +66,7 @@
 ///   fn_in_dll();     // is equivalent to (*_imp__fn_in_dll)();
 ///
 /// It's just the compiler rewrites code for you so that you don't need to
-/// handle the indirection youself.
+/// handle the indirection yourself.
 ///
 /// Note 2: __declspec(dllimport) is mandatory for data but optional for
 /// function. For a function, the linker creates a jump table with the original

Modified: lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp?rev=196053&r1=196052&r2=196053&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp Sun Dec  1 17:51:36 2013
@@ -12,7 +12,7 @@
 /// PE/COFF file consists of DOS Header, PE Header, COFF Header and Section
 /// Tables followed by raw section data.
 ///
-/// This writer is reponsible for writing Core Linker results to an Windows
+/// This writer is responsible for writing Core Linker results to an Windows
 /// executable file. Currently it can only output ".text" section; other
 /// sections including the symbol table are silently ignored.
 ///

Modified: lld/trunk/test/elf/Inputs/shared.c
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Inputs/shared.c?rev=196053&r1=196052&r2=196053&view=diff
==============================================================================
--- lld/trunk/test/elf/Inputs/shared.c (original)
+++ lld/trunk/test/elf/Inputs/shared.c Sun Dec  1 17:51:36 2013
@@ -6,7 +6,7 @@ int i = 42;
 // Undefined weak function in a dynamic library.
 __attribute__((weak)) void weakfoo();
 
-// Regular funtion in a dynamic library.
+// Regular function in a dynamic library.
 void foo() {
   // Try to call weakfoo so that the reference to weekfoo will be included in
   // the resulting .so file.





More information about the llvm-commits mailing list