[PATCH] D69215: [DWARF5] Added support for deleted C++ special member functions.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 21 09:58:16 PDT 2019


aprantl added inline comments.


================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:1610
 
+  // DWARF5 we're checking deleted C++ special member functions
+  // [Ctors,Dtors, Copy/Move]
----------------
We spell this a `DWARF v5` throughout the sources, makes it easier to grep for.

Then again, we probably shouldn't be mentioning DWARF here at all.


================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:1612
+  // [Ctors,Dtors, Copy/Move]
+  // TODO: Add support for Defaulted member functions
+  auto checkAttrDeleted = [&SPFlags](const auto *Method) {
----------------
We usually don't commit TODO notes into the source code.


================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:1621
+
+  if (const auto *DXXC = dyn_cast<CXXDestructorDecl>(Method))
+    checkAttrDeleted(DXXC);
----------------
this should be `else if`, or, perhaps slightly better `switch(Method.getKind())`.


================
Comment at: llvm/include/llvm/IR/DebugInfoFlags.def:92
+// May use this Flag in future, when adding support
+// for deleted functions
+HANDLE_DISP_FLAG((1u << 9), Deleted)
----------------
?


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

https://reviews.llvm.org/D69215





More information about the llvm-commits mailing list