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