aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode
diff options
context:
space:
mode:
authorStephen Tozer <stephen.tozer@sony.com>2024-04-15 13:15:27 +0100
committerGitHub <noreply@github.com>2024-04-15 13:15:27 +0100
commit7b039c0cf0045d81da7e1575232a46266cff1e88 (patch)
tree69038e296692d36e33cbcc5f6fa3a9912e34e719 /llvm/lib/Bitcode
parent673da8c83413c4d1e7e76e1b52a2924e837e7221 (diff)
downloadllvm-7b039c0cf0045d81da7e1575232a46266cff1e88.zip
llvm-7b039c0cf0045d81da7e1575232a46266cff1e88.tar.gz
llvm-7b039c0cf0045d81da7e1575232a46266cff1e88.tar.bz2
[DebugInfo][RemoveDIs] Fix error from not tracking seen debug labels (#88718)
Fixes the reported errors on: https://github.com/llvm/llvm-project/pull/87379 A previous patch updated the bitcode reading for debug intrinsics/records to not perform the expensive debug info format conversion from records to intrinsics in cases where no records were present, but the patch did not actually track when debug labels had been seen, resulting in errors when parsing bitcode where functions contained debug label records but no other debug records. This patch fixes that case and adds a test for it.
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index fe4f0d6..0b7fcd8 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -6454,6 +6454,7 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
case bitc::FUNC_CODE_DEBUG_RECORD_LABEL: {
// DbgLabelRecords are placed after the Instructions that they are
// attached to.
+ SeenDebugRecord = true;
Instruction *Inst = getLastInstruction();
if (!Inst)
return error("Invalid dbg record: missing instruction");