LLVM 22.0.0git
OptSpecifier.h
Go to the documentation of this file.
1//===- OptSpecifier.h - Option Specifiers -----------------------*- 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#ifndef LLVM_OPTION_OPTSPECIFIER_H
10#define LLVM_OPTION_OPTSPECIFIER_H
11
13
14namespace llvm {
15namespace opt {
16
17class Option;
18
19/// OptSpecifier - Wrapper class for abstracting references to option IDs.
21 unsigned ID = 0;
22
23public:
24 OptSpecifier() = default;
25 explicit OptSpecifier(bool) = delete;
26 /*implicit*/ OptSpecifier(unsigned ID) : ID(ID) {}
27 /*implicit*/ LLVM_ABI OptSpecifier(const Option *Opt);
28
29 bool isValid() const { return ID != 0; }
30
31 unsigned getID() const { return ID; }
32
33 bool operator==(OptSpecifier Opt) const { return ID == Opt.getID(); }
34 bool operator!=(OptSpecifier Opt) const { return !(*this == Opt); }
35};
36
37} // end namespace opt
38} // end namespace llvm
39
40#endif // LLVM_OPTION_OPTSPECIFIER_H
arm prera ldst opt
#define LLVM_ABI
Definition: Compiler.h:213
OptSpecifier - Wrapper class for abstracting references to option IDs.
Definition: OptSpecifier.h:20
bool operator==(OptSpecifier Opt) const
Definition: OptSpecifier.h:33
bool operator!=(OptSpecifier Opt) const
Definition: OptSpecifier.h:34
OptSpecifier(unsigned ID)
Definition: OptSpecifier.h:26
OptSpecifier(bool)=delete
unsigned getID() const
Definition: OptSpecifier.h:31
Option - Abstract representation for a single form of driver argument.
Definition: Option.h:55
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18