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

llvm-svn: 366193
diff --git a/lld/COFF/Chunks.cpp b/lld/COFF/Chunks.cpp
index 374751a..0e43d2b4 100644
--- a/lld/COFF/Chunks.cpp
+++ b/lld/COFF/Chunks.cpp
@@ -31,10 +31,10 @@
 
 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 @@
 
 // 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 @@
             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));
diff --git a/lld/COFF/Config.h b/lld/COFF/Config.h
index f7c8097..e378b6f 100644
--- a/lld/COFF/Config.h
+++ b/lld/COFF/Config.h
@@ -49,7 +49,7 @@
 
   // 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;
 
diff --git a/lld/COFF/DLL.cpp b/lld/COFF/DLL.cpp
index 932e7d6..40d1f46 100644
--- a/lld/COFF/DLL.cpp
+++ b/lld/COFF/DLL.cpp
@@ -567,7 +567,7 @@
   // 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();
diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp
index bb5c0bb..6cfd83a 100644
--- a/lld/COFF/Driver.cpp
+++ b/lld/COFF/Driver.cpp
@@ -936,7 +936,7 @@
   }
 }
 
-// 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 @@
     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;
diff --git a/lld/COFF/DriverUtils.cpp b/lld/COFF/DriverUtils.cpp
index edc3b37..4360ac2 100644
--- a/lld/COFF/DriverUtils.cpp
+++ b/lld/COFF/DriverUtils.cpp
@@ -345,7 +345,7 @@
   // 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),
diff --git a/lld/COFF/InputFiles.cpp b/lld/COFF/InputFiles.cpp
index 9936a6f..c00d5c5 100644
--- a/lld/COFF/InputFiles.cpp
+++ b/lld/COFF/InputFiles.cpp
@@ -556,8 +556,8 @@
   // 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 @@
 // 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 @@
 
   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;
 
diff --git a/lld/COFF/InputFiles.h b/lld/COFF/InputFiles.h
index 6c84cee..dfad981 100644
--- a/lld/COFF/InputFiles.h
+++ b/lld/COFF/InputFiles.h
@@ -119,7 +119,7 @@
 
   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];
diff --git a/lld/COFF/PDB.cpp b/lld/COFF/PDB.cpp
index d024f75..a55e513 100644
--- a/lld/COFF/PDB.cpp
+++ b/lld/COFF/PDB.cpp
@@ -119,7 +119,7 @@
   ///
   /// 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 @@
 
     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 @@
     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)
diff --git a/lld/COFF/SymbolTable.cpp b/lld/COFF/SymbolTable.cpp
index 2173c10..0aff164 100644
--- a/lld/COFF/SymbolTable.cpp
+++ b/lld/COFF/SymbolTable.cpp
@@ -192,7 +192,7 @@
 
   // 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.
diff --git a/lld/COFF/SymbolTable.h b/lld/COFF/SymbolTable.h
index 75bd393..88f47cb 100644
--- a/lld/COFF/SymbolTable.h
+++ b/lld/COFF/SymbolTable.h
@@ -112,7 +112,7 @@
 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);
diff --git a/lld/COFF/Writer.cpp b/lld/COFF/Writer.cpp
index 46b1af0..e4b35a5 100644
--- a/lld/COFF/Writer.cpp
+++ b/lld/COFF/Writer.cpp
@@ -335,7 +335,7 @@
 } // 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 @@
 
       // 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 @@
 }
 
 // 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) {