[PATCH] D33356: [Nios2] Changes in frontend to support Nios2 LLVM target

Mateusz Belicki via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 19 07:24:49 PDT 2017


belickim added inline comments.


================
Comment at: lib/Basic/Targets.cpp:7614
+      resetDataLayout(("e-" + Layout).str());
+    }
+  }
----------------
joerg wrote:
> Can you just give the full string and avoid the runtime allocations?
Yes, I will fix this.


================
Comment at: lib/Basic/Targets.cpp:7650
+    DefineStd(Builder, "nios2", Opts);
+    DefineStd(Builder, "NIOS2", Opts);
+
----------------
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).


https://reviews.llvm.org/D33356





More information about the cfe-commits mailing list