20 CComPtr<IDiaSourceFile> DiaSourceFile)
21 : Session(PDBSession), SourceFile(DiaSourceFile) {}
29 return (S_OK == SourceFile->get_uniqueId(&Id)) ? Id : 0;
34 HRESULT Result = SourceFile->get_checksum(0, &ByteSize,
nullptr);
37 std::vector<BYTE> ChecksumBytes(ByteSize);
38 Result = SourceFile->get_checksum(ByteSize, &ByteSize, &ChecksumBytes[0]);
41 return std::string(ChecksumBytes.begin(), ChecksumBytes.end());
46 HRESULT Result = SourceFile->get_checksumType(&
Type);
52std::unique_ptr<IPDBEnumChildren<PDBSymbolCompiland>>
54 CComPtr<IDiaEnumSymbols> DiaEnumerator;
55 HRESULT Result = SourceFile->get_compilands(&DiaEnumerator);
59 auto Enumerator = std::unique_ptr<IPDBEnumSymbols>(
61 return std::unique_ptr<IPDBEnumChildren<PDBSymbolCompiland>>(
std::string invokeBstrMethod(Obj &Object, HRESULT(__stdcall Obj::*Func)(BSTR *))
The instances of the Type class are immutable: once they are created, they are never changed.
uint32_t getUniqueId() const override
std::string getFileName() const override
std::unique_ptr< IPDBEnumChildren< PDBSymbolCompiland > > getCompilands() const override
DIASourceFile(const DIASession &Session, CComPtr< IDiaSourceFile > DiaSourceFile)
std::string getChecksum() const override
PDB_Checksum getChecksumType() const override
PDB_Checksum
Specifies the hash algorithm that a source file from a PDB was hashed with.
This is an optimization pass for GlobalISel generic memory operations.