[llvm] r341863 - [PDB] Change uint32_t to SymIndex wherever it makes sense.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 10 14:30:59 PDT 2018


Author: zturner
Date: Mon Sep 10 14:30:59 2018
New Revision: 341863

URL: http://llvm.org/viewvc/llvm-project?rev=341863&view=rev
Log:
[PDB] Change uint32_t to SymIndex wherever it makes sense.

Although it's just a typedef, it helps for readability.  NFC.

Modified:
    llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h
    llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIASession.h
    llvm/trunk/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h
    llvm/trunk/include/llvm/DebugInfo/PDB/IPDBSession.h
    llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h
    llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h
    llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeSession.h
    llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeTypeEnum.h
    llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeTypePointer.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBTypes.h
    llvm/trunk/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp
    llvm/trunk/lib/DebugInfo/PDB/DIA/DIASession.cpp
    llvm/trunk/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp
    llvm/trunk/lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp
    llvm/trunk/lib/DebugInfo/PDB/Native/NativeSession.cpp
    llvm/trunk/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp
    llvm/trunk/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp
    llvm/trunk/unittests/DebugInfo/PDB/PDBApiTest.cpp

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h?rev=341863&r1=341862&r2=341863&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h Mon Sep 10 14:30:59 2018
@@ -63,25 +63,25 @@ public:
   uint32_t getAddressOffset() const override;
   uint32_t getAddressSection() const override;
   uint32_t getAge() const override;
-  uint32_t getArrayIndexTypeId() const override;
+  SymIndexId getArrayIndexTypeId() const override;
   uint32_t getBaseDataOffset() const override;
   uint32_t getBaseDataSlot() const override;
-  uint32_t getBaseSymbolId() const override;
+  SymIndexId getBaseSymbolId() const override;
   PDB_BuiltinType getBuiltinType() const override;
   uint32_t getBitPosition() const override;
   PDB_CallingConv getCallingConvention() const override;
-  uint32_t getClassParentId() const override;
+  SymIndexId getClassParentId() const override;
   std::string getCompilerName() const override;
   uint32_t getCount() const override;
   uint32_t getCountLiveRanges() const override;
   PDB_Lang getLanguage() const override;
-  uint32_t getLexicalParentId() const override;
+  SymIndexId getLexicalParentId() const override;
   std::string getLibraryName() const override;
   uint32_t getLiveRangeStartAddressOffset() const override;
   uint32_t getLiveRangeStartAddressSection() const override;
   uint32_t getLiveRangeStartRelativeVirtualAddress() const override;
   codeview::RegisterId getLocalBasePointerRegisterId() const override;
-  uint32_t getLowerBoundId() const override;
+  SymIndexId getLowerBoundId() const override;
   uint32_t getMemorySpaceKind() const override;
   std::string getName() const override;
   uint32_t getNumberOfAcceleratorPointerTags() const override;
@@ -91,7 +91,7 @@ public:
   uint32_t getNumberOfRows() const override;
   std::string getObjectFileName() const override;
   uint32_t getOemId() const override;
-  uint32_t getOemSymbolId() const override;
+  SymIndexId getOemSymbolId() const override;
   uint32_t getOffsetInUdt() const override;
   PDB_Cpu getPlatform() const override;
   uint32_t getRank() const override;
@@ -105,9 +105,9 @@ public:
   std::string getSourceFileName() const override;
   std::unique_ptr<IPDBLineNumber> getSrcLineOnTypeDefn() const override;
   uint32_t getStride() const override;
-  uint32_t getSubTypeId() const override;
+  SymIndexId getSubTypeId() const override;
   std::string getSymbolsFileName() const override;
-  uint32_t getSymIndexId() const override;
+  SymIndexId getSymIndexId() const override;
   uint32_t getTargetOffset() const override;
   uint32_t getTargetRelativeVirtualAddress() const override;
   uint64_t getTargetVirtualAddress() const override;
@@ -115,16 +115,16 @@ public:
   uint32_t getTextureSlot() const override;
   uint32_t getTimeStamp() const override;
   uint32_t getToken() const override;
