Skip to content

Commit

Permalink
[LLD] Rename iDTable -> idTable, NFC
Browse files Browse the repository at this point in the history
The variable renaming change did not handle this variable well.
  • Loading branch information
rnk committed May 12, 2020
1 parent f242950 commit 6da5672
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions lld/COFF/PDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ PDBLinker::mergeDebugT(ObjFile *file, CVIndexMap *objectIndexMap) {
fatal("codeview::mergeTypeAndIdRecords failed: " +
toString(std::move(err)));
} else {
if (auto err = mergeTypeAndIdRecords(tMerger.iDTable, tMerger.typeTable,
if (auto err = mergeTypeAndIdRecords(tMerger.idTable, tMerger.typeTable,
objectIndexMap->tpiMap, types,
file->pchSignature))
fatal("codeview::mergeTypeAndIdRecords failed: " +
Expand Down Expand Up @@ -504,7 +504,7 @@ Expected<const CVIndexMap &> PDBLinker::maybeMergeTypeServerPDB(ObjFile *file) {

// Merge IPI.
if (maybeIpi) {
if (auto err = mergeIdRecords(tMerger.iDTable, indexMap.tpiMap,
if (auto err = mergeIdRecords(tMerger.idTable, indexMap.tpiMap,
indexMap.ipiMap, maybeIpi->typeArray()))
fatal("codeview::mergeIdRecords failed: " + toString(std::move(err)));
}
Expand Down Expand Up @@ -695,7 +695,7 @@ static SymbolKind symbolKind(ArrayRef<uint8_t> recordData) {

/// MSVC translates S_PROC_ID_END to S_END, and S_[LG]PROC32_ID to S_[LG]PROC32
static void translateIdSymbols(MutableArrayRef<uint8_t> &recordData,
TypeCollection &iDTable) {
TypeCollection &idTable) {
RecordPrefix *prefix = reinterpret_cast<RecordPrefix *>(recordData.data());

SymbolKind kind = symbolKind(recordData);
Expand Down Expand Up @@ -725,7 +725,7 @@ static void translateIdSymbols(MutableArrayRef<uint8_t> &recordData,
// 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.
if (!ti->isSimple() && !ti->isNoneType()) {
CVType funcIdData = iDTable.getType(*ti);
CVType funcIdData = idTable.getType(*ti);
ArrayRef<uint8_t> tiBuf = funcIdData.data().slice(8, 4);
assert(tiBuf.size() == 4 && "corrupt LF_[MEM]FUNC_ID record");
*ti = *reinterpret_cast<const TypeIndex *>(tiBuf.data());
Expand Down
6 changes: 3 additions & 3 deletions lld/COFF/TypeMerger.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace coff {
class TypeMerger {
public:
TypeMerger(llvm::BumpPtrAllocator &alloc)
: typeTable(alloc), iDTable(alloc), globalTypeTable(alloc),
: typeTable(alloc), idTable(alloc), globalTypeTable(alloc),
globalIDTable(alloc) {}

/// Get the type table or the global type table if /DEBUG:GHASH is enabled.
Expand All @@ -34,14 +34,14 @@ class TypeMerger {
inline llvm::codeview::TypeCollection &getIDTable() {
if (config->debugGHashes)
return globalIDTable;
return iDTable;
return idTable;
}

/// Type records that will go into the PDB TPI stream.
llvm::codeview::MergingTypeTableBuilder typeTable;

/// Item records that will go into the PDB IPI stream.
llvm::codeview::MergingTypeTableBuilder iDTable;
llvm::codeview::MergingTypeTableBuilder idTable;

/// Type records that will go into the PDB TPI stream (for /DEBUG:GHASH)
llvm::codeview::GlobalTypeTableBuilder globalTypeTable;
Expand Down

0 comments on commit 6da5672

Please sign in to comment.