[PATCH] Teach intrinsics to report their required target features

John McCall rjmccall at apple.com
Mon Jun 1 11:14:47 PDT 2015


> On Jun 1, 2015, at 7:33 AM, Eric Christopher <echristo at gmail.com> wrote:
> Actually ccing them.

We pretty strongly prefer not to diagnose semantic errors in Clang IRGen.  The rough guidance is that the only things we should be diagnosing in IRGen are missing IRGen features, and even then it’s really something we should be filtering in Sema unless that’s really prohibitive to check.

Among other things, this supports clients (like IDEs) that don’t otherwise need to perform IRGen.

That said, having a database like this in LLVM seems to be a good start.  The question is therefore just how to take advantage of that in Clang.  I assume the bulk of these builtins are directly mapped to a single corresponding LLVM intrinsic; as long as we also have a Clang-level database of that relationship, diagnosing in Sema should be simple.

John.



More information about the llvm-commits mailing list