-  uint32_t getTypeId() const override;
+  SymIndexId getTypeId() const override;
   uint32_t getUavSlot() const override;
   std::string getUndecoratedName() const override;
   std::string getUndecoratedNameEx(PDB_UndnameFlags Flags) const override;
-  uint32_t getUnmodifiedTypeId() const override;
-  uint32_t getUpperBoundId() const override;
+  SymIndexId getUnmodifiedTypeId() const override;
+  SymIndexId getUpperBoundId() const override;
   Variant getValue() const override;
   uint32_t getVirtualBaseDispIndex() const override;
   uint32_t getVirtualBaseOffset() const override;
-  uint32_t getVirtualTableShapeId() const override;
+  SymIndexId getVirtualTableShapeId() const override;
   std::unique_ptr<PDBSymbolTypeBuiltin>
   getVirtualBaseTableType() const override;
   PDB_DataKind getDataKind() const override;

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIASession.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIASession.h?rev=341863&r1=341862&r2=341863&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIASession.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/DIA/DIASession.h Mon Sep 10 14:30:59 2018
@@ -32,7 +32,7 @@ public:
   uint64_t getLoadAddress() const override;
   bool setLoadAddress(uint64_t Address) override;
   std::unique_ptr<PDBSymbolExe> getGlobalScope() override;
-  std::unique_ptr<PDBSymbol> getSymbolById(uint32_t SymbolId) const override;
+  std::unique_ptr<PDBSymbol> getSymbolById(SymIndexId SymbolId) const override;
 
   bool addressForVA(uint64_t VA, uint32_t &Section,
                     uint32_t &Offset) const override;

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h?rev=341863&r1=341862&r2=341863&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h Mon Sep 10 14:30:59 2018
@@ -81,26 +81,26 @@ public:
   virtual uint32_t getAddressOffset() const = 0;
   virtual uint32_t getAddressSection() const = 0;
   virtual uint32_t getAge() const = 0;
-  virtual uint32_t getArrayIndexTypeId() const = 0;
+  virtual SymIndexId getArrayIndexTypeId() const = 0;
   virtual uint32_t getBaseDataOffset() const = 0;
   virtual uint32_t getBaseDataSlot() const = 0;
-  virtual uint32_t getBaseSymbolId() const = 0;
+  virtual SymIndexId getBaseSymbolId() const = 0;
   virtual PDB_BuiltinType getBuiltinType() const = 0;
   virtual uint32_t getBitPosition() const = 0;
   virtual PDB_CallingConv getCallingConvention() const = 0;
-  virtual uint32_t getClassParentId() const = 0;
+  virtual SymIndexId getClassParentId() const = 0;
   virtual std::string getCompilerName() const = 0;
   virtual uint32_t getCount() const = 0;
   virtual uint32_t getCountLiveRanges() const = 0;
   virtual void getFrontEndVersion(VersionInfo &Version) const = 0;
   virtual PDB_Lang getLanguage() const = 0;
-  virtual uint32_t getLexicalParentId() const = 0;
+  virtual SymIndexId getLexicalParentId() const = 0;
   virtual std::string getLibraryName() const = 0;
   virtual uint32_t getLiveRangeStartAddressOffset() const = 0;
   virtual uint32_t getLiveRangeStartAddressSection() const = 0;
   virtual uint32_t getLiveRangeStartRelativeVirtualAddress() const = 0;
   virtual codeview::RegisterId getLocalBasePointerRegisterId() const = 0;
-  virtual uint32_t getLowerBoundId() const = 0;
+  virtual SymIndexId getLowerBoundId() const = 0;
   virtual uint32_t getMemorySpaceKind() const = 0;
   virtual std::string getName() const = 0;
   virtual uint32_t getNumberOfAcceleratorPointerTags() const = 0;
@@ -110,7 +110,7 @@ public:
   virtual uint32_t getNumberOfRows() const = 0;
   virtual std::string getObjectFileName() const = 0;
   virtual uint32_t getOemId() const = 0;
-  virtual uint32_t getOemSymbolId() const = 0;
+  virtual SymIndexId getOemSymbolId() const = 0;
   virtual uint32_t getOffsetInUdt() const = 0;
   virtual PDB_Cpu getPlatform() const = 0;
   virtual uint32_t getRank() const = 0;
