Skip to content

Commit 2319eb6

Browse files
committed
[OpenCL] Pass LangOptions as const ref
llvm-svn: 373088
1 parent 24078fe commit 2319eb6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang/include/clang/Basic/OpenCLOptions.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class OpenCLOptions {
4242

4343
// Is supported as either an extension or an (optional) core feature for
4444
// OpenCL version \p CLVer.
45-
bool isSupported(llvm::StringRef Ext, LangOptions LO) const {
45+
bool isSupported(llvm::StringRef Ext, const LangOptions &LO) const {
4646
// In C++ mode all extensions should work at least as in v2.0.
4747
auto CLVer = LO.OpenCLCPlusPlus ? 200 : LO.OpenCLVersion;
4848
auto I = OptMap.find(Ext)->getValue();
@@ -51,7 +51,7 @@ class OpenCLOptions {
5151

5252
// Is supported (optional) OpenCL core features for OpenCL version \p CLVer.
5353
// For supported extension, return false.
54-
bool isSupportedCore(llvm::StringRef Ext, LangOptions LO) const {
54+
bool isSupportedCore(llvm::StringRef Ext, const LangOptions &LO) const {
5555
// In C++ mode all extensions should work at least as in v2.0.
5656
auto CLVer = LO.OpenCLCPlusPlus ? 200 : LO.OpenCLVersion;
5757
auto I = OptMap.find(Ext)->getValue();
@@ -60,7 +60,7 @@ class OpenCLOptions {
6060

6161
// Is supported OpenCL extension for OpenCL version \p CLVer.
6262
// For supported (optional) core feature, return false.
63-
bool isSupportedExtension(llvm::StringRef Ext, LangOptions LO) const {
63+
bool isSupportedExtension(llvm::StringRef Ext, const LangOptions &LO) const {
6464
// In C++ mode all extensions should work at least as in v2.0.
6565
auto CLVer = LO.OpenCLCPlusPlus ? 200 : LO.OpenCLVersion;
6666
auto I = OptMap.find(Ext)->getValue();

0 commit comments

Comments
 (0)