[Mesa-dev] [PATCH] Rename the DEBUG macro to MESA_DEBUG

Matt Turner mattst88 at gmail.com
Fri Jul 22 18:15:11 UTC 2016


On Thu, Jul 21, 2016 at 10:48 AM, Vedran Miletić <vedran at miletic.net> wrote:
> LLVM and Mesa both define the DEBUG macro in incompatible ways. As a
> general practice, we should avoid using such generic names when it is
> possible to do so.
>
> This patch renames all occurrences of the DEBUG macro to MESA_DEBUG,
> and removes workarounds previously used to enable building Mesa with
> LLVM (pop_macro() and push_macro() function calls).

I wonder if we shouldn't change

  #ifdef DEBUG

to

   #ifndef NDEBUG

to match the behavior of assert(). We already have many uses of #ifndef NDEBUG.


More information about the mesa-dev mailing list