From 107e5d11a7c235c81ccfeb6333aeb2ab23856166 Mon Sep 17 00:00:00 2001 From: Viktoria Maximova Date: Tue, 9 May 2023 10:40:14 -0700 Subject: [PATCH] [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 --- lib/SPIRV/SPIRVToLLVMDbgTran.cpp | 2 ++ 1 file changed, 2 insertions(+) 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()) { -- 2.30.2