Issue 124957
Summary [libc][hdrgen] macro_name/macro_value duplicates defines from libc/include/llvm-libc-macros/*-macros.h
Labels libc
Assignees
Reporter nickdesaulniers
    I just noticed that our generated dlfcn.h has:
```c
#include "llvm-libc-macros/dlfcn-macros.h"
#define RTLD_LAZY
```
and my editor was warning me about `RTLD_LAZY` (and friends being redefined).  I noticed because building llvm against our headers was producing `error: expecting _expression_` in llvm/ code that used these preprocessor defines.

libc/include/dlfcn.yaml uses macro_name+macro_value to define these, but then we ALSO have them listed in libc/include/llvm-libc-macros/dlfcn-macros.h.

If we were just going to define them in one, but not the other, which would we choose?

I _think_ we should just stick with libc/include/llvm-libc-macros/dlfcn-macros.h.  I don't see currently what the point of macro_value/macro_name _is_.  We could do something fancy with generating special values at build time, but FWICT we're not doing that at all right now.

Did I miss something, or should we just drop the macro_name/macro_value feature from hdrgen and hard code these `#define`s in the corresponding libc/include/llvm-libc-macros/*-macros.h?

cc @michaelrj-google @frobtech 
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to