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

Amy Huang via All-commits all-commits at lists.llvm.org
Tue Aug 11 14:51:51 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 54b6cca0f28484395ae43bcda4c9f929bc51cfe3
      https://github.com/llvm/llvm-project/commit/54b6cca0f28484395ae43bcda4c9f929bc51cfe3
  Author: Amy Huang <akhuang at google.com>
  Date:   2020-08-11 (Tue, 11 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




More information about the All-commits mailing list