Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.0 KiB

  1. //===--- OptSpecifier.h - Option Specifiers ---------------------*- C++ -*-===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is distributed under the University of Illinois Open Source
  6. // License. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. #ifndef LLVM_OPTION_OPTSPECIFIER_H
  10. #define LLVM_OPTION_OPTSPECIFIER_H
  11. namespace llvm {
  12. namespace opt {
  13. class Option;
  14. /// OptSpecifier - Wrapper class for abstracting references to option IDs.
  15. class OptSpecifier {
  16. unsigned ID;
  17. private:
  18. explicit OptSpecifier(bool) LLVM_DELETED_FUNCTION;
  19. public:
  20. OptSpecifier() : ID(0) {}
  21. /*implicit*/ OptSpecifier(unsigned _ID) : ID(_ID) {}
  22. /*implicit*/ OptSpecifier(const Option *Opt);
  23. bool isValid() const { return ID != 0; }
  24. unsigned getID() const { return ID; }
  25. bool operator==(OptSpecifier Opt) const { return ID == Opt.getID(); }
  26. bool operator!=(OptSpecifier Opt) const { return !(*this == Opt); }
  27. };
  28. }
  29. }
  30. #endif