[all-commits] [llvm/llvm-project] 468098: [dwarf] Emit a DIGlobalVariable for constant strings.

Mitch Phillips via All-commits all-commits at lists.llvm.org
Mon May 16 16:52:46 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4680982b36a84770a1600fc438be8ec090671724
      https://github.com/llvm/llvm-project/commit/4680982b36a84770a1600fc438be8ec090671724
  Author: Mitch Phillips <31459023+hctim at users.noreply.github.com>
  Date:   2022-05-16 (Mon, 16 May 2022)

  Changed paths:
    M clang/lib/CodeGen/CGDebugInfo.cpp
    M clang/lib/CodeGen/CGDebugInfo.h
    M clang/lib/CodeGen/CodeGenModule.cpp
    A clang/test/CodeGen/debug-info-variables.c
    M clang/test/VFS/external-names.c
    M llvm/lib/AsmParser/LLParser.cpp
    M llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
    M llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
    R llvm/test/Assembler/invalid-diglobalvariable-missing-name.ll
    A llvm/test/DebugInfo/COFF/global-no-strings.ll

  Log Message:
  -----------
  [dwarf] Emit a DIGlobalVariable for constant strings.

An upcoming patch will extend llvm-symbolizer to provide the source line
information for global variables. The goal is to move AddressSanitizer
off of internal debug info for symbolization onto the DWARF standard
(and doing a clean-up in the process). Currently, ASan reports the line
information for constant strings if a memory safety bug happens around
them. We want to keep this behaviour, so we need to emit debuginfo for
these variables as well.

Reviewed By: dblaikie, rnk, aprantl

Differential Revision: https://reviews.llvm.org/D123534




More information about the All-commits mailing list