[PATCH] D78720: [globalopt] Don't emit DWARF fragments for members of a struct that cover the whole struct

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 27 11:49:28 PDT 2020


nickdesaulniers added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/GlobalOpt.cpp:479
+    // Don't emit a fragment when it would cover the whole variable
+    if (!VarSize || FragmentSizeInBits < *VarSize) {
       if (auto E = DIExpression::createFragmentExpression(
----------------
Should this be:
`if (VarSize && FragmentSizeInBits < *VarSize)`?

If we don't have a size, then `!VarSize` is `true`, and we proceed to emit a fragment?  Seems in juxtaposition with the comment?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78720/new/

https://reviews.llvm.org/D78720





More information about the llvm-commits mailing list