}
for (unsigned I = 0, E = BM->getNumVariables(); I != E; ++I) {
- auto BV = BM->getVariable(I);
+ auto *BV = BM->getVariable(I);
if (BV->getStorageClass() != StorageClassFunction)
transValue(BV, nullptr, nullptr);
else
return String->getStr();
}
-const std::string
+Optional<std::string>
SPIRVToLLVMDbgTran::getStringSourceContinued(const SPIRVId Id,
SPIRVExtInst *DebugInst) {
if (!isValidId(Id) || getDbgInst<SPIRVDebug::DebugInfoNone>(Id))
- return "";
+ return {};
std::string Str = BM->get<SPIRVString>(Id)->getStr();
using namespace SPIRVDebug::Operand::SourceContinued;
for (auto *I : DebugInst->getContinuedInstructions()) {
private:
DIFile *getFile(const SPIRVId SourceId);
- DIFile *
- getDIFile(const std::string &FileName,
- Optional<DIFile::ChecksumInfo<StringRef>> CS = None,
- Optional<std::string> Source = None);
+ DIFile *getDIFile(const std::string &FileName,
+ Optional<DIFile::ChecksumInfo<StringRef>> CS = None,
+ Optional<std::string> Source = None);
DIFile *getDIFile(const SPIRVEntry *E);
unsigned getLineNo(const SPIRVEntry *E);
return nullptr;
}
const std::string &getString(const SPIRVId Id);
- const std::string getStringSourceContinued(const SPIRVId Id,
- SPIRVExtInst *DebugInst);
+ Optional<std::string> getStringSourceContinued(const SPIRVId Id,
+ SPIRVExtInst *DebugInst);
SPIRVWord getConstantValueOrLiteral(const std::vector<SPIRVWord> &,
const SPIRVWord,
const SPIRVExtInstSetKind);