 |
|
 |
|
| Files: |
1 |
|
Branches Taken: |
0.0% |
0 / 0 |
| Generated: |
2010-02-10 01:31 |
|
Branches Executed: |
0.0% |
0 / 0 |
| |
|
Line Coverage: |
100.0% |
4 / 4 |
| |
 |
|
 |
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 :
10 : #ifndef CLANG_DRIVER_OPTSPECIFIER_H
11 : #define CLANG_DRIVER_OPTSPECIFIER_H
12 :
13 : namespace clang {
14 : namespace driver {
15 : class Option;
16 :
17 : /// OptSpecifier - Wrapper class for abstracting references to option IDs.
18 : class OptSpecifier {
19 : unsigned ID;
20 :
21 : private:
22 : explicit OptSpecifier(bool); // DO NOT IMPLEMENT
23 :
24 : public:
25 : OptSpecifier() : ID(0) {}
26 2642042: /*implicit*/ OptSpecifier(unsigned _ID) : ID(_ID) {}
27 : /*implicit*/ OptSpecifier(const Option *Opt);
28 :
29 652878: bool isValid() const { return ID != 0; }
30 :
31 4568829: unsigned getID() const { return ID; }
32 :
33 2621670: bool operator==(OptSpecifier Opt) const { return ID == Opt.getID(); }
34 : bool operator!=(OptSpecifier Opt) const { return !(*this == Opt); }
35 : };
36 : }
37 : }
38 :
39 : #endif
Generated: 2010-02-10 01:31 by zcov