[lld] [LLD] Tombstone LocalTU entry in .debug_names (PR #70701)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 6 14:37:47 PST 2023


================
@@ -886,16 +885,25 @@ void InputSection::relocateNonAlloc(uint8_t *buf, ArrayRef<RelTy> rels) {
   const unsigned bits = sizeof(typename ELFT::uint) * 8;
   const TargetInfo &target = *elf::target;
   const bool isDebug = isDebugSection(*this);
-  const bool isDebugLocOrRanges =
-      isDebug && (name == ".debug_loc" || name == ".debug_ranges");
   const bool isDebugLine = isDebug && name == ".debug_line";
-  std::optional<uint64_t> tombstone;
+  std::optional<uint64_t> tombstone = std::nullopt;
----------------
MaskRay wrote:

An optional defaults to std::nullopt. Just default initialize it.

https://github.com/llvm/llvm-project/pull/70701


More information about the llvm-commits mailing list