[llvm] [DebugInfo] Add support for emitting DW_AT_defaulted (PR #213187)
Michael Buch via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 13 01:17:10 PDT 2026
================
@@ -88,15 +88,16 @@ HANDLE_DISP_FLAG((1u << 5), Pure)
HANDLE_DISP_FLAG((1u << 6), Elemental)
HANDLE_DISP_FLAG((1u << 7), Recursive)
HANDLE_DISP_FLAG((1u << 8), MainSubprogram)
-// May also utilize this Flag in future, when adding support
-// for defaulted functions
HANDLE_DISP_FLAG((1u << 9), Deleted)
+HANDLE_DISP_FLAG((1u << 10), DefaultedNo)
HANDLE_DISP_FLAG((1u << 11), ObjCDirect)
+HANDLE_DISP_FLAG((1u << 12), DefaultedInClass)
+HANDLE_DISP_FLAG((1u << 13), DefaultedOutOfClass)
----------------
Michael137 wrote:
Copying @dwblaikie's comment from https://reviews.llvm.org/D153364
> Is there any particular benefit to providing this fidelity (the difference between defaulted in class and defaulted out of class)? (sorry, this might split the "motivation" design discussion between this patch and the clang frontend patch) and/or should we use an enum here (it wouldn't save us a bit, but would avoid create a representation that could have both DefaultedInClass and DefaultedOutOfClass true at the same time, which isn't necessary/useful)
Making it an enum makes sense to me. Because then we're guaranteed to not have a potential overlap of these flags (instead of having to check that in the verifier).
https://github.com/llvm/llvm-project/pull/213187
More information about the llvm-commits
mailing list