This is an archive of the discontinued LLVM Phabricator instance.

[OpenCL] Change extension handling for -fdeclare-opencl-builtins
ClosedPublic

Authored by svenvh on Jan 28 2021, 6:59 AM.

Details

Summary

Until now, the -fdeclare-opencl-builtins option behaved differently
compared to inclusion of opencl-c.h: builtins that are part of an
extension were only available if the extension was enabled using the
corresponding pragma.

Builtins that belong to an extension are guarded using a preprocessor
macro (that is named after the extension) in opencl-c.h. Align the
behaviour of -fdeclare-opencl-builtins with this.

This is inspired on the draft of https://reviews.llvm.org/D91538

Diff Detail

Event Timeline

svenvh created this revision.Jan 28 2021, 6:59 AM
svenvh requested review of this revision.Jan 28 2021, 6:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 28 2021, 6:59 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
svenvh retitled this revision from Change extension handling for -fdeclare-opencl-builtins to [OpenCL] Change extension handling for -fdeclare-opencl-builtins.
Anastasia accepted this revision.Feb 1 2021, 9:27 AM

LGTM! Thanks!

This revision is now accepted and ready to land.Feb 1 2021, 9:27 AM
This revision was landed with ongoing or failed builds.Feb 2 2021, 3:15 AM
This revision was automatically updated to reflect the committed changes.