1 //===--- OptSpecifier.h - Option Specifiers ---------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_OPTION_OPTSPECIFIER_H
11 #define LLVM_OPTION_OPTSPECIFIER_H
17 /// OptSpecifier - Wrapper class for abstracting references to option IDs.
22 explicit OptSpecifier(bool) LLVM_DELETED_FUNCTION;
25 OptSpecifier() : ID(0) {}
26 /*implicit*/ OptSpecifier(unsigned _ID) : ID(_ID) {}
27 /*implicit*/ OptSpecifier(const Option *Opt);
29 bool isValid() const { return ID != 0; }
31 unsigned getID() const { return ID; }
33 bool operator==(OptSpecifier Opt) const { return ID == Opt.getID(); }
34 bool operator!=(OptSpecifier Opt) const { return !(*this == Opt); }