diff options
author | Fangrui Song <maskray@google.com> | 2019-07-16 08:26:38 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-07-16 08:26:38 +0000 |
commit | beb1e40a02f8be0cb2c71d551d86f84d495d41e3 (patch) | |
tree | 7fee0ef6e04dbf444b76105f8ae4e355339745c1 | |
parent | 08eee86502ec19a994bf339f440315d15053502a (diff) |
[COFF] Rename variale references in comments after VariableName -> variableName change
git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@366193 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | COFF/Chunks.cpp | 8 | ||||
-rw-r--r-- | COFF/Config.h | 2 | ||||
-rw-r--r-- | COFF/DLL.cpp | 2 | ||||
-rw-r--r-- | COFF/Driver.cpp | 8 | ||||
-rw-r--r-- | COFF/DriverUtils.cpp | 2 | ||||
-rw-r--r-- | COFF/InputFiles.cpp | 8 | ||||
-rw-r--r-- | COFF/InputFiles.h | 2 | ||||
-rw-r--r-- | COFF/PDB.cpp | 6 | ||||
-rw-r--r-- | COFF/SymbolTable.cpp | 2 | ||||
-rw-r--r-- | COFF/SymbolTable.h | 2 | ||||
-rw-r--r-- | COFF/Writer.cpp | 6 |
11 files changed, 24 insertions, 24 deletions
diff --git a/COFF/Chunks.cpp b/COFF/Chunks.cpp index 374751ad5..0e43d2b47 100644 --- a/COFF/Chunks.cpp +++ b/COFF/Chunks.cpp @@ -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_t s, uint64_t p, int shift) { // 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::getRuntimePseudoRelocs( 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/COFF/Config.h b/COFF/Config.h index f7c809714..e378b6fc7 100644 --- a/COFF/Config.h +++ b/COFF/Config.h @@ -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; diff --git a/COFF/DLL.cpp b/COFF/DLL.cpp index 932e7d645..40d1f463a 100644 --- a/COFF/DLL.cpp +++ b/COFF/DLL.cpp @@ -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(); diff --git a/COFF/Driver.cpp b/COFF/Driver.cpp index bb5c0bb71..6cfd83ab9 100644 --- a/COFF/Driver.cpp +++ b/COFF/Driver.cpp @@ -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 altPath) { 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/COFF/DriverUtils.cpp b/COFF/DriverUtils.cpp index edc3b3707..4360ac23b 100644 --- a/COFF/DriverUtils.cpp +++ b/COFF/DriverUtils.cpp @@ -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), diff --git a/COFF/InputFiles.cpp b/COFF/InputFiles.cpp index 9936a6f69..c00d5c5b4 100644 --- a/COFF/InputFiles.cpp +++ b/COFF/InputFiles.cpp @@ -556,8 +556,8 @@ Optional<Symbol *> ObjFile::createDefined( // 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::getDebugSection(StringRef secName) { // 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; diff --git a/COFF/InputFiles.h b/COFF/InputFiles.h index 6c84ceec1..dfad9814a 100644 --- a/COFF/InputFiles.h +++ b/COFF/InputFiles.h @@ -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]; diff --git a/COFF/PDB.cpp b/COFF/PDB.cpp index d024f7573..a55e5136e 100644 --- a/COFF/PDB.cpp +++ b/COFF/PDB.cpp @@ -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(MutableArrayRef<uint8_t> &recordData, 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 SectionChunk *c, uint32_t addr, 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/COFF/SymbolTable.cpp b/COFF/SymbolTable.cpp index 2173c10c1..0aff164ee 100644 --- a/COFF/SymbolTable.cpp +++ b/COFF/SymbolTable.cpp @@ -192,7 +192,7 @@ bool SymbolTable::handleMinGWAutomaticImport(Symbol *sym, StringRef name) { // 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/COFF/SymbolTable.h b/COFF/SymbolTable.h index 75bd39335..88f47cbe9 100644 --- a/COFF/SymbolTable.h +++ b/COFF/SymbolTable.h @@ -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); diff --git a/COFF/Writer.cpp b/COFF/Writer.cpp index 46b1af093..e4b35a5f8 100644 --- a/COFF/Writer.cpp +++ b/COFF/Writer.cpp @@ -335,7 +335,7 @@ void OutputSection::addContributingPartialSection(PartialSection *sec) { } // 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 *os, int margin) { // 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(ObjFile *file, } // 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) { |