@@ -125,9 +125,9 @@ public:
   virtual std::unique_ptr<IPDBLineNumber>
   getSrcLineOnTypeDefn() const = 0;
   virtual uint32_t getStride() const = 0;
-  virtual uint32_t getSubTypeId() const = 0;
+  virtual SymIndexId getSubTypeId() const = 0;
   virtual std::string getSymbolsFileName() const = 0;
-  virtual uint32_t getSymIndexId() const = 0;
+  virtual SymIndexId getSymIndexId() const = 0;
   virtual uint32_t getTargetOffset() const = 0;
   virtual uint32_t getTargetRelativeVirtualAddress() const = 0;
   virtual uint64_t getTargetVirtualAddress() const = 0;
@@ -135,18 +135,18 @@ public:
   virtual uint32_t getTextureSlot() const = 0;
   virtual uint32_t getTimeStamp() const = 0;
   virtual uint32_t getToken() const = 0;
-  virtual uint32_t getTypeId() const = 0;
+  virtual SymIndexId getTypeId() const = 0;
   virtual uint32_t getUavSlot() const = 0;
   virtual std::string getUndecoratedName() const = 0;
   virtual std::string getUndecoratedNameEx(PDB_UndnameFlags Flags) const = 0;
-  virtual uint32_t getUnmodifiedTypeId() const = 0;
-  virtual uint32_t getUpperBoundId() const = 0;
+  virtual SymIndexId getUnmodifiedTypeId() const = 0;
+  virtual SymIndexId getUpperBoundId() const = 0;
   virtual Variant getValue() const = 0;
   virtual uint32_t getVirtualBaseDispIndex() const = 0;
   virtual uint32_t getVirtualBaseOffset() const = 0;
   virtual std::unique_ptr<PDBSymbolTypeBuiltin>
   getVirtualBaseTableType() const = 0;
-  virtual uint32_t getVirtualTableShapeId() const = 0;
+  virtual SymIndexId getVirtualTableShapeId() const = 0;
   virtual PDB_DataKind getDataKind() const = 0;
   virtual PDB_SymType getSymTag() const = 0;
   virtual codeview::GUID getGuid() const = 0;

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/IPDBSession.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/IPDBSession.h?rev=341863&r1=341862&r2=341863&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/IPDBSession.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/IPDBSession.h Mon Sep 10 14:30:59 2018
@@ -30,7 +30,8 @@ public:
   virtual uint64_t getLoadAddress() const = 0;
   virtual bool setLoadAddress(uint64_t Address) = 0;
   virtual std::unique_ptr<PDBSymbolExe> getGlobalScope() = 0;
-  virtual std::unique_ptr<PDBSymbol> getSymbolById(uint32_t SymbolId) const = 0;
+  virtual std::unique_ptr<PDBSymbol>
+  getSymbolById(SymIndexId SymbolId) const = 0;
 
   virtual bool addressForVA(uint64_t VA, uint32_t &Section,
                             uint32_t &Offset) const = 0;
@@ -38,7 +39,7 @@ public:
                              uint32_t &Offset) const = 0;
 
   template <typename T>
