svenvh created this revision. svenvh added reviewers: Anastasia, azabaznov. svenvh added a project: clang. Herald added a subscriber: yaxunl. svenvh requested review of this revision. Herald added a subscriber: cfe-commits.
The suggestion in D92277 <https://reviews.llvm.org/D92277> was to move `OpenCLOptions` into `LanguageOptions`, but this is not viable. Sema's `LangOpts` is immutable, and embedding `OpenCLOptions` into `LangOpts` would make `OpenCLOptions` immutable too. This is incompatible with handling of pragmas that alter the `OpenCLOptions` during parsing/sema. Perhaps there might be another solution, so putting this up for discussion with @Anastasia and @azabaznov to start with. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D96588 Files: clang/lib/Basic/Targets.cpp Index: clang/lib/Basic/Targets.cpp =================================================================== --- clang/lib/Basic/Targets.cpp +++ clang/lib/Basic/Targets.cpp @@ -720,9 +720,6 @@ /// and language version void TargetInfo::getOpenCLFeatureDefines(const LangOptions &Opts, MacroBuilder &Builder) const { - // FIXME: OpenCL options which affect language semantics/syntax - // should be moved into LangOptions, thus macro definitions of - // such options is better to be done in clang::InitializePreprocessor auto defineOpenCLExtMacro = [&](llvm::StringRef Name, unsigned AvailVer, unsigned CoreVersions, unsigned OptionalVersions) {
Index: clang/lib/Basic/Targets.cpp =================================================================== --- clang/lib/Basic/Targets.cpp +++ clang/lib/Basic/Targets.cpp @@ -720,9 +720,6 @@ /// and language version void TargetInfo::getOpenCLFeatureDefines(const LangOptions &Opts, MacroBuilder &Builder) const { - // FIXME: OpenCL options which affect language semantics/syntax - // should be moved into LangOptions, thus macro definitions of - // such options is better to be done in clang::InitializePreprocessor auto defineOpenCLExtMacro = [&](llvm::StringRef Name, unsigned AvailVer, unsigned CoreVersions, unsigned OptionalVersions) {
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits