LLVM 19.0.0git
SPIRVCommandLine.h
Go to the documentation of this file.
1//===--- SPIRVCommandLine.h ---- Command Line Options -----------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file contains classes and functions needed for processing, parsing, and
10// using CLI options for the SPIR-V backend.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_LIB_TARGET_SPIRV_COMMANDLINE_H
15#define LLVM_LIB_TARGET_SPIRV_COMMANDLINE_H
16
19#include <set>
20
21namespace llvm {
22
23/// Command line parser for toggling SPIR-V extensions.
25 : public cl::parser<std::set<SPIRV::Extension::Extension>> {
26public:
28 : cl::parser<std::set<SPIRV::Extension::Extension>>(O) {}
29
30 /// Parses SPIR-V extension name from CLI arguments.
31 ///
32 /// \return Returns true on error.
33 bool parse(cl::Option &O, StringRef ArgName, StringRef ArgValue,
34 std::set<SPIRV::Extension::Extension> &Vals);
35};
36
37} // namespace llvm
38#endif // LLVM_LIB_TARGET_SPIRV_COMMANDLINE_H
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
Implement std::hash so that hash_code can be used in STL containers.
Definition: BitVector.h:858
Command line parser for toggling SPIR-V extensions.
SPIRVExtensionsParser(cl::Option &O)
Definition: regcomp.c:192