r238389 - [omp] Re-work Clang's handling of -fopenmp and undo r237769.

Justin Bogner mail at justinbogner.com
Thu May 28 14:21:48 PDT 2015


Chandler Carruth <chandlerc at gmail.com> writes:
> On Thu, May 28, 2015 at 12:39 AM Justin Bogner <mail at justinbogner.com> wrote:
>>> +  if (RT == OMPRT_Unknown) {
>>> +    if (A)
>>> +      TC.getDriver().Diag(diag::err_drv_unsupported_option_argument)
>>> +        << A->getOption().getName() << A->getValue();
>>> +    else
>>> +      // FIXME: We could use a nicer diagnostic here.
>>> +      TC.getDriver().Diag(diag::err_drv_unsupported_opt) << "-fopenmp";
>>
>> Is this even reachable in a meaningful way? CLANG_DEFAULT_OPENMP_RUNTIME
>> has to be something we don't understand. If we can somehow get here, the
>> error is really "You're using a version of LLVM that was configured
>> wrong, get a better one".
>
> Totally open to suggestions about how to approach this. I wasn't sure of the
> best one myself, and left a FIXME to try and find a better one. At the least,
> as you say, this isn't really reachable in any sensible setup. Ideas about how
> to actually check this?

If the cmake/autoconf has good enough sanity checks we can probably just
assert. Otherwise a diagnostic like `"Default openmp runtime unuseable:
%0" << CLANG_DEFAULT_OPENMP_RUNTIME` is probably the right choice.



More information about the cfe-commits mailing list