[PATCH] D68117: [DWARF-5] Support for C++11 defaulted, deleted member functions.
Paul Robinson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 4 12:43:23 PDT 2019
probinson added inline comments.
================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:1618
+ return;
+ } else if (const auto Def = Method->getDefinition()) {
+ if (Def->isDefaulted()) {
----------------
LLVM style is not to use 'else' after 'return'.
================
Comment at: llvm/include/llvm/IR/DebugInfoFlags.def:91
HANDLE_DISP_FLAG((1u << 8), MainSubprogram)
+HANDLE_DISP_FLAG((1u << 9), NotDefaulted)
+HANDLE_DISP_FLAG((1u << 10), DefaultedInClass)
----------------
SouraVX wrote:
> aprantl wrote:
> > Since these are all mutually exclusive, it might make sense to do the same thing as we did for virtuality above and thus save a bit or two.
> Had this in mind when I added 4 flags but couldn't able to solve this back then so I put this.
>
> I tried refactoring this couple times based on your comments with results in failure. Virtuality and Defaulted member have same encodings "00-01-02".
> My approach was conflicting with Virtuality attributes, Since Virtuality here is already using 2 bits of LSB.
> Could you please suggest or hints to tackle this?
Wouldn't the values for those constants be (1u << 9), (2u << 9), (3u << 9), (4u << 9) ? Look at how the Single/Multiple/VirtualInheritance flags work, earlier in this file.
And if we said a zero value meant NotDefaulted (which is what zero has meant up to now, so might as well keep that), then you need only 3 new flag values which will fit in 2 bits.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68117/new/
https://reviews.llvm.org/D68117
More information about the cfe-commits
mailing list