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

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 15 12:38:35 PST 2018


aprantl added a comment.

This looks generally good. For the subsequent bitcode patch we need to be careful about backwards-compatibility.



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


================
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).
----------------
That C++-style comment on the same line as the macro looks dangerous :-)


Repository:
  rL LLVM

https://reviews.llvm.org/D54597





More information about the llvm-commits mailing list