This is an archive of the discontinued LLVM Phabricator instance.

Define __IMAGE_SUPPORT__ macro for SPIR
ClosedPublic

Authored by dmitry on Nov 20 2017, 7:17 AM.

Details

Diff Detail

Repository
rL LLVM

Event Timeline

dmitry created this revision.Nov 20 2017, 7:17 AM
dmitry edited the summary of this revision. (Show Details)Nov 20 2017, 7:22 AM
Anastasia added inline comments.Nov 20 2017, 7:41 AM
lib/Frontend/InitPreprocessor.cpp
1035 ↗(On Diff #123591)

I am not sure if we should be checking for OpenCL too depending how SPIR target is used with non-OpenCL sources. Sam might be able to comment.

Ping. @yaxunl, could you kindly review the patch? It's just a few lines of code.

yaxunl added inline comments.Nov 24 2017, 5:43 AM
lib/Frontend/InitPreprocessor.cpp
1035 ↗(On Diff #123591)

Since this is part of OpenCL spec, I think better limit it to OpenCL.

dmitry updated this revision to Diff 124364.Nov 27 2017, 5:59 AM

Guarded #define IMAGE_SUPPORT 1 with OpenCL

@yaxunl, I moved IMAGE_SUPPORT macro definition so that now it's guarded by LangOpts.OpenCL
Could you kindly take a second look to the review. Thanks.

yaxunl accepted this revision.Nov 29 2017, 11:44 AM

LGTM. Thanks!

This revision is now accepted and ready to land.Nov 29 2017, 11:44 AM
This revision was automatically updated to reflect the committed changes.