-  std::unique_ptr<T> getConcreteSymbolById(uint32_t SymbolId) const {
+  std::unique_ptr<T> getConcreteSymbolById(SymIndexId SymbolId) const {
     return unique_dyn_cast_or_null<T>(getSymbolById(SymbolId));
   }
 

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h?rev=341863&r1=341862&r2=341863&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h Mon Sep 10 14:30:59 2018
@@ -27,7 +27,7 @@ public:
 
   PDB_SymType getSymTag() const override;
   bool isEditAndContinueEnabled() const override;
-  uint32_t getLexicalParentId() const override;
+  SymIndexId getLexicalParentId() const override;
   std::string getLibraryName() const override;
   std::string getName() const override;
 

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h?rev=341863&r1=341862&r2=341863&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h Mon Sep 10 14:30:59 2018
@@ -19,8 +19,6 @@ namespace pdb {
 
 class NativeSession;
 
-typedef uint32_t SymIndexId;
-
 class NativeRawSymbol : public IPDBRawSymbol {
 public:
   NativeRawSymbol(NativeSession &PDBSession, PDB_SymType Tag,
@@ -69,25 +67,25 @@ public:
   uint32_t getAddressOffset() const override;
   uint32_t getAddressSection() const override;
   uint32_t getAge() const override;
-  uint32_t getArrayIndexTypeId() const override;
+  SymIndexId getArrayIndexTypeId() const override;
   uint32_t getBaseDataOffset() const override;
   uint32_t getBaseDataSlot() const override;
-  uint32_t getBaseSymbolId() const override;
+  SymIndexId getBaseSymbolId() const override;
   PDB_BuiltinType getBuiltinType() const override;
   uint32_t getBitPosition() const override;
   PDB_CallingConv getCallingConvention() const override;
-  uint32_t getClassParentId() const override;
+  SymIndexId getClassParentId() const override;
   std::string getCompilerName() const override;
   uint32_t getCount() const override;
   uint32_t getCountLiveRanges() const override;
   PDB_Lang getLanguage() const override;
-  uint32_t getLexicalParentId() const override;
+  SymIndexId getLexicalParentId() const override;
   std::string getLibraryName() const override;
   uint32_t getLiveRangeStartAddressOffset() const override;
   uint32_t getLiveRangeStartAddressSection() const override;
   uint32_t getLiveRangeStartRelativeVirtualAddress() const override;
   codeview::RegisterId getLocalBasePointerRegisterId() const override;
-  uint32_t getLowerBoundId() const override;
+  SymIndexId getLowerBoundId() const override;
   uint32_t getMemorySpaceKind() const override;
   std::string getName() const override;
   uint32_t getNumberOfAcceleratorPointerTags() const override;
@@ -97,7 +95,7 @@ public:
   uint32_t getNumberOfRows() const override;
   std::string getObjectFileName() const override;
   uint32_t getOemId() const override;
-  uint32_t getOemSymbolId() const override;
+  SymIndexId getOemSymbolId() const override;
   uint32_t getOffsetInUdt() const override;
   PDB_Cpu getPlatform() const override;
   uint32_t getRank() const override;
@@ -111,9 +109,9 @@ public:
   std::string getSourceFileName() const override;
   std::unique_ptr<IPDBLineNumber> getSrcLineOnTypeDefn() const override;
   uint32_t getStride() const override;
-  uint32_t getSubTypeId() const override;
+  SymIndexId getSubTypeId() const override;
   std::string getSymbolsFileName() const override;
-  uint32_t getSymIndexId() const override;
+  SymIndexId getSymIndexId() const override;
   uint32_t getTargetOffset() const override;
   uint32_t getTargetRelativeVirtualAddress() const override;
   uint64_t getTargetVirtualAddress() const override;
@@ -121,16 +119,16 @@ public:
   uint32_t getTextureSlot() const override;
   uint32_t getTimeStamp() const override;
   uint32_t getToken() const override;
-  uint32_t getTypeId() const override;
+  SymIndexId getTypeId() const override;
   uint32_t getUavSlot() const override;
   std::string getUndecoratedName() const override;
   std::string getUndecoratedNameEx(PDB_UndnameFlags Flags) const override;
-  uint32_t getUnmodifiedTypeId() const override;
-  uint32_t getUpperBoundId() const override;
+  SymIndexId getUnmodifiedTypeId() const override;
+  SymIndexId getUpperBoundId() const override;
   Variant getValue() const override;
   uint32_t getVirtualBaseDispIndex() const override;
   uint32_t getVirtualBaseOffset() const override;
-  uint32_t getVirtualTableShapeId() const override;
+  SymIndexId getVirtualTableShapeId() const override;
   std::unique_ptr<PDBSymbolTypeBuiltin>
   getVirtualBaseTableType() const override;
   PDB_DataKind getDataKind() const override;

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeSession.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeSession.h?rev=341863&r1=341862&r2=341863&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeSession.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeSession.h Mon Sep 10 14:30:59 2018
@@ -40,7 +40,7 @@ public:
   uint64_t getLoadAddress() const override;
   bool setLoadAddress(uint64_t Address) override;
   std::unique_ptr<PDBSymbolExe> getGlobalScope() override;
-  std::unique_ptr<PDBSymbol> getSymbolById(uint32_t SymbolId) const override;
+  std::unique_ptr<PDBSymbol> getSymbolById(SymIndexId SymbolId) const override;
 
   bool addressForVA(uint64_t VA, uint32_t &Section,
                     uint32_t &Offset) const override;

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeTypeEnum.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeTypeEnum.h?rev=341863&r1=341862&r2=341863&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeTypeEnum.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeTypeEnum.h Mon Sep 10 14:30:59 2018
@@ -39,7 +39,7 @@ public:
 
   PDB_BuiltinType getBuiltinType() const override;
   PDB_SymType getSymTag() const override;
-  uint32_t getUnmodifiedTypeId() const override;
+  SymIndexId getUnmodifiedTypeId() const override;
   bool hasConstructor() const override;
   bool hasAssignmentOperator() const override;
   bool hasCastOperator() const override;
@@ -51,7 +51,7 @@ public:
   bool isIntrinsic() const override;
   bool isPacked() const override;
   bool isScoped() const override;
-  uint32_t getTypeId() const override;
+  SymIndexId getTypeId() const override;
   bool isRefUdt() const override;
   bool isValueUdt() const override;
   bool isInterfaceUdt() const override;

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeTypePointer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeTypePointer.h?rev=341863&r1=341862&r2=341863&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeTypePointer.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/Native/NativeTypePointer.h Mon Sep 10 14:30:59 2018
@@ -35,7 +35,7 @@ public:
   bool isRValueReference() const override;
   bool isPointerToDataMember() const override;
   bool isPointerToMemberFunction() const override;
-  uint32_t getTypeId() const override;
+  SymIndexId getTypeId() const override;
   bool isRestrictedType() const override;
   bool isVolatileType() const override;
   bool isUnalignedType() const override;

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBTypes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBTypes.h?rev=341863&r1=341862&r2=341863&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBTypes.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBTypes.h Mon Sep 10 14:30:59 2018
@@ -22,6 +22,8 @@
 namespace llvm {
 namespace pdb {
 
+typedef uint32_t SymIndexId;
+
 class IPDBDataStream;
 class IPDBInjectedSource;
 class IPDBLineNumber;

Modified: llvm/trunk/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp?rev=341863&r1=341862&r2=341863&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp Mon Sep 10 14:30:59 2018
@@ -507,7 +507,7 @@ uint32_t DIARawSymbol::getAge() const {
   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 @@ uint32_t DIARawSymbol::getBaseDataSlot()
   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 @@ PDB_CallingConv DIARawSymbol::getCalling
       Symbol, &IDiaSymbol::get_callingConvention);
 }
 
-uint32_t DIARawSymbol::getClassParentId() const {
+SymIndexId DIARawSymbol::getClassParentId() const {
   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_classParentId);
 }
 
@@ -571,7 +571,7 @@ PDB_Lang DIARawSymbol::getLanguage() con
   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 @@ codeview::RegisterId DIARawSymbol::getLo
       Symbol, &IDiaSymbol::get_localBasePointerRegisterId);
 }
 
-uint32_t DIARawSymbol::getLowerBoundId() const {
+SymIndexId DIARawSymbol::getLowerBoundId() const {
   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_lowerBoundId);
 }
 
@@ -640,7 +640,7 @@ uint32_t DIARawSymbol::getOemId() const
   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 @@ uint32_t DIARawSymbol::getStride() const
   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 @@ std::string DIARawSymbol::getSymbolsFile
   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 @@ uint32_t DIARawSymbol::getToken() const
   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 @@ std::string DIARawSymbol::getUndecorated
   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 @@ uint32_t DIARawSymbol::getVirtualBaseOff
   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualBaseOffset);
 }
 
-uint32_t DIARawSymbol::getVirtualTableShapeId() const {
+SymIndexId DIARawSymbol::getVirtualTableShapeId() const {
   return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_virtualTableShapeId);
 }
 

Modified: llvm/trunk/lib/DebugInfo/PDB/DIA/DIASession.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/DIA/DIASession.cpp?rev=341863&r1=341862&r2=341863&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/DIA/DIASession.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/DIA/DIASession.cpp Mon Sep 10 14:30:59 2018
@@ -187,7 +187,8 @@ bool DIASession::addressForRVA(uint32_t
   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;

Modified: llvm/trunk/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp?rev=341863&r1=341862&r2=341863&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp Mon Sep 10 14:30:59 2018
@@ -41,7 +41,7 @@ bool NativeCompilandSymbol::isEditAndCon
   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

Modified: llvm/trunk/lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp?rev=341863&r1=341862&r2=341863&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp Mon Sep 10 14:30:59 2018
@@ -110,9 +110,7 @@ uint32_t NativeRawSymbol::getAge() const
   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 @@ uint32_t NativeRawSymbol::getBaseDataSlo
   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 @@ PDB_CallingConv NativeRawSymbol::getCall
   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 @@ PDB_Lang NativeRawSymbol::getLanguage()
   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 @@ codeview::RegisterId NativeRawSymbol::ge
   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 @@ uint32_t NativeRawSymbol::getOemId() con
   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 @@ uint32_t NativeRawSymbol::getStride() co
   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 @@ uint32_t NativeRawSymbol::getToken() con
   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 @@ std::string NativeRawSymbol::getUndecora
   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 @@ uint32_t NativeRawSymbol::getVirtualBase
   return 0;
 }
 
-uint32_t NativeRawSymbol::getVirtualTableShapeId() const {
-  return 0;
-}
+SymIndexId NativeRawSymbol::getVirtualTableShapeId() const { return 0; }
 
 std::unique_ptr<PDBSymbolTypeBuiltin>
 NativeRawSymbol::getVirtualBaseTableType() const {

Modified: llvm/trunk/lib/DebugInfo/PDB/Native/NativeSession.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Native/NativeSession.cpp?rev=341863&r1=341862&r2=341863&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Native/NativeSession.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Native/NativeSession.cpp Mon Sep 10 14:30:59 2018
@@ -89,7 +89,7 @@ std::unique_ptr<PDBSymbolExe> NativeSess
 }
 
 std::unique_ptr<PDBSymbol>
-NativeSession::getSymbolById(uint32_t SymbolId) const {
+NativeSession::getSymbolById(SymIndexId SymbolId) const {
   return Cache.getSymbolById(SymbolId);
 }
 

Modified: llvm/trunk/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp?rev=341863&r1=341862&r2=341863&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp Mon Sep 10 14:30:59 2018
@@ -155,7 +155,7 @@ PDB_BuiltinType NativeTypeEnum::getBuilt
   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 @@ bool NativeTypeEnum::isScoped() const {
   return bool(Record.getOptions() & codeview::ClassOptions::Scoped);
 }
 
-uint32_t NativeTypeEnum::getTypeId() const {
+SymIndexId NativeTypeEnum::getTypeId() const {
   return Session.getSymbolCache().findSymbolByTypeIndex(
       Record.getUnderlyingType());
 }

Modified: llvm/trunk/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp?rev=341863&r1=341862&r2=341863&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp Mon Sep 10 14:30:59 2018
@@ -57,7 +57,7 @@ bool NativeTypePointer::isConstType() co
 
 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);
 }

Modified: llvm/trunk/unittests/DebugInfo/PDB/PDBApiTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/DebugInfo/PDB/PDBApiTest.cpp?rev=341863&r1=341862&r2=341863&view=diff
==============================================================================
--- llvm/trunk/unittests/DebugInfo/PDB/PDBApiTest.cpp (original)
+++ llvm/trunk/unittests/DebugInfo/PDB/PDBApiTest.cpp Mon Sep 10 14:30:59 2018
@@ -68,7 +68,7 @@ class MockSession : public IPDBSession {
   uint64_t getLoadAddress() const override { return 0; }
   bool setLoadAddress(uint64_t Address) override { return false; }
   std::unique_ptr<PDBSymbolExe> getGlobalScope() override { return nullptr; }
-  std::unique_ptr<PDBSymbol> getSymbolById(uint32_t SymbolId) const override {
+  std::unique_ptr<PDBSymbol> getSymbolById(SymIndexId SymbolId) const override {
     return nullptr;
   }
   std::unique_ptr<IPDBSourceFile>




More information about the llvm-commits mailing list