[llvm] [DWARFLinkerParallel] Add missing version string in producer (PR #158195)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 11 21:53:42 PDT 2025
https://github.com/shatyuka created https://github.com/llvm/llvm-project/pull/158195
Add missing LLVM version string to `DW_AT_producer` in `__artificial_type_unit`.
>From 9836f35682618ab5aed1ae0b8c59e9118ac02371 Mon Sep 17 00:00:00 2001
From: shatyuka <shatyuka at qq.com>
Date: Fri, 12 Sep 2025 12:52:27 +0800
Subject: [PATCH] [DWARFLinkerParallel] Add missing version string in producer
---
llvm/lib/DWARFLinker/Parallel/DWARFLinkerTypeUnit.cpp | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/llvm/lib/DWARFLinker/Parallel/DWARFLinkerTypeUnit.cpp b/llvm/lib/DWARFLinker/Parallel/DWARFLinkerTypeUnit.cpp
index 07bbde70c77c4..534689e56851d 100644
--- a/llvm/lib/DWARFLinker/Parallel/DWARFLinkerTypeUnit.cpp
+++ b/llvm/lib/DWARFLinker/Parallel/DWARFLinkerTypeUnit.cpp
@@ -58,12 +58,11 @@ void TypeUnit::createDIETree(BumpPtrAllocator &Allocator) {
uint64_t OutOffset = getDebugInfoHeaderSize();
UnitDIE->setOffset(OutOffset);
- SmallString<200> ProducerString;
- ProducerString += "llvm DWARFLinkerParallel library version ";
+ const char *ProducerString =
+ "llvm DWARFLinkerParallel library version " LLVM_VERSION_STRING;
DebugInfoSection.notePatchWithOffsetUpdate(
- DebugStrPatch{
- {OutOffset},
- GlobalData.getStringPool().insert(ProducerString.str()).first},
+ DebugStrPatch{{OutOffset},
+ GlobalData.getStringPool().insert(ProducerString).first},
PatchesOffsets);
OutOffset += DIETreeGenerator
.addStringPlaceholderAttribute(dwarf::DW_AT_producer,
More information about the llvm-commits
mailing list