[PATCH] D85572: [globalopt] Change so that emitting fragments doesn't use the type size of DIVariables
Amy Huang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 7 17:10:04 PDT 2020
akhuang created this revision.
akhuang added reviewers: aprantl, nickdesaulniers.
Herald added subscribers: llvm-commits, dexonsmith, hiraditya.
Herald added a project: LLVM.
akhuang requested review of this revision.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D85572
Files:
llvm/lib/Transforms/IPO/GlobalOpt.cpp
llvm/test/DebugInfo/Generic/global-sra-struct-fwd-decl.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85572.284097.patch
Type: text/x-patch
Size: 5432 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200808/0fa7abab/attachment.bin>
More information about the llvm-commits
mailing list