File indexing completed on 2026-05-10 08:44:22
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLVM_OPTION_OPTSPECIFIER_H
0010 #define LLVM_OPTION_OPTSPECIFIER_H
0011
0012 namespace llvm {
0013 namespace opt {
0014
0015 class Option;
0016
0017
0018 class OptSpecifier {
0019 unsigned ID = 0;
0020
0021 public:
0022 OptSpecifier() = default;
0023 explicit OptSpecifier(bool) = delete;
0024 OptSpecifier(unsigned ID) : ID(ID) {}
0025 OptSpecifier(const Option *Opt);
0026
0027 bool isValid() const { return ID != 0; }
0028
0029 unsigned getID() const { return ID; }
0030
0031 bool operator==(OptSpecifier Opt) const { return ID == Opt.getID(); }
0032 bool operator!=(OptSpecifier Opt) const { return !(*this == Opt); }
0033 };
0034
0035 }
0036 }
0037
0038 #endif