[PATCH] D51441: Add predefined macro __gnu_linux__ for proper aux-triple

2018-08-30 Thread Artem Belevich via Phabricator via cfe-commits
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

[PATCH] D51441: Add predefined macro __gnu_linux__ for proper aux-triple

2018-08-30 Thread Artem Belevich via Phabricator via 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

[PATCH] D51441: Add predefined macro __gnu_linux__ for proper aux-triple

2018-08-29 Thread Yaxun Liu via Phabricator via 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

[PATCH] D51441: Add predefined macro __gnu_linux__ for proper aux-triple

2018-08-29 Thread Yaxun Liu via Phabricator via cfe-commits
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__`? >

[PATCH] D51441: Add predefined macro __gnu_linux__ for proper aux-triple

2018-08-29 Thread Yaxun Liu via Phabricator via cfe-commits
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

[PATCH] D51441: Add predefined macro __gnu_linux__ for proper aux-triple

2018-08-29 Thread Artem Belevich via Phabricator via cfe-commits
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 __

[PATCH] D51441: Add predefined macro __gnu_linux__ for proper aux-triple

2018-08-29 Thread Yaxun Liu via Phabricator via cfe-commits
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 ===

[PATCH] D51441: Add predefined macro __gnu_linux__ for proper aux-triple

2018-08-29 Thread Artem Belevich via Phabricator via cfe-commits
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

[PATCH] D51441: Add predefined macro __gnu_linux__ for proper aux-triple

2018-08-29 Thread Yaxun Liu via Phabricator via cfe-commits
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