This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Add runtime interface for OpenMP 5.1 error directive
ClosedPublic

Authored by hbae on Mar 11 2021, 12:39 PM.

Details

Summary

The proposed new interface is for supporting at(execution) clause in the error directive.

Diff Detail

Event Timeline

hbae created this revision.Mar 11 2021, 12:39 PM
hbae requested review of this revision.Mar 11 2021, 12:39 PM

Shouldn't we add a ident_t for location support?

hbae added a comment.Mar 15 2021, 8:13 AM

It is unclear what we should do with ident_t at the moment.
Is it going to be useful if we include the location info in the warning/error message?

It is unclear what we should do with ident_t at the moment.
Is it going to be useful if we include the location info in the warning/error message?

I would argue immensely, it would also match our compile time error reporting which has locations.
There seems to be little cost in accepting an ident_t anyway.

hbae updated this revision to Diff 330695.Mar 15 2021, 9:37 AM

Added ident_t * parameter.

Do we want to add a test for this?

openmp/runtime/src/i18n/en_US.txt
459

I would go with:
"%2%s: Encountered user-directed error: %1$s"
as we do it above like this as well.

openmp/runtime/src/kmp_csupport.cpp
4380

Don't we have a method to "pretty print" the psource such that it reads: "file:line:column"
For unknown, maybe just "unknown".

hbae updated this revision to Diff 330856.Mar 15 2021, 5:58 PM

Applied suggested changes and added a test.

jdoerfert accepted this revision.Mar 15 2021, 7:34 PM

LG, thanks for all the updates.

This revision is now accepted and ready to land.Mar 15 2021, 7:34 PM
This revision was landed with ongoing or failed builds.Mar 16 2021, 6:56 AM
This revision was automatically updated to reflect the committed changes.