[all-commits] [llvm/llvm-project] f9bc1b: [OpenCL] Defines helper function for kernel langua...

Justas Janickas via All-commits all-commits at lists.llvm.org
Tue Aug 31 02:09:16 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f9bc1b3bee557de5735c745f9558c47ca568bd96
      https://github.com/llvm/llvm-project/commit/f9bc1b3bee557de5735c745f9558c47ca568bd96
  Author: Justas Janickas <Justas.Janickas at arm.com>
  Date:   2021-08-31 (Tue, 31 Aug 2021)

  Changed paths:
    M clang/include/clang/Basic/LangOptions.h
    M clang/include/clang/Basic/OpenCLOptions.h
    M clang/lib/Basic/Builtins.cpp
    M clang/lib/Basic/LangOptions.cpp
    M clang/lib/Basic/Targets.cpp
    M clang/lib/CodeGen/CodeGenModule.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/lib/Parse/ParseDecl.cpp
    M clang/lib/Sema/DeclSpec.cpp
    M clang/lib/Sema/Sema.cpp
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaDeclAttr.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/lib/Sema/SemaType.cpp

  Log Message:
  -----------
  [OpenCL] Defines helper function for kernel language compatible OpenCL version

This change defines a helper function getOpenCLCompatibleVersion()
inside LangOptions class. The function contains mapping between
C++ for OpenCL versions and their corresponding compatible OpenCL
versions. This mapping function should be updated each time a new
C++ for OpenCL language version is introduced. The helper function
is expected to simplify conditions on OpenCL C and C++ for OpenCL
versions inside compiler code.

Code refactoring performed.

Differential Revision: https://reviews.llvm.org/D108693




More information about the All-commits mailing list