[all-commits] [llvm/llvm-project] 9b0e9e: [globalopt] Change so that emitting fragments does...

Amy Huang via All-commits all-commits at lists.llvm.org
Wed Aug 19 09:40:06 PDT 2020


  Branch: refs/heads/release/11.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 9b0e9ed0ac5f9047538106c55c84082f12a1945c
      https://github.com/llvm/llvm-project/commit/9b0e9ed0ac5f9047538106c55c84082f12a1945c
  Author: Amy Huang <akhuang at google.com>
  Date:   2020-08-19 (Wed, 19 Aug 2020)

  Changed paths:
    M llvm/lib/Transforms/IPO/GlobalOpt.cpp
    A llvm/test/DebugInfo/Generic/global-sra-struct-fwd-decl.ll

  Log Message:
  -----------
  [globalopt] Change so that emitting fragments doesn't use the type size of DIVariables

When turning on -debug-info-kind=constructor we ran into a "fragment covers
entire variable" error during thinlto. The fragment is currently always
emitted if there is no type size, but sometimes the variable has a
forward declared struct type which doesn't have a size.

This changes the code to get the type size from the GlobalVariable instead.

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

(cherry picked from commit 54b6cca0f28484395ae43bcda4c9f929bc51cfe3)




More information about the All-commits mailing list