summaryrefslogtreecommitdiff
path: root/clang/test/Driver/threadsafe-statics.clcpp
AgeCommit message (Collapse)Author
2021-08-02[OpenCL] __cpp_threadsafe_static_init is by default undefined in OpenCL mode.Justas Janickas
Definition of `__cpp_threadsafe_static_init` macro is controlled by language option Opts.ThreadsafeStatics. This patch sets language option to false by default in OpenCL mode, resulting in macro `__cpp_threadsafe_static_init` being undefined. Default value can be overridden using command line option -fthreadsafe-statics. Change is supposed to address portability because not all OpenCL vendors support thread safe implementation of static initialization. Fixes llvm.org/PR48012 Differential Revision: https://reviews.llvm.org/D107163