[PATCH] D103401: [OpenCL] Add support of __opencl_c_generic_address_space feature macro

Sven van Haastregt via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 1 02:25:57 PDT 2021


svenvh added inline comments.


================
Comment at: clang/lib/Basic/TargetInfo.cpp:405
+      const auto &OpenCLFeaturesMap = getSupportedOpenCLOpts();
+      Opts.OpenCLGenericAddressSpace = hasFeatureEnabled(
+          OpenCLFeaturesMap, "__opencl_c_generic_address_space");
----------------
This means we now have two separate places that set `OpenCLGenericAddressSpace`, the other place being in `CompilerInvocation::setLangDefaults()`.  That feels like a maintenance hazard.  Do you think it makes sense to set this field in one single place instead?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103401/new/

https://reviews.llvm.org/D103401



More information about the cfe-commits mailing list