[PATCH] D77923: OpenCL: Fix some missing predefined macros

Matt Arsenault via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 10 17:15:10 PDT 2020


arsenm created this revision.
arsenm added reviewers: Anastasia, yaxunl, scott.linder.
Herald added subscribers: kerbowa, hiraditya, nhaehnle, wdng, jvesely.

Some of the device specific standard predefines were missing.

      

__IMAGE_SUPPORT__ was only hardcoded for SPIR. __OPENCL_VERSION__
wasn't defined at all, so allow targets to pick values for these.


https://reviews.llvm.org/D77923

Files:
  clang/include/clang/Basic/TargetInfo.h
  clang/lib/Basic/Targets/AMDGPU.cpp
  clang/lib/Basic/Targets/AMDGPU.h
  clang/lib/Basic/Targets/SPIR.h
  clang/lib/Frontend/InitPreprocessor.cpp
  clang/test/Preprocessor/predefined-macros.c
  llvm/include/llvm/Support/TargetParser.h
  llvm/lib/Support/TargetParser.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77923.256706.patch
Type: text/x-patch
Size: 10857 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200411/f67eef65/attachment.bin>


More information about the cfe-commits mailing list