[all-commits] [llvm/llvm-project] 6dbe82: [NFC][DebugInfo] Wrap DILineInfo return type with ...

Zequan Wu via All-commits all-commits at lists.llvm.org
Mon Mar 17 14:01:28 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6dbe82f061bf494bc91ed458726c8080269f64f6
      https://github.com/llvm/llvm-project/commit/6dbe82f061bf494bc91ed458726c8080269f64f6
  Author: Zequan Wu <zequanwu at google.com>
  Date:   2025-03-17 (Mon, 17 Mar 2025)

  Changed paths:
    M llvm/include/llvm/DebugInfo/BTF/BTFContext.h
    M llvm/include/llvm/DebugInfo/DIContext.h
    M llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
    M llvm/include/llvm/DebugInfo/PDB/PDBContext.h
    M llvm/lib/DebugInfo/BTF/BTFContext.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
    M llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp
    M llvm/lib/DebugInfo/PDB/PDBContext.cpp
    M llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
    M llvm/lib/ExecutionEngine/Orc/Debugging/VTuneSupportPlugin.cpp
    M llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
    M llvm/tools/llvm-objdump/MachODump.cpp
    M llvm/unittests/DebugInfo/BTF/BTFParserTest.cpp

  Log Message:
  -----------
  [NFC][DebugInfo] Wrap DILineInfo return type with std::optional to handle missing debug info. (#129792)

Currently, `DIContext::getLineInfoForAddress` and
`DIContext::getLineInfoForDataAddress` returns empty DILineInfo when the
debug info is missing for the given address. This is not differentiable
with the case when debug info is found for the given address but the
debug info is default value (filename:linenum is <invalid>:0).

This change wraps the return types of `DIContext::getLineInfoForAddress`
and `DIContext::getLineInfoForDataAddress` with `std::optional`.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list