19 : SourceFile(DiaSourceFile) {}
23 return (S_OK == SourceFile->get_crc(&Crc)) ? Crc : 0;
28 return (S_OK == SourceFile->get_length(&
Size)) ?
Size : 0;
36 return invokeBstrMethod(*SourceFile, &IDiaInjectedSource::get_objectFilename);
41 &IDiaInjectedSource::get_virtualFilename);
45 DWORD Compression = 0;
46 if (S_OK != SourceFile->get_sourceCompression(&Compression))
48 return static_cast<uint32_t>(Compression);
53 if (S_OK != SourceFile->get_source(0, &DataSize,
nullptr))
56 std::vector<uint8_t> Buffer(DataSize);
57 if (S_OK != SourceFile->get_source(DataSize, &DataSize, Buffer.data()))
59 assert(Buffer.size() == DataSize);
60 return std::string(
reinterpret_cast<const char *
>(Buffer.data()),
std::string invokeBstrMethod(Obj &Object, HRESULT(__stdcall Obj::*Func)(BSTR *))
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
std::string getVirtualFileName() const override
uint32_t getCrc32() const override
std::string getObjectFileName() const override
std::string getCode() const override
std::string getFileName() const override
DIAInjectedSource(CComPtr< IDiaInjectedSource > DiaSourceFile)
uint32_t getCompression() const override
uint64_t getCodeByteSize() const override
This is an optimization pass for GlobalISel generic memory operations.