This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][NFC] Use OMPInteropInfo in the OMPDeclareVariantAttr attribute
ClosedPublic

Authored by mikerice on Aug 19 2022, 5:36 PM.

Details

Summary

In preparation for allowing the prefer_type list in the append_args clause,
use the OMPInteropInfo in the attribute for 'declare variant'.

This requires adding a new Argument kind to the attribute code. This change
adds a specific attribute to pass an array of OMPInteropInfo. It implements
new tablegen needed to handle the interop-type part of the structure. When
prefer_type is added, more work will be needed to dump, instantiate, and
serialize the PreferTypes field in OMPInteropInfo.

Diff Detail

Event Timeline

mikerice created this revision.Aug 19 2022, 5:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 19 2022, 5:36 PM
mikerice requested review of this revision.Aug 19 2022, 5:36 PM
ABataev added inline comments.Aug 20 2022, 7:52 AM
clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
525

Use emplace_back

mikerice updated this revision to Diff 454520.Aug 22 2022, 8:52 AM

Add a default constructor and use emplace_back in a couple places.

This revision is now accepted and ready to land.Aug 22 2022, 9:04 AM
aaron.ballman accepted this revision.Aug 22 2022, 9:32 AM

LGTM aside from a minor suggested interface change.

clang/include/clang/Basic/Attr.td
3837

Does this interface also work for you?

This revision was automatically updated to reflect the committed changes.
mikerice marked an inline comment as done.
Herald added a project: Restricted Project. · View Herald TranscriptAug 22 2022, 10:49 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript