[PATCH] D19940: Convert PDB error handling into using std::error_code instead of custom error codes

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Thu May 5 12:09:11 PDT 2016


majnemer added inline comments.

================
Comment at: include/llvm/DebugInfo/PDB/DIA/DIASupport.h:25-34
@@ -24,1 +24,12 @@
 
+// llvm/Support/Debug.h unconditionally #defines DEBUG as a macro.
+// DIA headers #define it if it is not already defined, so we have
+// an order of includes problem.  The real fix is to make LLVM use
+// something less generic than DEBUG, such as LLVM_DEBUG(), but it's
+// fairly prevalent.  So for now, we save the definition state and
+// restore it.
+#if defined(DEBUG)
+#define OLD_DEBUG DEBUG
+#undef DEBUG
+#endif
+
----------------
why not `push_macro` and `pop_macro` around the dia includes?


http://reviews.llvm.org/D19940





More information about the llvm-commits mailing list