[all-commits] [llvm/llvm-project] 515973: [CodeView] Emit static data members as S_CONSTANTs.

Amy Huang via All-commits all-commits at lists.llvm.org
Mon Oct 26 15:31:00 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 515973222ed29abe49f241e89edb6854f44162d4
      https://github.com/llvm/llvm-project/commit/515973222ed29abe49f241e89edb6854f44162d4
  Author: Amy Huang <akhuang at google.com>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M clang/lib/CodeGen/CGDebugInfo.cpp
    M clang/test/CodeGenCXX/debug-info-static-member.cpp
    M llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
    M llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
    M llvm/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp
    M llvm/test/DebugInfo/COFF/global-constants.ll
    M llvm/test/DebugInfo/COFF/types-array-unsized.ll

  Log Message:
  -----------
  [CodeView] Emit static data members as S_CONSTANTs.

We used to only emit static const data members in CodeView as
S_CONSTANTS when they were used; this patch makes it so they are always emitted.

I changed CodeViewDebug.cpp to find the static const members from the
class debug info instead of creating DIGlobalVariables in the IR
whenever a static const data member is used.

Bug: https://bugs.llvm.org/show_bug.cgi?id=47580

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




More information about the All-commits mailing list