summaryrefslogtreecommitdiffstats
path: root/include/clang/Driver/OptSpecifier.h
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2009-11-19 09:00:00 +0000
committerrdivacky <rdivacky@FreeBSD.org>2009-11-19 09:00:00 +0000
commit6df2408694f81a03eb8b0e3b013272042233c061 (patch)
treec7f5a7b6fd212399d821b83b22c1e6a42e8c4a0d /include/clang/Driver/OptSpecifier.h
parent741c13ecc20fb35b836ad690aeecd402f002d654 (diff)
downloadFreeBSD-src-6df2408694f81a03eb8b0e3b013272042233c061.zip
FreeBSD-src-6df2408694f81a03eb8b0e3b013272042233c061.tar.gz
Update clang to r89337.
Diffstat (limited to 'include/clang/Driver/OptSpecifier.h')
-rw-r--r--include/clang/Driver/OptSpecifier.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/include/clang/Driver/OptSpecifier.h b/include/clang/Driver/OptSpecifier.h
new file mode 100644
index 0000000..c38b36c
--- /dev/null
+++ b/include/clang/Driver/OptSpecifier.h
@@ -0,0 +1,36 @@
+//===--- OptSpecifier.h - Option Specifiers ---------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef CLANG_DRIVER_OPTSPECIFIER_H
+#define CLANG_DRIVER_OPTSPECIFIER_H
+
+namespace clang {
+namespace driver {
+ class Option;
+
+ /// OptSpecifier - Wrapper class for abstracting references to option IDs.
+ class OptSpecifier {
+ unsigned ID;
+
+ private:
+ explicit OptSpecifier(bool); // DO NOT IMPLEMENT
+
+ public:
+ /*implicit*/ OptSpecifier(unsigned _ID) : ID(_ID) {}
+ /*implicit*/ OptSpecifier(const Option *Opt);
+
+ unsigned getID() const { return ID; }
+
+ bool operator==(OptSpecifier Opt) const { return ID == Opt.getID(); }
+ bool operator!=(OptSpecifier Opt) const { return !(*this == Opt); }
+ };
+}
+}
+
+#endif
OpenPOWER on IntegriCloud