]> granicus.if.org Git - clang/commitdiff
[OpenCL] Pass LangOptions as const ref
authorSven van Haastregt <sven.vanhaastregt@arm.com>
Fri, 27 Sep 2019 13:31:29 +0000 (13:31 +0000)
committerSven van Haastregt <sven.vanhaastregt@arm.com>
Fri, 27 Sep 2019 13:31:29 +0000 (13:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373088 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/OpenCLOptions.h

index 47310da1d6d95dcf8ac4765d2efb84a788a743bc..15661154eab5420ab0edb770eea3b2118de2ba81 100644 (file)
@@ -42,7 +42,7 @@ public:
 
   // Is supported as either an extension or an (optional) core feature for
   // OpenCL version \p CLVer.
-  bool isSupported(llvm::StringRef Ext, LangOptions LO) const {
+  bool isSupported(llvm::StringRef Ext, const LangOptions &LO) const {
     // In C++ mode all extensions should work at least as in v2.0.
     auto CLVer = LO.OpenCLCPlusPlus ? 200 : LO.OpenCLVersion;
     auto I = OptMap.find(Ext)->getValue();
@@ -51,7 +51,7 @@ public:
 
   // Is supported (optional) OpenCL core features for OpenCL version \p CLVer.
   // For supported extension, return false.
-  bool isSupportedCore(llvm::StringRef Ext, LangOptions LO) const {
+  bool isSupportedCore(llvm::StringRef Ext, const LangOptions &LO) const {
     // In C++ mode all extensions should work at least as in v2.0.
     auto CLVer = LO.OpenCLCPlusPlus ? 200 : LO.OpenCLVersion;
     auto I = OptMap.find(Ext)->getValue();
@@ -60,7 +60,7 @@ public:
 
   // Is supported OpenCL extension for OpenCL version \p CLVer.
   // For supported (optional) core feature, return false.
-  bool isSupportedExtension(llvm::StringRef Ext, LangOptions LO) const {
+  bool isSupportedExtension(llvm::StringRef Ext, const LangOptions &LO) const {
     // In C++ mode all extensions should work at least as in v2.0.
     auto CLVer = LO.OpenCLCPlusPlus ? 200 : LO.OpenCLVersion;
     auto I = OptMap.find(Ext)->getValue();