[PATCH] D20444: [OpenCL] Include opencl-c.h by default as a module

Anastasia Stulova via cfe-commits cfe-commits at lists.llvm.org
Wed May 25 08:47:14 PDT 2016


Anastasia added inline comments.

================
Comment at: include/clang/Basic/LangOptions.def:219
@@ -218,3 +218,3 @@
 ENUM_LANGOPT(AddressSpaceMapMangling , AddrSpaceMapMangling, 2, ASMM_Target, "OpenCL address space map mangling mode")
-
+LANGOPT(NoDefaultHeader, 1, 0, "Do not include default header file for OpenCL")
 BENIGN_LANGOPT(DelayedTemplateParsing , 1, 0, "delayed template parsing")
----------------
I was just thinking whether it would make sense to do the opposite i.e. to have a flag that would enable loading of the header (which won't be loaded by default). This might be better for compatibility. 

The issues might arise because the users already have their own BIF declaration mechanisms in place in Clang or because of the parsing speed increase. The latter can affect testing significantly. Does the module mechanism use PCH?

Have you compared the speed with and without including the OpenCL header? Is there any difference?


http://reviews.llvm.org/D20444





More information about the cfe-commits mailing list