18 CComPtr<IDiaSourceFile> DiaSourceFile)
19 : Session(PDBSession), SourceFile(DiaSourceFile) {}
23 HRESULT Result = SourceFile->get_fileName(&FileName16);
27 std::string FileName8;
29 FileName16.ByteLength());
36 return (S_OK == SourceFile->get_uniqueId(&Id)) ? Id : 0;
41 HRESULT Result = SourceFile->get_checksum(0, &ByteSize,
nullptr);
44 std::vector<BYTE> ChecksumBytes(ByteSize);
45 Result = SourceFile->get_checksum(ByteSize, &ByteSize, &ChecksumBytes[0]);
48 return std::string(ChecksumBytes.begin(), ChecksumBytes.end());
53 HRESULT Result = SourceFile->get_checksumType(&Type);
60 CComPtr<IDiaEnumSymbols> DiaEnumerator;
61 HRESULT Result = SourceFile->get_compilands(&DiaEnumerator);
65 return std::unique_ptr<IPDBEnumSymbols>(
std::string getFileName() const override
std::unique_ptr< IPDBEnumSymbols > getCompilands() const override
PDB_Checksum getChecksumType() const override
DIASourceFile(const DIASession &Session, CComPtr< IDiaSourceFile > DiaSourceFile)
uint32_t getUniqueId() const override
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
PDB_Checksum
Specifies the hash algorithm that a source file from a PDB was hashed with.
std::string getChecksum() const override
bool convertUTF16ToUTF8String(ArrayRef< char > SrcBytes, std::string &Out)