From 2319eb65473ecdab00381d696ae2e0b4564b60a8 Mon Sep 17 00:00:00 2001 From: Sven van Haastregt Date: Fri, 27 Sep 2019 13:31:29 +0000 Subject: [PATCH] [OpenCL] Pass LangOptions as const ref llvm-svn: 373088 --- clang/include/clang/Basic/OpenCLOptions.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clang/include/clang/Basic/OpenCLOptions.h b/clang/include/clang/Basic/OpenCLOptions.h index 47310da..1566115 100644 --- a/clang/include/clang/Basic/OpenCLOptions.h +++ b/clang/include/clang/Basic/OpenCLOptions.h @@ -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(); -- 2.7.4