[PDB] Change uint32_t to SymIndex wherever it makes sense.
Although it's just a typedef, it helps for readability. NFC.
llvm-svn: 341863
diff --git a/llvm/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp b/llvm/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp
index 25dd209..5e1555e 100644
--- a/llvm/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp
+++ b/llvm/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp
@@ -507,7 +507,7 @@
return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_age);
}
-uint32_t DIARawSymbol::getArrayIndexTypeId() const {
+SymIndexId DIARawSymbol::getArrayIndexTypeId() const {
return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_arrayIndexTypeId);
}
@@ -526,7 +526,7 @@
return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_baseDataSlot);
}
-uint32_t DIARawSymbol::getBaseSymbolId() const {
+SymIndexId DIARawSymbol::getBaseSymbolId() const {
return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_baseSymbolId);
}
@@ -544,7 +544,7 @@
Symbol, &IDiaSymbol::get_callingConvention);
}
-uint32_t DIARawSymbol::getClassParentId() const {
+SymIndexId DIARawSymbol::getClassParentId() const {
return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_classParentId);
}
@@ -571,7 +571,7 @@
return PrivateGetDIAValue<DWORD, PDB_Lang>(Symbol, &IDiaSymbol::get_language);
}
-uint32_t DIARawSymbol::getLexicalParentId() const {
+SymIndexId DIARawSymbol::getLexicalParentId() const {
return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_lexicalParentId);
}
@@ -599,7 +599,7 @@
Symbol, &IDiaSymbol::get_localBasePointerRegisterId);
}
-uint32_t DIARawSymbol::getLowerBoundId() const {
+SymIndexId DIARawSymbol::getLowerBoundId() const {
return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_lowerBoundId);
}
@@ -640,7 +640,7 @@
return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_oemId);
}
-uint32_t DIARawSymbol::getOemSymbolId() const {
+SymIndexId DIARawSymbol::getOemSymbolId() const {
return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_oemSymbolId);
}
@@ -702,7 +702,7 @@
return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_stride);
}
-uint32_t DIARawSymbol::getSubTypeId() const {
+SymIndexId DIARawSymbol::getSubTypeId() const {
return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_subTypeId);
}
@@ -710,7 +710,7 @@
return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_symbolsFileName);
}
-uint32_t DIARawSymbol::getSymIndexId() const {
+SymIndexId DIARawSymbol::getSymIndexId() const {
return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_symIndexId);
}
@@ -743,7 +743,7 @@
return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_token);
}
-uint32_t DIARawSymbol::getTypeId() const {
+SymIndexId DIARawSymbol::getTypeId() const {
return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_typeId);
}
@@ -755,11 +755,11 @@
return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_undecoratedName);
}
-uint32_t DIARawSymbol::getUnmodifiedTypeId() const {
+SymIndexId DIARawSymbol::getUnmodifiedTypeId() const {
return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_unmodifiedTypeId);
}
-uint32_t DIARawSymbol::getUpperBoundId() const {
+SymIndexId DIARawSymbol::getUpperBoundId() const {
return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_upperBoundId);
}
@@ -780,7 +780,7 @@
return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualBaseOffset);
}
-uint32_t DIARawSymbol::getVirtualTableShapeId() const {
+SymIndexId DIARawSymbol::getVirtualTableShapeId() const {
return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualTableShapeId);
}
diff --git a/llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp b/llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp
index f133b7f..8f90f49 100644
--- a/llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp
+++ b/llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp
@@ -187,7 +187,8 @@
return false;
}
-std::unique_ptr<PDBSymbol> DIASession::getSymbolById(uint32_t SymbolId) const {
+std::unique_ptr<PDBSymbol>
+DIASession::getSymbolById(SymIndexId SymbolId) const {
CComPtr<IDiaSymbol> LocatedSymbol;
if (S_OK != Session->symbolById(SymbolId, &LocatedSymbol))
return nullptr;
diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp
index 14c976f..b278526 100644
--- a/llvm/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp
+++ b/llvm/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp
@@ -41,7 +41,7 @@
return Module.hasECInfo();
}
-uint32_t NativeCompilandSymbol::getLexicalParentId() const { return 0; }
+SymIndexId NativeCompilandSymbol::getLexicalParentId() const { return 0; }
// The usage of getObjFileName for getLibraryName and getModuleName for getName
// may seem backwards, but it is consistent with DIA, which is what this API
diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp
index c0e6df7..e36d534 100644
--- a/llvm/lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp
+++ b/llvm/lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp
@@ -110,9 +110,7 @@
return 0;
}
-uint32_t NativeRawSymbol::getArrayIndexTypeId() const {
- return 0;
-}
+SymIndexId NativeRawSymbol::getArrayIndexTypeId() const { return 0; }
void NativeRawSymbol::getBackEndVersion(VersionInfo &Version) const {
Version.Major = 0;
@@ -129,9 +127,7 @@
return 0;
}
-uint32_t NativeRawSymbol::getBaseSymbolId() const {
- return 0;
-}
+SymIndexId NativeRawSymbol::getBaseSymbolId() const { return 0; }
PDB_BuiltinType NativeRawSymbol::getBuiltinType() const {
return PDB_BuiltinType::None;
@@ -145,9 +141,7 @@
return PDB_CallingConv::FarStdCall;
}
-uint32_t NativeRawSymbol::getClassParentId() const {
- return 0;
-}
+SymIndexId NativeRawSymbol::getClassParentId() const { return 0; }
std::string NativeRawSymbol::getCompilerName() const {
return {};
@@ -172,9 +166,7 @@
return PDB_Lang::Cobol;
}
-uint32_t NativeRawSymbol::getLexicalParentId() const {
- return 0;
-}
+SymIndexId NativeRawSymbol::getLexicalParentId() const { return 0; }
std::string NativeRawSymbol::getLibraryName() const {
return {};
@@ -196,9 +188,7 @@
return codeview::RegisterId::EAX;
}
-uint32_t NativeRawSymbol::getLowerBoundId() const {
- return 0;
-}
+SymIndexId NativeRawSymbol::getLowerBoundId() const { return 0; }
uint32_t NativeRawSymbol::getMemorySpaceKind() const {
return 0;
@@ -236,9 +226,7 @@
return 0;
}
-uint32_t NativeRawSymbol::getOemSymbolId() const {
- return 0;
-}
+SymIndexId NativeRawSymbol::getOemSymbolId() const { return 0; }
uint32_t NativeRawSymbol::getOffsetInUdt() const {
return 0;
@@ -293,13 +281,11 @@
return 0;
}
-uint32_t NativeRawSymbol::getSubTypeId() const {
- return 0;
-}
+SymIndexId NativeRawSymbol::getSubTypeId() const { return 0; }
std::string NativeRawSymbol::getSymbolsFileName() const { return {}; }
-uint32_t NativeRawSymbol::getSymIndexId() const { return SymbolId; }
+SymIndexId NativeRawSymbol::getSymIndexId() const { return SymbolId; }
uint32_t NativeRawSymbol::getTargetOffset() const {
return 0;
@@ -329,9 +315,7 @@
return 0;
}
-uint32_t NativeRawSymbol::getTypeId() const {
- return 0;
-}
+SymIndexId NativeRawSymbol::getTypeId() const { return 0; }
uint32_t NativeRawSymbol::getUavSlot() const {
return 0;
@@ -346,13 +330,9 @@
return {};
}
-uint32_t NativeRawSymbol::getUnmodifiedTypeId() const {
- return 0;
-}
+SymIndexId NativeRawSymbol::getUnmodifiedTypeId() const { return 0; }
-uint32_t NativeRawSymbol::getUpperBoundId() const {
- return 0;
-}
+SymIndexId NativeRawSymbol::getUpperBoundId() const { return 0; }
Variant NativeRawSymbol::getValue() const {
return Variant();
@@ -366,9 +346,7 @@
return 0;
}
-uint32_t NativeRawSymbol::getVirtualTableShapeId() const {
- return 0;
-}
+SymIndexId NativeRawSymbol::getVirtualTableShapeId() const { return 0; }
std::unique_ptr<PDBSymbolTypeBuiltin>
NativeRawSymbol::getVirtualBaseTableType() const {
diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp
index c970323..baab0a2 100644
--- a/llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp
+++ b/llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp
@@ -89,7 +89,7 @@
}
std::unique_ptr<PDBSymbol>
-NativeSession::getSymbolById(uint32_t SymbolId) const {
+NativeSession::getSymbolById(SymIndexId SymbolId) const {
return Cache.getSymbolById(SymbolId);
}
diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp
index b238ace..ddb874b 100644
--- a/llvm/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp
+++ b/llvm/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp
@@ -155,7 +155,7 @@
llvm_unreachable("Unreachable");
}
-uint32_t NativeTypeEnum::getUnmodifiedTypeId() const {
+SymIndexId NativeTypeEnum::getUnmodifiedTypeId() const {
// FIXME: If this is const, volatile, or unaligned, we should return the
// SymIndexId of the unmodified type here.
return 0;
@@ -212,7 +212,7 @@
return bool(Record.getOptions() & codeview::ClassOptions::Scoped);
}
-uint32_t NativeTypeEnum::getTypeId() const {
+SymIndexId NativeTypeEnum::getTypeId() const {
return Session.getSymbolCache().findSymbolByTypeIndex(
Record.getUnderlyingType());
}
diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp
index bc3657b..0a648c7 100644
--- a/llvm/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp
+++ b/llvm/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp
@@ -57,7 +57,7 @@
uint64_t NativeTypePointer::getLength() const { return Record.getSize(); }
-uint32_t NativeTypePointer::getTypeId() const {
+SymIndexId NativeTypePointer::getTypeId() const {
// This is the pointee SymIndexId.
return Session.getSymbolCache().findSymbolByTypeIndex(Record.ReferentType);
}