[lld] r366193 - [COFF] Rename variale references in comments after VariableName -> variableName change

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 16 01:26:38 PDT 2019


Author: maskray
Date: Tue Jul 16 01:26:38 2019
New Revision: 366193

URL: http://llvm.org/viewvc/llvm-project?rev=366193&view=rev
Log:
[COFF] Rename variale references in comments after VariableName -> variableName change

Modified:
    lld/trunk/COFF/Chunks.cpp
    lld/trunk/COFF/Config.h
    lld/trunk/COFF/DLL.cpp
    lld/trunk/COFF/Driver.cpp
    lld/trunk/COFF/DriverUtils.cpp
    lld/trunk/COFF/InputFiles.cpp
    lld/trunk/COFF/InputFiles.h
    lld/trunk/COFF/PDB.cpp
    lld/trunk/COFF/SymbolTable.cpp
    lld/trunk/COFF/SymbolTable.h
    lld/trunk/COFF/Writer.cpp

Modified: lld/trunk/COFF/Chunks.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Chunks.cpp?rev=366193&r1=366192&r2=366193&view=diff
==============================================================================
--- lld/trunk/COFF/Chunks.cpp (original)
+++ lld/trunk/COFF/Chunks.cpp Tue Jul 16 01:26:38 2019
@@ -31,10 +31,10 @@ namespace coff {
 
 SectionChunk::SectionChunk(ObjFile *f, const coff_section *h)
     : Chunk(SectionKind), file(f), header(h), repl(this) {
-  // Initialize Relocs.
+  // Initialize relocs.
   setRelocs(file->getCOFFObj()->getRelocations(header));
 
-  // Initialize SectionName.
+  // Initialize sectionName.
   StringRef sectionName;
   if (Expected<StringRef> e = file->getCOFFObj()->getSectionName(header))
     sectionName = *e;
@@ -218,7 +218,7 @@ void applyArm64Addr(uint8_t *off, uint64
 
 // Update the immediate field in a AARCH64 ldr, str, and add instruction.
 // Optionally limit the range of the written immediate by one or more bits
-// (RangeLimit).
+// (rangeLimit).
 void applyArm64Imm(uint8_t *off, uint64_t imm, uint32_t rangeLimit) {
   uint32_t orig = read32le(off);
   imm += (orig >> 10) & 0xFFF;
@@ -561,7 +561,7 @@ void SectionChunk::getRuntimePseudoReloc
             toString(file));
       continue;
     }
-    // SizeInBits is used to initialize the Flags field; currently no
+    // sizeInBits is used to initialize the Flags field; currently no
     // other flags are defined.
     res.emplace_back(
         RuntimePseudoReloc(target, this, rel.VirtualAddress, sizeInBits));

Modified: lld/trunk/COFF/Config.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Config.h?rev=366193&r1=366192&r2=366193&view=diff
==============================================================================
--- lld/trunk/COFF/Config.h (original)
+++ lld/trunk/COFF/Config.h Tue Jul 16 01:26:38 2019
@@ -49,7 +49,7 @@ struct Export {
 
   // If an export is a form of /export:foo=dllname.bar, that means
   // that foo should be exported as an alias to bar in the DLL.
-  // ForwardTo is set to "dllname.bar" part. Usually empty.
+  // forwardTo is set to "dllname.bar" part. Usually empty.
   StringRef forwardTo;
   StringChunk *forwardChunk = nullptr;
 

Modified: lld/trunk/COFF/DLL.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/DLL.cpp?rev=366193&r1=366192&r2=366193&view=diff
==============================================================================
--- lld/trunk/COFF/DLL.cpp (original)
+++ lld/trunk/COFF/DLL.cpp Tue Jul 16 01:26:38 2019
@@ -567,7 +567,7 @@ void IdataContents::create() {
   // Create .idata contents for each DLL.
   for (std::vector<DefinedImportData *> &syms : v) {
     // Create lookup and address tables. If they have external names,
-    // we need to create HintName chunks to store the names.
+    // we need to create hintName chunks to store the names.
     // If they don't (if they are import-by-ordinals), we store only
     // ordinal values to the table.
     size_t base = lookups.size();

Modified: lld/trunk/COFF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Driver.cpp?rev=366193&r1=366192&r2=366193&view=diff
==============================================================================
--- lld/trunk/COFF/Driver.cpp (original)
+++ lld/trunk/COFF/Driver.cpp Tue Jul 16 01:26:38 2019
@@ -936,7 +936,7 @@ static void findKeepUniqueSections() {
   }
 }
 
-// link.exe replaces each %foo% in AltPath with the contents of environment
+// link.exe replaces each %foo% in altPath with the contents of environment
 // variable foo, and adds the two magic env vars _PDB (expands to the basename
 // of pdb's output path) and _EXT (expands to the extension of the output
 // binary).
@@ -952,9 +952,9 @@ static void parsePDBAltPath(StringRef al
     binaryExtension = binaryExtension.substr(1); // %_EXT% does not include '.'.
 
   // Invariant:
-  //   +--------- Cursor ('a...' might be the empty string).
-  //   |   +----- FirstMark
-  //   |   |   +- SecondMark
+  //   +--------- cursor ('a...' might be the empty string).
+  //   |   +----- firstMark
+  //   |   |   +- secondMark
   //   v   v   v
   //   a...%...%...
   size_t cursor = 0;

Modified: lld/trunk/COFF/DriverUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/DriverUtils.cpp?rev=366193&r1=366192&r2=366193&view=diff
==============================================================================
--- lld/trunk/COFF/DriverUtils.cpp (original)
+++ lld/trunk/COFF/DriverUtils.cpp Tue Jul 16 01:26:38 2019
@@ -345,7 +345,7 @@ public:
   // so it is safe to remove the file immediately after this function
   // is called (you cannot remove an opened file on Windows.)
   std::unique_ptr<MemoryBuffer> getMemoryBuffer() {
-    // IsVolatileSize=true forces MemoryBuffer to not use mmap().
+    // IsVolatile=true forces MemoryBuffer to not use mmap().
     return CHECK(MemoryBuffer::getFile(path, /*FileSize=*/-1,
                                        /*RequiresNullTerminator=*/false,
                                        /*IsVolatile=*/true),

Modified: lld/trunk/COFF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/InputFiles.cpp?rev=366193&r1=366192&r2=366193&view=diff
==============================================================================
--- lld/trunk/COFF/InputFiles.cpp (original)
+++ lld/trunk/COFF/InputFiles.cpp Tue Jul 16 01:26:38 2019
@@ -556,8 +556,8 @@ Optional<Symbol *> ObjFile::createDefine
   // The second symbol entry has the name of the comdat symbol, called the
   // "comdat leader".
   // When this function is called for the first symbol entry of a comdat,
-  // it sets ComdatDefs and returns None, and when it's called for the second
-  // symbol entry it reads ComdatDefs and then sets it back to nullptr.
+  // it sets comdatDefs and returns None, and when it's called for the second
+  // symbol entry it reads comdatDefs and then sets it back to nullptr.
 
   // Handle comdat leader.
   if (const coff_aux_section_definition *def = comdatDefs[sectionNumber]) {
@@ -626,7 +626,7 @@ ArrayRef<uint8_t> ObjFile::getDebugSecti
 // even if the TU was compiled with no debug info. At least two records are
 // always there. S_OBJNAME stores a 32-bit signature, which is loaded into the
 // PCHSignature member. S_COMPILE3 stores compile-time cmd-line flags. This is
-// currently used to initialize the HotPatchable member.
+// currently used to initialize the hotPatchable member.
 void ObjFile::initializeFlags() {
   ArrayRef<uint8_t> data = getDebugSection(".debug$S");
   if (data.empty())
@@ -764,7 +764,7 @@ void ImportFile::parse() {
 
   impSym = symtab->addImportData(impName, this);
   // If this was a duplicate, we logged an error but may continue;
-  // in this case, ImpSym is nullptr.
+  // in this case, impSym is nullptr.
   if (!impSym)
     return;
 

Modified: lld/trunk/COFF/InputFiles.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/InputFiles.h?rev=366193&r1=366192&r2=366193&view=diff
==============================================================================
--- lld/trunk/COFF/InputFiles.h (original)
+++ lld/trunk/COFF/InputFiles.h Tue Jul 16 01:26:38 2019
@@ -119,7 +119,7 @@ public:
 
   ArrayRef<uint8_t> getDebugSection(StringRef secName);
 
-  // Returns a Symbol object for the SymbolIndex'th symbol in the
+  // Returns a Symbol object for the symbolIndex'th symbol in the
   // underlying object file.
   Symbol *getSymbol(uint32_t symbolIndex) {
     return symbols[symbolIndex];

Modified: lld/trunk/COFF/PDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/PDB.cpp?rev=366193&r1=366192&r2=366193&view=diff
==============================================================================
--- lld/trunk/COFF/PDB.cpp (original)
+++ lld/trunk/COFF/PDB.cpp Tue Jul 16 01:26:38 2019
@@ -119,7 +119,7 @@ public:
   ///
   /// If the object does not use a type server PDB (compiled with /Z7), we merge
   /// all the type and item records from the .debug$S stream and fill in the
-  /// caller-provided ObjectIndexMap.
+  /// caller-provided objectIndexMap.
   Expected<const CVIndexMap &> mergeDebugT(ObjFile *file,
                                            CVIndexMap *objectIndexMap);
 
@@ -683,7 +683,7 @@ static void translateIdSymbols(MutableAr
 
     TypeIndex *ti =
         reinterpret_cast<TypeIndex *>(content.data() + refs[0].Offset);
-    // `TI` is the index of a FuncIdRecord or MemberFuncIdRecord which lives in
+    // `ti` is the index of a FuncIdRecord or MemberFuncIdRecord which lives in
     // the IPI stream, whose `FunctionType` member refers to the TPI stream.
     // Note that LF_FUNC_ID and LF_MEMFUNC_ID have the same record layout, and
     // in both cases we just need the second type index.
@@ -1729,7 +1729,7 @@ static bool findLineTable(const SectionC
     if (dbgC->getSectionName() != ".debug$S")
       continue;
 
-    // Build a mapping of SECREL relocations in DbgC that refer to C.
+    // Build a mapping of SECREL relocations in dbgC that refer to `c`.
     DenseMap<uint32_t, uint32_t> secrels;
     for (const coff_relocation &r : dbgC->getRelocs()) {
       if (r.Type != secrelReloc)

Modified: lld/trunk/COFF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/SymbolTable.cpp?rev=366193&r1=366192&r2=366193&view=diff
==============================================================================
--- lld/trunk/COFF/SymbolTable.cpp (original)
+++ lld/trunk/COFF/SymbolTable.cpp Tue Jul 16 01:26:38 2019
@@ -192,7 +192,7 @@ bool SymbolTable::handleMinGWAutomaticIm
 
   // Replace the reference directly to a variable with a reference
   // to the import address table instead. This obviously isn't right,
-  // but we mark the symbol as IsRuntimePseudoReloc, and a later pass
+  // but we mark the symbol as isRuntimePseudoReloc, and a later pass
   // will add runtime pseudo relocations for every relocation against
   // this Symbol. The runtime pseudo relocation framework expects the
   // reference itself to point at the IAT entry.

Modified: lld/trunk/COFF/SymbolTable.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/SymbolTable.h?rev=366193&r1=366192&r2=366193&view=diff
==============================================================================
--- lld/trunk/COFF/SymbolTable.h (original)
+++ lld/trunk/COFF/SymbolTable.h Tue Jul 16 01:26:38 2019
@@ -112,7 +112,7 @@ public:
 private:
   /// Inserts symbol if not already present.
   std::pair<Symbol *, bool> insert(StringRef name);
-  /// Same as insert(Name), but also sets IsUsedInRegularObj.
+  /// Same as insert(Name), but also sets isUsedInRegularObj.
   std::pair<Symbol *, bool> insert(StringRef name, InputFile *f);
 
   std::vector<Symbol *> getSymsWithPrefix(StringRef prefix);

Modified: lld/trunk/COFF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Writer.cpp?rev=366193&r1=366192&r2=366193&view=diff
==============================================================================
--- lld/trunk/COFF/Writer.cpp (original)
+++ lld/trunk/COFF/Writer.cpp Tue Jul 16 01:26:38 2019
@@ -335,7 +335,7 @@ void OutputSection::addContributingParti
 } // namespace lld
 
 // Check whether the target address S is in range from a relocation
-// of type RelType at address P.
+// of type relType at address P.
 static bool isInRange(uint16_t relType, uint64_t s, uint64_t p, int margin) {
   if (config->machine == ARMNT) {
     int64_t diff = AbsoluteDifference(s, p + 4) + margin;
@@ -427,7 +427,7 @@ static bool createThunks(OutputSection *
 
       // The estimate of the source address P should be pretty accurate,
       // but we don't know whether the target Symbol address should be
-      // offset by ThunkSize or not (or by some of ThunksSize but not all of
+      // offset by thunksSize or not (or by some of thunksSize but not all of
       // it), giving us some uncertainty once we have added one thunk.
       uint64_t p = sc->getRVA() + rel.VirtualAddress + thunksSize;
 
@@ -1626,7 +1626,7 @@ void Writer::markSymbolsForRVATable(ObjF
 }
 
 // Replace the absolute table symbol with a synthetic symbol pointing to
-// TableChunk so that we can emit base relocations for it and resolve section
+// tableChunk so that we can emit base relocations for it and resolve section
 // relative relocations.
 void Writer::maybeAddRVATable(SymbolRVASet tableSymbols, StringRef tableSym,
                               StringRef countSym) {




More information about the llvm-commits mailing list