tra added a comment.
Tests reverted in https://reviews.llvm.org/rL341118.
Repository:
rC Clang
https://reviews.llvm.org/D51441
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
tra added a comment.
Reverted in https://reviews.llvm.org/rL341115.
Repository:
rC Clang
https://reviews.llvm.org/D51441
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rC340967: Add predefined macro __gnu_linux__ for proper
aux-triple (authored by yaxunl, committed by ).
Repository:
rC Clang
https://reviews.llvm.org/D51441
Files:
lib/Frontend/InitPreprocessor.cpp
yaxunl added a comment.
In https://reviews.llvm.org/D51441#1218034, @yaxunl wrote:
> In https://reviews.llvm.org/D51441#1218010, @tra wrote:
>
> > While we're here, perhaps `Builder.defineMacro("__linux__")` should be
> > changed to `DefineStd("linux")` which defines `linux/__linux/__linux__`?
>
yaxunl added a comment.
In https://reviews.llvm.org/D51441#1218010, @tra wrote:
> While we're here, perhaps `Builder.defineMacro("__linux__")` should be
> changed to `DefineStd("linux")` which defines `linux/__linux/__linux__`?
Will do when committing. Thanks.
https://reviews.llvm.org/D51441
tra accepted this revision.
tra added a comment.
This revision is now accepted and ready to land.
While we're here, perhaps `Builder.defineMacro("__linux__")` should be changed
to `DefineStd("linux")` which defines `linux/__linux/__linux__`?
https://reviews.llvm.org/D51441
__
yaxunl updated this revision to Diff 163145.
yaxunl added a comment.
Revised by Artem's comments.
https://reviews.llvm.org/D51441
Files:
lib/Frontend/InitPreprocessor.cpp
test/Preprocessor/predefined-macros.c
Index: test/Preprocessor/predefined-macros.c
===
tra added inline comments.
Comment at: lib/Frontend/InitPreprocessor.cpp:1126
Builder.defineMacro("__linux__");
+if (AuxTriple.getEnvironment() == llvm::Triple::GNU)
+ Builder.defineMacro("__gnu_linux__");
AFAICT, we always define `__gnu_linix__` on
yaxunl created this revision.
yaxunl added a reviewer: tra.
Herald added a subscriber: krytarowski.
Clang predefine macro `__linx__` for aux-triple with Linux OS
but does not predefine macro `__gnu_linux__`. This causes
some compilation error for certain applications, e.g. Eigen.
This patch fixes