diff --git a/llvm/lib/Target/SPIRV/SPIRVCommandLine.cpp b/llvm/lib/Target/SPIRV/SPIRVCommandLine.cpp index 9f64eeb0088e2..e7da5504b2d58 100644 --- a/llvm/lib/Target/SPIRV/SPIRVCommandLine.cpp +++ b/llvm/lib/Target/SPIRV/SPIRVCommandLine.cpp @@ -228,7 +228,7 @@ SPIRVExtensionsParser::getValidExtensions(const Triple &TT) { SPIRV::OperandCategory::OperandCategory::ExtensionOperand, ExtensionEnum); - if (std::count(AllowedEnv.begin(), AllowedEnv.end(), CurrentEnvironment)) + if (llvm::is_contained(AllowedEnv, CurrentEnvironment)) R.insert(ExtensionEnum); }