diff options
author | Yaxun Liu <Yaxun.Liu@amd.com> | 2016-12-16 19:22:08 +0000 |
---|---|---|
committer | Yaxun Liu <Yaxun.Liu@amd.com> | 2016-12-16 19:22:08 +0000 |
commit | 2e8331cab61615d3831f4eb497a38171eaccc9e7 (patch) | |
tree | 9d77b116da67230781caacc4fd5d82c9260b17d8 /clang/lib/Frontend | |
parent | a4e7dfbc16e6e9c786f01a325a3663e8028b4cc0 (diff) | |
download | bcm5719-llvm-2e8331cab61615d3831f4eb497a38171eaccc9e7.tar.gz bcm5719-llvm-2e8331cab61615d3831f4eb497a38171eaccc9e7.zip |
[OpenCL] Allow disabling types and declarations associated with extensions
Added a map to associate types and declarations with extensions.
Refactored existing diagnostic for disabled types associated with extensions and extended it to declarations for generic situation.
Fixed some bugs for types associated with extensions.
Allow users to use pragma to declare types and functions for supported extensions, e.g.
#pragma OPENCL EXTENSION the_new_extension_name : begin
// declare types and functions associated with the extension here
#pragma OPENCL EXTENSION the_new_extension_name : end
Differential Revision: https://reviews.llvm.org/D21698
llvm-svn: 289979
Diffstat (limited to 'clang/lib/Frontend')
-rw-r--r-- | clang/lib/Frontend/InitPreprocessor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index 31340e0af0d..47881b10b45 100644 --- a/clang/lib/Frontend/InitPreprocessor.cpp +++ b/clang/lib/Frontend/InitPreprocessor.cpp @@ -988,7 +988,7 @@ static void InitializePredefinedMacros(const TargetInfo &TI, // OpenCL definitions. if (LangOpts.OpenCL) { #define OPENCLEXT(Ext) \ - if (TI.getSupportedOpenCLOpts().is_##Ext##_supported( \ + if (TI.getSupportedOpenCLOpts().isSupported(#Ext, \ LangOpts.OpenCLVersion)) \ Builder.defineMacro(#Ext); #include "clang/Basic/OpenCLExtensions.def" |