From: Viktoria Maximova Date: Tue, 9 May 2023 17:40:14 +0000 (-0700) Subject: [PATCH 51/79] [DebugInfo] Fix translation of DebugSource Text argument (#2003) X-Git-Tag: archive/raspbian/15.0.0-6+rpi1^2~30 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5f5ff1fb62481fc60ec340522e55a3b71acda101;p=spirv-llvm-translator-15.git [PATCH 51/79] [DebugInfo] Fix translation of DebugSource Text argument (#2003) Handle the case when we have `DebugInfoNone` for the Text argument which is usually expected to be `OpString`. Gbp-Pq: Name 0051-DebugInfo-Fix-translation-of-DebugSource-Text-argume.patch --- diff --git a/lib/SPIRV/SPIRVToLLVMDbgTran.cpp b/lib/SPIRV/SPIRVToLLVMDbgTran.cpp index 5d58e81..fcbf47e 100644 --- a/lib/SPIRV/SPIRVToLLVMDbgTran.cpp +++ b/lib/SPIRV/SPIRVToLLVMDbgTran.cpp @@ -144,6 +144,8 @@ const std::string &SPIRVToLLVMDbgTran::getString(const SPIRVId Id) { Optional SPIRVToLLVMDbgTran::getStringContinued(const SPIRVId Id, SPIRVExtInst *DebugInst) { + if (getDbgInst(Id)) + return std::string(); std::string Str = BM->get(Id)->getStr(); using namespace SPIRVDebug::Operand::SourceContinued; for (auto *I : DebugInst->getContinuedInstructions()) {