joerg added inline comments.
================ Comment at: lib/Basic/Targets.cpp:7650 + DefineStd(Builder, "nios2", Opts); + DefineStd(Builder, "NIOS2", Opts); + ---------------- belickim wrote: > joerg wrote: > > belickim wrote: > > > joerg wrote: > > > > DefineStd tends to give a lot of namespace pollution, is that > > > > intentional here? > > > Yes, the usage is intentional: definitions of all four: `__nios2`, > > > `__nios2__`, `__NIOS2` and `__NIOS2__` are part of Nios2 ABI (page 23, > > > https://www.altera.com/content/dam/altera-www/global/en_US/pdfs/literature/hb/nios2/n2cpu_nii51016.pdf). > > The problem is that DefineStd will also define the no-underscore version in > > GNU mode. > Oh, that definitely is not needed in our case. I will remove the usage of > `DefineStd()`. Looking at implementations of other `TargetInfo`s, I assume > that preferred solution would be to manually call `Builder.defineMacro()` for > all four defintions. Yes, that's fine/ https://reviews.llvm.org/D33356 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits