Path: blob/main/contrib/llvm-project/llvm/lib/Target/SPIRV/SPIRVCommandLine.h
35266 views
//===--- SPIRVCommandLine.h ---- Command Line Options -----------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file contains classes and functions needed for processing, parsing, and9// using CLI options for the SPIR-V backend.10//11//===----------------------------------------------------------------------===//1213#ifndef LLVM_LIB_TARGET_SPIRV_COMMANDLINE_H14#define LLVM_LIB_TARGET_SPIRV_COMMANDLINE_H1516#include "MCTargetDesc/SPIRVBaseInfo.h"17#include "llvm/Support/CommandLine.h"18#include <set>1920namespace llvm {2122/// Command line parser for toggling SPIR-V extensions.23struct SPIRVExtensionsParser24: public cl::parser<std::set<SPIRV::Extension::Extension>> {25public:26SPIRVExtensionsParser(cl::Option &O)27: cl::parser<std::set<SPIRV::Extension::Extension>>(O) {}2829/// Parses SPIR-V extension name from CLI arguments.30///31/// \return Returns true on error.32bool parse(cl::Option &O, StringRef ArgName, StringRef ArgValue,33std::set<SPIRV::Extension::Extension> &Vals);34};3536} // namespace llvm37#endif // LLVM_LIB_TARGET_SPIRV_COMMANDLINE_H383940