[llvm-dev] [RFC] Change DEBUG() macro to LLVM_DEBUG()

Chris Lattner via llvm-dev llvm-dev at lists.llvm.org
Fri Mar 23 23:50:20 PDT 2018



> On Mar 23, 2018, at 9:18 AM, Nicola Zaghen via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> Hi all,
> 
> We recently stumbled upon some issues with the DEBUG() macro being redefined in some internal libraries and some external ones, such as LLVM. After trying out a few ideas to avoid the problem we thought that the simplest solution would be to prefix all generic macro names in order to avoid clashes.
> 
> A quick search showed that Mesa had a similar issue with DEBUG being used by LLVM and had a couple of proposed patches such as https://lists.freedesktop.org/archives/mesa-dev/2016-July/124111.html and https://lists.freedesktop.org/archives/mesa-dev/2016-June/120738.html
> 
> I noticed that others have left comments in the LLVM source about the same issue, so I decided to try to replace all DEBUG() uses with LLVM_DEBUG() and remove the old macro.

+1

-Chris




More information about the llvm-dev mailing list