[PATCH] Driver: add target definition for Windows on ARM

Renato Golin renato.golin at linaro.org
Wed Apr 2 14:09:30 PDT 2014



================
Comment at: lib/Basic/Targets.cpp:3719
@@ +3718,3 @@
+      T.getArchName().substr(Offset).getAsInteger(10, Version);
+      assert(Version >= 7);
+      return true;
----------------
Reid Kleckner wrote:
> Renato Golin wrote:
> > Saleem Abdulrasool wrote:
> > > Renato Golin wrote:
> > > > Isn't an assert a bit too drastic? Maybe we should catch this somewhere else with an error message?
> > > It is drastic, but AFAIK, WoA requires ARMv7 or greater.  Reporting an error message is certainly much nicer.
> > Right. This being Clang, it should be relatively simple to bail on error (check the driver for details).
> I see two easy ways to diagnose this:
> 1. Diagnose in the Driver or Frontend that the triple armvN-windows is unsupported
> 2. Call CodeGenModule::ErrorUnsupported() during IRGen when attempting to produce a libcall.  We don't generally like to emit diagnostics from IRGen, but for this kind of fringe thing it can be OK.
I'm not sure we do any kind of validation at the triple level, so I think it should be fine to just call unsupported on the code gen level.


http://llvm-reviews.chandlerc.com/D3241



More information about the llvm-commits mailing list