[PATCH] D54597: [DebugInfo] DISubprogram flags get their own flags word. NFC

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 15 13:10:07 PST 2018


dblaikie added inline comments.


================
Comment at: llvm/include/llvm/IR/DebugInfoMetadata.h:1622
+#define DISP_FLAG_LARGEST_NEEDED
+#include "llvm/IR/DebugInfoSPFlags.def"
+    SPFlagVirtuality = SPFlagNonvirtual | SPFlagVirtual | SPFlagPureVirtual,
----------------
aprantl wrote:
> We usually also #undef the macro after we're done, in case we need to include the def file again.
Undefing inside the def file's probably more reliable?


================
Comment at: llvm/include/llvm/IR/DebugInfoSPFlags.def:19
+
+HANDLE_DISP_FLAG(0, Zero) // Use it as zero value.
+                          // For example: void foo(DISPFlags Flags = SPFlagZero).
----------------
aprantl wrote:
> That C++-style comment on the same line as the macro looks dangerous :-)
Any particular danger you've got in mind that wouldn't come up with a comment on a separate line?


Repository:
  rL LLVM

https://reviews.llvm.org/D54597





More information about the llvm-commits mailing list