summaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2009-11-19 09:00:00 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2009-11-19 09:00:00 +0000
commitf5bd02d290ff15268853e0456c130a1afa15e907 (patch)
treec7f5a7b6fd212399d821b83b22c1e6a42e8c4a0d /include/clang
parentb3d5a323a5ca92ea73443499cee2f15db1ff0fb3 (diff)
Notes
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/AST/CFG.h408
-rw-r--r--include/clang/AST/DeclObjC.h2
-rw-r--r--include/clang/Analysis/PathSensitive/Checkers/AttrNonNullChecker.h28
-rw-r--r--include/clang/Analysis/PathSensitive/Checkers/BadCallChecker.h30
-rw-r--r--include/clang/Analysis/PathSensitive/Checkers/DivZeroChecker.h28
-rw-r--r--include/clang/Analysis/PathSensitive/Checkers/UndefinedArgChecker.h34
-rw-r--r--include/clang/Analysis/PathSensitive/Checkers/VLASizeChecker.h39
-rw-r--r--include/clang/Analysis/Visitors/CFGVarDeclVisitor.h63
-rw-r--r--include/clang/Basic/Diagnostic.h4
-rw-r--r--include/clang/Basic/DiagnosticParseKinds.td4
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td4
-rw-r--r--include/clang/CMakeLists.txt1
-rw-r--r--include/clang/Driver/ArgList.h50
-rw-r--r--include/clang/Driver/CC1Options.h34
-rw-r--r--include/clang/Driver/CC1Options.td26
-rw-r--r--include/clang/Driver/CMakeLists.txt11
-rw-r--r--include/clang/Driver/Makefile16
-rw-r--r--include/clang/Driver/OptParser.td116
-rw-r--r--include/clang/Driver/OptSpecifier.h36
-rw-r--r--include/clang/Driver/OptTable.h163
-rw-r--r--include/clang/Driver/Option.h39
-rw-r--r--include/clang/Driver/Options.def661
-rw-r--r--include/clang/Driver/Options.h68
-rw-r--r--include/clang/Driver/Options.td607
-rw-r--r--include/clang/Frontend/CompileOptions.h77
-rw-r--r--include/clang/Frontend/HeaderSearchOptions.h4
-rw-r--r--include/clang/Frontend/InitHeaderSearch.h98
-rw-r--r--include/clang/Frontend/InitPreprocessor.h79
-rw-r--r--include/clang/Frontend/ManagerRegistry.h53
-rw-r--r--include/clang/Makefile2
-rw-r--r--include/clang/Parse/Action.h113
-rw-r--r--include/clang/Parse/Parser.h3
-rw-r--r--include/clang/Sema/CodeCompleteConsumer.h53
33 files changed, 1230 insertions, 1724 deletions
diff --git a/include/clang/AST/CFG.h b/include/clang/AST/CFG.h
deleted file mode 100644
index e60e58e1ac237..0000000000000
--- a/include/clang/AST/CFG.h
+++ /dev/null
@@ -1,408 +0,0 @@
-//===--- CFG.h - Classes for representing and building CFGs------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines the CFG and CFGBuilder classes for representing and
-// building Control-Flow Graphs (CFGs) from ASTs.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_CFG_H
-#define LLVM_CLANG_CFG_H
-
-#include "llvm/ADT/GraphTraits.h"
-#include "llvm/Support/Allocator.h"
-#include <list>
-#include <vector>
-#include <cassert>
-
-namespace llvm {
- class raw_ostream;
-}
-namespace clang {
- class Stmt;
- class Expr;
- class CFG;
- class PrinterHelper;
- class BlockEdge;
- class LangOptions;
-
-/// CFGBlock - Represents a single basic block in a source-level CFG.
-/// It consists of:
-///
-/// (1) A set of statements/expressions (which may contain subexpressions).
-/// (2) A "terminator" statement (not in the set of statements).
-/// (3) A list of successors and predecessors.
-///
-/// Terminator: The terminator represents the type of control-flow that occurs
-/// at the end of the basic block. The terminator is a Stmt* referring to an
-/// AST node that has control-flow: if-statements, breaks, loops, etc.
-/// If the control-flow is conditional, the condition expression will appear
-/// within the set of statements in the block (usually the last statement).
-///
-/// Predecessors: the order in the set of predecessors is arbitrary.
-///
-/// Successors: the order in the set of successors is NOT arbitrary. We
-/// currently have the following orderings based on the terminator:
-///
-/// Terminator Successor Ordering
-/// -----------------------------------------------------
-/// if Then Block; Else Block
-/// ? operator LHS expression; RHS expression
-/// &&, || expression that uses result of && or ||, RHS
-///
-class CFGBlock {
- typedef std::vector<Stmt*> StatementListTy;
- /// Stmts - The set of statements in the basic block.
- StatementListTy Stmts;
-
- /// Label - An (optional) label that prefixes the executable
- /// statements in the block. When this variable is non-NULL, it is
- /// either an instance of LabelStmt or SwitchCase.
- Stmt *Label;
-
- /// Terminator - The terminator for a basic block that
- /// indicates the type of control-flow that occurs between a block
- /// and its successors.
- Stmt *Terminator;
-
- /// LoopTarget - Some blocks are used to represent the "loop edge" to
- /// the start of a loop from within the loop body. This Stmt* will be
- /// refer to the loop statement for such blocks (and be null otherwise).
- const Stmt *LoopTarget;
-
- /// BlockID - A numerical ID assigned to a CFGBlock during construction
- /// of the CFG.
- unsigned BlockID;
-
- /// Predecessors/Successors - Keep track of the predecessor / successor
- /// CFG blocks.
- typedef std::vector<CFGBlock*> AdjacentBlocks;
- AdjacentBlocks Preds;
- AdjacentBlocks Succs;
-
-public:
- explicit CFGBlock(unsigned blockid) : Label(NULL), Terminator(NULL),
- LoopTarget(NULL), BlockID(blockid) {}
- ~CFGBlock() {};
-
- // Statement iterators
- typedef StatementListTy::iterator iterator;
- typedef StatementListTy::const_iterator const_iterator;
- typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
- typedef std::reverse_iterator<iterator> reverse_iterator;
-
- Stmt* front() const { return Stmts.front(); }
- Stmt* back() const { return Stmts.back(); }
-
- iterator begin() { return Stmts.begin(); }
- iterator end() { return Stmts.end(); }
- const_iterator begin() const { return Stmts.begin(); }
- const_iterator end() const { return Stmts.end(); }
-
- reverse_iterator rbegin() { return Stmts.rbegin(); }
- reverse_iterator rend() { return Stmts.rend(); }
- const_reverse_iterator rbegin() const { return Stmts.rbegin(); }
- const_reverse_iterator rend() const { return Stmts.rend(); }
-
- unsigned size() const { return Stmts.size(); }
- bool empty() const { return Stmts.empty(); }
-
- Stmt* operator[](size_t i) const { assert (i < size()); return Stmts[i]; }
-
- // CFG iterators
- typedef AdjacentBlocks::iterator pred_iterator;
- typedef AdjacentBlocks::const_iterator const_pred_iterator;
- typedef AdjacentBlocks::reverse_iterator pred_reverse_iterator;
- typedef AdjacentBlocks::const_reverse_iterator const_pred_reverse_iterator;
-
- typedef AdjacentBlocks::iterator succ_iterator;
- typedef AdjacentBlocks::const_iterator const_succ_iterator;
- typedef AdjacentBlocks::reverse_iterator succ_reverse_iterator;
- typedef AdjacentBlocks::const_reverse_iterator const_succ_reverse_iterator;
-
- pred_iterator pred_begin() { return Preds.begin(); }
- pred_iterator pred_end() { return Preds.end(); }
- const_pred_iterator pred_begin() const { return Preds.begin(); }
- const_pred_iterator pred_end() const { return Preds.end(); }
-
- pred_reverse_iterator pred_rbegin() { return Preds.rbegin(); }
- pred_reverse_iterator pred_rend() { return Preds.rend(); }
- const_pred_reverse_iterator pred_rbegin() const { return Preds.rbegin(); }
- const_pred_reverse_iterator pred_rend() const { return Preds.rend(); }
-
- succ_iterator succ_begin() { return Succs.begin(); }
- succ_iterator succ_end() { return Succs.end(); }
- const_succ_iterator succ_begin() const { return Succs.begin(); }
- const_succ_iterator succ_end() const { return Succs.end(); }
-
- succ_reverse_iterator succ_rbegin() { return Succs.rbegin(); }
- succ_reverse_iterator succ_rend() { return Succs.rend(); }
- const_succ_reverse_iterator succ_rbegin() const { return Succs.rbegin(); }
- const_succ_reverse_iterator succ_rend() const { return Succs.rend(); }
-
- unsigned succ_size() const { return Succs.size(); }
- bool succ_empty() const { return Succs.empty(); }
-
- unsigned pred_size() const { return Preds.size(); }
- bool pred_empty() const { return Preds.empty(); }
-
- // Manipulation of block contents
-
- void appendStmt(Stmt* Statement) { Stmts.push_back(Statement); }
- void setTerminator(Stmt* Statement) { Terminator = Statement; }
- void setLabel(Stmt* Statement) { Label = Statement; }
- void setLoopTarget(const Stmt *loopTarget) { LoopTarget = loopTarget; }
-
- Stmt* getTerminator() { return Terminator; }
- const Stmt* getTerminator() const { return Terminator; }
-
- Stmt* getTerminatorCondition();
-
- const Stmt* getTerminatorCondition() const {
- return const_cast<CFGBlock*>(this)->getTerminatorCondition();
- }
-
- const Stmt *getLoopTarget() const { return LoopTarget; }
-
- bool hasBinaryBranchTerminator() const;
-
- Stmt* getLabel() { return Label; }
- const Stmt* getLabel() const { return Label; }
-
- void reverseStmts();
-
- void addSuccessor(CFGBlock* Block) {
- Block->Preds.push_back(this);
- Succs.push_back(Block);
- }
-
- unsigned getBlockID() const { return BlockID; }
-
- void dump(const CFG *cfg, const LangOptions &LO) const;
- void print(llvm::raw_ostream &OS, const CFG* cfg, const LangOptions &LO) const;
- void printTerminator(llvm::raw_ostream &OS, const LangOptions &LO) const;
-};
-
-
-/// CFG - Represents a source-level, intra-procedural CFG that represents the
-/// control-flow of a Stmt. The Stmt can represent an entire function body,
-/// or a single expression. A CFG will always contain one empty block that
-/// represents the Exit point of the CFG. A CFG will also contain a designated
-/// Entry block. The CFG solely represents control-flow; it consists of
-/// CFGBlocks which are simply containers of Stmt*'s in the AST the CFG
-/// was constructed from.
-class CFG {
-public:
- //===--------------------------------------------------------------------===//
- // CFG Construction & Manipulation.
- //===--------------------------------------------------------------------===//
-
- /// buildCFG - Builds a CFG from an AST. The responsibility to free the
- /// constructed CFG belongs to the caller.
- static CFG* buildCFG(Stmt* AST);
-
- /// createBlock - Create a new block in the CFG. The CFG owns the block;
- /// the caller should not directly free it.
- CFGBlock* createBlock();
-
- /// setEntry - Set the entry block of the CFG. This is typically used
- /// only during CFG construction. Most CFG clients expect that the
- /// entry block has no predecessors and contains no statements.
- void setEntry(CFGBlock *B) { Entry = B; }
-
- /// setExit - Set the exit block of the CFG. This is typically used
- /// only during CFG construction. Most CFG clients expect that the
- /// exit block has no successors and contains no statements.
- void setIndirectGotoBlock(CFGBlock* B) { IndirectGotoBlock = B; }
-
- //===--------------------------------------------------------------------===//
- // Block Iterators
- //===--------------------------------------------------------------------===//
-
- typedef std::list<CFGBlock> CFGBlockListTy;
-
- typedef CFGBlockListTy::iterator iterator;
- typedef CFGBlockListTy::const_iterator const_iterator;
- typedef std::reverse_iterator<iterator> reverse_iterator;
- typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
-
- CFGBlock& front() { return Blocks.front(); }
- CFGBlock& back() { return Blocks.back(); }
-
- iterator begin() { return Blocks.begin(); }
- iterator end() { return Blocks.end(); }
- const_iterator begin() const { return Blocks.begin(); }
- const_iterator end() const { return Blocks.end(); }
-
- reverse_iterator rbegin() { return Blocks.rbegin(); }
- reverse_iterator rend() { return Blocks.rend(); }
- const_reverse_iterator rbegin() const { return Blocks.rbegin(); }
- const_reverse_iterator rend() const { return Blocks.rend(); }
-
- CFGBlock& getEntry() { return *Entry; }
- const CFGBlock& getEntry() const { return *Entry; }
- CFGBlock& getExit() { return *Exit; }
- const CFGBlock& getExit() const { return *Exit; }
-
- CFGBlock* getIndirectGotoBlock() { return IndirectGotoBlock; }
- const CFGBlock* getIndirectGotoBlock() const { return IndirectGotoBlock; }
-
- //===--------------------------------------------------------------------===//
- // Member templates useful for various batch operations over CFGs.
- //===--------------------------------------------------------------------===//
-
- template <typename CALLBACK>
- void VisitBlockStmts(CALLBACK& O) const {
- for (const_iterator I=begin(), E=end(); I != E; ++I)
- for (CFGBlock::const_iterator BI=I->begin(), BE=I->end(); BI != BE; ++BI)
- O(*BI);
- }
-
- //===--------------------------------------------------------------------===//
- // CFG Introspection.
- //===--------------------------------------------------------------------===//
-
- struct BlkExprNumTy {
- const signed Idx;
- explicit BlkExprNumTy(signed idx) : Idx(idx) {}
- explicit BlkExprNumTy() : Idx(-1) {}
- operator bool() const { return Idx >= 0; }
- operator unsigned() const { assert(Idx >=0); return (unsigned) Idx; }
- };
-
- bool isBlkExpr(const Stmt* S) { return getBlkExprNum(S); }
- BlkExprNumTy getBlkExprNum(const Stmt* S);
- unsigned getNumBlkExprs();
-
- unsigned getNumBlockIDs() const { return NumBlockIDs; }
-
- //===--------------------------------------------------------------------===//
- // CFG Debugging: Pretty-Printing and Visualization.
- //===--------------------------------------------------------------------===//
-
- void viewCFG(const LangOptions &LO) const;
- void print(llvm::raw_ostream& OS, const LangOptions &LO) const;
- void dump(const LangOptions &LO) const;
-
- //===--------------------------------------------------------------------===//
- // Internal: constructors and data.
- //===--------------------------------------------------------------------===//
-
- CFG() : Entry(NULL), Exit(NULL), IndirectGotoBlock(NULL), NumBlockIDs(0),
- BlkExprMap(NULL) {};
-
- ~CFG();
-
- llvm::BumpPtrAllocator& getAllocator() {
- return Alloc;
- }
-
-private:
- CFGBlock* Entry;
- CFGBlock* Exit;
- CFGBlock* IndirectGotoBlock; // Special block to contain collective dispatch
- // for indirect gotos
- CFGBlockListTy Blocks;
- unsigned NumBlockIDs;
-
- // BlkExprMap - An opaque pointer to prevent inclusion of DenseMap.h.
- // It represents a map from Expr* to integers to record the set of
- // block-level expressions and their "statement number" in the CFG.
- void* BlkExprMap;
-
- /// Alloc - An internal allocator.
- llvm::BumpPtrAllocator Alloc;
-};
-} // end namespace clang
-
-//===----------------------------------------------------------------------===//
-// GraphTraits specializations for CFG basic block graphs (source-level CFGs)
-//===----------------------------------------------------------------------===//
-
-namespace llvm {
-
-// Traits for: CFGBlock
-
-template <> struct GraphTraits<clang::CFGBlock* > {
- typedef clang::CFGBlock NodeType;
- typedef clang::CFGBlock::succ_iterator ChildIteratorType;
-
- static NodeType* getEntryNode(clang::CFGBlock* BB)
- { return BB; }
-
- static inline ChildIteratorType child_begin(NodeType* N)
- { return N->succ_begin(); }
-
- static inline ChildIteratorType child_end(NodeType* N)
- { return N->succ_end(); }
-};
-
-template <> struct GraphTraits<const clang::CFGBlock* > {
- typedef const clang::CFGBlock NodeType;
- typedef clang::CFGBlock::const_succ_iterator ChildIteratorType;
-
- static NodeType* getEntryNode(const clang::CFGBlock* BB)
- { return BB; }
-
- static inline ChildIteratorType child_begin(NodeType* N)
- { return N->succ_begin(); }
-
- static inline ChildIteratorType child_end(NodeType* N)
- { return N->succ_end(); }
-};
-
-template <> struct GraphTraits<Inverse<const clang::CFGBlock*> > {
- typedef const clang::CFGBlock NodeType;
- typedef clang::CFGBlock::const_pred_iterator ChildIteratorType;
-
- static NodeType *getEntryNode(Inverse<const clang::CFGBlock*> G)
- { return G.Graph; }
-
- static inline ChildIteratorType child_begin(NodeType* N)
- { return N->pred_begin(); }
-
- static inline ChildIteratorType child_end(NodeType* N)
- { return N->pred_end(); }
-};
-
-// Traits for: CFG
-
-template <> struct GraphTraits<clang::CFG* >
- : public GraphTraits<clang::CFGBlock* > {
-
- typedef clang::CFG::iterator nodes_iterator;
-
- static NodeType *getEntryNode(clang::CFG* F) { return &F->getEntry(); }
- static nodes_iterator nodes_begin(clang::CFG* F) { return F->begin(); }
- static nodes_iterator nodes_end(clang::CFG* F) { return F->end(); }
-};
-
-template <> struct GraphTraits< const clang::CFG* >
- : public GraphTraits< const clang::CFGBlock* > {
-
- typedef clang::CFG::const_iterator nodes_iterator;
-
- static NodeType *getEntryNode( const clang::CFG* F) { return &F->getEntry(); }
- static nodes_iterator nodes_begin( const clang::CFG* F) { return F->begin(); }
- static nodes_iterator nodes_end( const clang::CFG* F) { return F->end(); }
-};
-
-template <> struct GraphTraits<Inverse<const clang::CFG*> >
- : public GraphTraits<Inverse<const clang::CFGBlock*> > {
-
- typedef clang::CFG::const_iterator nodes_iterator;
-
- static NodeType *getEntryNode(const clang::CFG* F) { return &F->getExit(); }
- static nodes_iterator nodes_begin(const clang::CFG* F) { return F->begin();}
- static nodes_iterator nodes_end(const clang::CFG* F) { return F->end(); }
-};
-
-} // end llvm namespace
-
-#endif
diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h
index 13193ffab55ed..897776cdb9b80 100644
--- a/include/clang/AST/DeclObjC.h
+++ b/include/clang/AST/DeclObjC.h
@@ -808,7 +808,7 @@ public:
/// - myMethod;
/// @end
///
-/// Cateogries also allow you to split the implementation of a class across
+/// Categories also allow you to split the implementation of a class across
/// several files (a feature more naturally supported in C++).
///
/// Categories were originally inspired by dynamic languages such as Common
diff --git a/include/clang/Analysis/PathSensitive/Checkers/AttrNonNullChecker.h b/include/clang/Analysis/PathSensitive/Checkers/AttrNonNullChecker.h
deleted file mode 100644
index 007ec093b2e0a..0000000000000
--- a/include/clang/Analysis/PathSensitive/Checkers/AttrNonNullChecker.h
+++ /dev/null
@@ -1,28 +0,0 @@
-//===--- AttrNonNullChecker.h - Undefined arguments checker ----*- C++ -*--===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This defines AttrNonNullChecker, a builtin check in GRExprEngine that
-// performs checks for arguments declared to have nonnull attribute.
-//
-//===----------------------------------------------------------------------===//
-
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
-
-namespace clang {
-
-class AttrNonNullChecker : public CheckerVisitor<AttrNonNullChecker> {
- BugType *BT;
-
-public:
- AttrNonNullChecker() : BT(0) {}
- static void *getTag();
- void PreVisitCallExpr(CheckerContext &C, const CallExpr *CE);
-};
-
-}
diff --git a/include/clang/Analysis/PathSensitive/Checkers/BadCallChecker.h b/include/clang/Analysis/PathSensitive/Checkers/BadCallChecker.h
deleted file mode 100644
index 70f3c44165e02..0000000000000
--- a/include/clang/Analysis/PathSensitive/Checkers/BadCallChecker.h
+++ /dev/null
@@ -1,30 +0,0 @@
-//===--- BadCallChecker.h - Bad call checker --------------------*- C++ -*--==//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This defines BadCallChecker, a builtin check in GRExprEngine that performs
-// checks for bad callee at call sites.
-//
-//===----------------------------------------------------------------------===//
-
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
-
-namespace clang {
-
-class BadCallChecker : public CheckerVisitor<BadCallChecker> {
- BuiltinBug *BT;
-
-public:
- BadCallChecker() : BT(0) {}
-
- static void *getTag();
-
- void PreVisitCallExpr(CheckerContext &C, const CallExpr *CE);
-};
-
-}
diff --git a/include/clang/Analysis/PathSensitive/Checkers/DivZeroChecker.h b/include/clang/Analysis/PathSensitive/Checkers/DivZeroChecker.h
deleted file mode 100644
index 317e43a0e62ef..0000000000000
--- a/include/clang/Analysis/PathSensitive/Checkers/DivZeroChecker.h
+++ /dev/null
@@ -1,28 +0,0 @@
-//== DivZeroChecker.h - Division by zero checker ----------------*- C++ -*--==//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This defines DivZeroChecker, a builtin check in GRExprEngine that performs
-// checks for division by zeros.
-//
-//===----------------------------------------------------------------------===//
-
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
-
-namespace clang {
-
-class DivZeroChecker : public CheckerVisitor<DivZeroChecker> {
- BuiltinBug *BT;
-public:
- DivZeroChecker() : BT(0) {}
-
- static void *getTag();
- void PreVisitBinaryOperator(CheckerContext &C, const BinaryOperator *B);
-};
-
-}
diff --git a/include/clang/Analysis/PathSensitive/Checkers/UndefinedArgChecker.h b/include/clang/Analysis/PathSensitive/Checkers/UndefinedArgChecker.h
deleted file mode 100644
index 7f4e7d524f6cd..0000000000000
--- a/include/clang/Analysis/PathSensitive/Checkers/UndefinedArgChecker.h
+++ /dev/null
@@ -1,34 +0,0 @@
-//===--- UndefinedArgChecker.h - Undefined arguments checker ----*- C++ -*--==//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This defines BadCallChecker, a builtin check in GRExprEngine that performs
-// checks for undefined arguments.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_UNDEFARGCHECKER
-#define LLVM_CLANG_UNDEFARGCHECKER
-
-#include "clang/Analysis/PathSensitive/CheckerVisitor.h"
-
-namespace clang {
-
-class UndefinedArgChecker : public CheckerVisitor<UndefinedArgChecker> {
- BugType *BT;
-
-public:
- UndefinedArgChecker() : BT(0) {}
-
- static void *getTag();
-
- void PreVisitCallExpr(CheckerContext &C, const CallExpr *CE);
-};
-
-}
-#endif
diff --git a/include/clang/Analysis/PathSensitive/Checkers/VLASizeChecker.h b/include/clang/Analysis/PathSensitive/Checkers/VLASizeChecker.h
deleted file mode 100644
index b339b3d301417..0000000000000
--- a/include/clang/Analysis/PathSensitive/Checkers/VLASizeChecker.h
+++ /dev/null
@@ -1,39 +0,0 @@
-//=== VLASizeChecker.h - Undefined dereference checker ----------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This defines two VLASizeCheckers, a builtin check in GRExprEngine that
-// performs checks for declaration of VLA of undefined or zero size.
-//
-//===----------------------------------------------------------------------===//
-
-#include "clang/Analysis/PathSensitive/Checker.h"
-
-namespace clang {
-
-class UndefSizedVLAChecker : public Checker {
- BugType *BT;
-
-public:
- UndefSizedVLAChecker() : BT(0) {}
- static void *getTag();
- ExplodedNode *CheckType(QualType T, ExplodedNode *Pred,
- const GRState *state, Stmt *S, GRExprEngine &Eng);
-};
-
-class ZeroSizedVLAChecker : public Checker {
- BugType *BT;
-
-public:
- ZeroSizedVLAChecker() : BT(0) {}
- static void *getTag();
- ExplodedNode *CheckType(QualType T, ExplodedNode *Pred,
- const GRState *state, Stmt *S, GRExprEngine &Eng);
-};
-
-}
diff --git a/include/clang/Analysis/Visitors/CFGVarDeclVisitor.h b/include/clang/Analysis/Visitors/CFGVarDeclVisitor.h
deleted file mode 100644
index 1bc798f4e79e1..0000000000000
--- a/include/clang/Analysis/Visitors/CFGVarDeclVisitor.h
+++ /dev/null
@@ -1,63 +0,0 @@
-//==- CFGVarDeclVisitor - Generic visitor of VarDecls in a CFG --*- C++ --*-==//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file implements the template class CFGVarDeclVisitor, which provides
-// a generic way to visit all the VarDecl's in a CFG.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_ANALYSIS_CFG_VARDECL_VISITOR_H
-#define LLVM_CLANG_ANALYSIS_CFG_VARDECL_VISITOR_H
-
-#include "clang/Analysis/Visitors/CFGStmtVisitor.h"
-#include "clang/AST/Decl.h"
-#include "clang/AST/Stmt.h"
-
-namespace clang {
-
-template <typename ImplClass>
-class CFGVarDeclVisitor : public CFGStmtVisitor<ImplClass> {
- const CFG& cfg;
-public:
- CFGVarDeclVisitor(const CFG& c) : cfg(c) {}
-
- void VisitStmt(Stmt* S) {
- static_cast<ImplClass*>(this)->VisitChildren(S);
- }
-
- void VisitDeclRefExpr(DeclRefExpr* DR) {
- static_cast<ImplClass*>(this)->VisitDeclChain(DR->getDecl());
- }
-
- void VisitDeclStmt(DeclStmt* DS) {
- static_cast<ImplClass*>(this)->VisitDeclChain(DS->getDecl());
- }
-
- void VisitDeclChain(ScopedDecl* D) {
- for (; D != NULL ; D = D->getNextDeclarator())
- static_cast<ImplClass*>(this)->VisitScopedDecl(D);
- }
-
- void VisitScopedDecl(ScopedDecl* D) {
- if (VarDecl* V = dyn_cast<VarDecl>(D))
- static_cast<ImplClass*>(this)->VisitVarDecl(V);
- }
-
- void VisitVarDecl(VarDecl* D) {}
-
- void VisitAllDecls() {
- for (CFG::const_iterator BI = cfg.begin(), BE = cfg.end(); BI != BE; ++BI)
- for (CFGBlock::const_iterator SI=BI->begin(),SE = BI->end();SI != SE;++SI)
- static_cast<ImplClass*>(this)->BlockStmt_Visit(const_cast<Stmt*>(*SI));
- }
-};
-
-} // end namespace clang
-
-#endif
diff --git a/include/clang/Basic/Diagnostic.h b/include/clang/Basic/Diagnostic.h
index 3a70e134b82b3..00a5bc6e937d9 100644
--- a/include/clang/Basic/Diagnostic.h
+++ b/include/clang/Basic/Diagnostic.h
@@ -235,8 +235,8 @@ public:
// Diagnostic characterization methods, used by a client to customize how
//
- DiagnosticClient *getClient() { return Client; };
- const DiagnosticClient *getClient() const { return Client; };
+ DiagnosticClient *getClient() { return Client; }
+ const DiagnosticClient *getClient() const { return Client; }
/// pushMappings - Copies the current DiagMappings and pushes the new copy
diff --git a/include/clang/Basic/DiagnosticParseKinds.td b/include/clang/Basic/DiagnosticParseKinds.td
index 28c46cd2d7071..3a8c5bf8f1b8a 100644
--- a/include/clang/Basic/DiagnosticParseKinds.td
+++ b/include/clang/Basic/DiagnosticParseKinds.td
@@ -117,8 +117,6 @@ def err_expected_semi_after_static_assert : Error<
"expected ';' after static_assert">;
def err_expected_semi_for : Error<"expected ';' in 'for' statement specifier">;
def err_expected_colon_after : Error<"expected ':' after %0">;
-def err_pointer_to_member_type : Error<
- "invalid use of pointer to member type after %0">;
def err_label_end_of_compound_statement : Error<
"label at end of compound statement: expected statement">;
def err_expected_string_literal : Error<"expected string literal">;
@@ -201,6 +199,8 @@ def warn_expected_implementation : Warning<
"@end must appear in an @implementation context">;
def error_property_ivar_decl : Error<
"property synthesize requires specification of an ivar">;
+def err_synthesized_property_name : Error<
+ "expected a property name in @synthesize">;
def warn_semicolon_before_method_body : Warning<
"semicolon before method body is ignored">,
InGroup<DiagGroup<"semicolon-before-method-body">>, DefaultIgnore;
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 78a3ae5d47b72..a864d8ab9e726 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -979,6 +979,8 @@ def err_template_arg_not_pointer_to_member_form : Error<
"non-type template argument is not a pointer to member constant">;
def err_template_arg_extra_parens : Error<
"non-type template argument cannot be surrounded by parentheses">;
+def err_pointer_to_member_type : Error<
+ "invalid use of pointer to member type after %select{.*|->*}0">;
// C++ template specialization
def err_template_spec_unknown_kind : Error<
@@ -1811,6 +1813,8 @@ def err_typecheck_bool_condition : Error<
"value of type %0 is not contextually convertible to 'bool'">;
def err_typecheck_ambiguous_condition : Error<
"conversion from %0 to %1 is ambiguous">;
+def err_typecheck_nonviable_condition : Error<
+ "no viable conversion from %0 to %1 is possible">;
def err_expected_class_or_namespace : Error<"expected a class or namespace">;
def err_invalid_declarator_scope : Error<
"definition or redeclaration of %0 not in a namespace enclosing %1">;
diff --git a/include/clang/CMakeLists.txt b/include/clang/CMakeLists.txt
index 39e3698a16550..61d2bf602d9af 100644
--- a/include/clang/CMakeLists.txt
+++ b/include/clang/CMakeLists.txt
@@ -1 +1,2 @@
add_subdirectory(Basic)
+add_subdirectory(Driver)
diff --git a/include/clang/Driver/ArgList.h b/include/clang/Driver/ArgList.h
index dcb60381a4674..5263108d1a6d3 100644
--- a/include/clang/Driver/ArgList.h
+++ b/include/clang/Driver/ArgList.h
@@ -10,8 +10,7 @@
#ifndef CLANG_DRIVER_ARGLIST_H_
#define CLANG_DRIVER_ARGLIST_H_
-#include "clang/Driver/Options.h"
-
+#include "clang/Driver/OptSpecifier.h"
#include "clang/Driver/Util.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
@@ -26,6 +25,7 @@ namespace llvm {
namespace clang {
namespace driver {
class Arg;
+ class Option;
/// ArgList - Ordered collection of driver arguments.
///
@@ -77,20 +77,26 @@ namespace driver {
/// hasArg - Does the arg list contain any option matching \arg Id.
///
/// \arg Claim Whether the argument should be claimed, if it exists.
- bool hasArg(options::ID Id, bool Claim=true) const {
- return getLastArg(Id, Claim) != 0;
+ bool hasArgNoClaim(OptSpecifier Id) const {
+ return getLastArgNoClaim(Id) != 0;
+ }
+ bool hasArg(OptSpecifier Id) const {
+ return getLastArg(Id) != 0;
+ }
+ bool hasArg(OptSpecifier Id0, OptSpecifier Id1) const {
+ return getLastArg(Id0, Id1) != 0;
}
- bool hasArg(options::ID Id0, options::ID Id1, bool Claim=true) const {
- return getLastArg(Id0, Id1, Claim) != 0;
+ bool hasArg(OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2) const {
+ return getLastArg(Id0, Id1, Id2) != 0;
}
/// getLastArg - Return the last argument matching \arg Id, or null.
///
/// \arg Claim Whether the argument should be claimed, if it exists.
- Arg *getLastArg(options::ID Id, bool Claim=true) const;
- Arg *getLastArg(options::ID Id0, options::ID Id1, bool Claim=true) const;
- Arg *getLastArg(options::ID Id0, options::ID Id1, options::ID Id2,
- bool Claim=true) const;
+ Arg *getLastArgNoClaim(OptSpecifier Id) const;
+ Arg *getLastArg(OptSpecifier Id) const;
+ Arg *getLastArg(OptSpecifier Id0, OptSpecifier Id1) const;
+ Arg *getLastArg(OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2) const;
/// getArgString - Return the input argument string at \arg Index.
virtual const char *getArgString(unsigned Index) const = 0;
@@ -102,24 +108,24 @@ namespace driver {
/// negation is present, and \arg Default if neither option is
/// given. If both the option and its negation are present, the
/// last one wins.
- bool hasFlag(options::ID Pos, options::ID Neg, bool Default=true) const;
+ bool hasFlag(OptSpecifier Pos, OptSpecifier Neg, bool Default=true) const;
/// AddLastArg - Render only the last argument match \arg Id0, if
/// present.
- void AddLastArg(ArgStringList &Output, options::ID Id0) const;
+ void AddLastArg(ArgStringList &Output, OptSpecifier Id0) const;
/// AddAllArgs - Render all arguments matching the given ids.
- void AddAllArgs(ArgStringList &Output, options::ID Id0) const;
- void AddAllArgs(ArgStringList &Output, options::ID Id0,
- options::ID Id1) const;
- void AddAllArgs(ArgStringList &Output, options::ID Id0, options::ID Id1,
- options::ID Id2) const;
+ void AddAllArgs(ArgStringList &Output, OptSpecifier Id0) const;
+ void AddAllArgs(ArgStringList &Output, OptSpecifier Id0,
+ OptSpecifier Id1) const;
+ void AddAllArgs(ArgStringList &Output, OptSpecifier Id0, OptSpecifier Id1,
+ OptSpecifier Id2) const;
/// AddAllArgValues - Render the argument values of all arguments
/// matching the given ids.
- void AddAllArgValues(ArgStringList &Output, options::ID Id0) const;
- void AddAllArgValues(ArgStringList &Output, options::ID Id0,
- options::ID Id1) const;
+ void AddAllArgValues(ArgStringList &Output, OptSpecifier Id0) const;
+ void AddAllArgValues(ArgStringList &Output, OptSpecifier Id0,
+ OptSpecifier Id1) const;
/// AddAllArgsTranslated - Render all the arguments matching the
/// given ids, but forced to separate args and using the provided
@@ -127,13 +133,13 @@ namespace driver {
///
/// \param Joined - If true, render the argument as joined with
/// the option specifier.
- void AddAllArgsTranslated(ArgStringList &Output, options::ID Id0,
+ void AddAllArgsTranslated(ArgStringList &Output, OptSpecifier Id0,
const char *Translation,
bool Joined = false) const;
/// ClaimAllArgs - Claim all arguments which match the given
/// option id.
- void ClaimAllArgs(options::ID Id0) const;
+ void ClaimAllArgs(OptSpecifier Id0) const;
/// @}
/// @name Arg Synthesis
diff --git a/include/clang/Driver/CC1Options.h b/include/clang/Driver/CC1Options.h
new file mode 100644
index 0000000000000..057022ce38c19
--- /dev/null
+++ b/include/clang/Driver/CC1Options.h
@@ -0,0 +1,34 @@
+//===--- CC1Options.h - Clang CC1 Options Table -----------------*- 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_CC1OPTIONS_H
+#define CLANG_DRIVER_CC1OPTIONS_H
+
+namespace clang {
+namespace driver {
+ class OptTable;
+
+namespace cc1options {
+ enum ID {
+ OPT_INVALID = 0, // This is not an option ID.
+ OPT_INPUT, // Reserved ID for input option.
+ OPT_UNKNOWN, // Reserved ID for unknown option.
+#define OPTION(NAME, ID, KIND, GROUP, ALIAS, FLAGS, PARAM, \
+ HELPTEXT, METAVAR) OPT_##ID,
+#include "clang/Driver/CC1Options.inc"
+ LastOption
+#undef OPTION
+ };
+}
+
+ OptTable *createCC1OptTable();
+}
+}
+
+#endif
diff --git a/include/clang/Driver/CC1Options.td b/include/clang/Driver/CC1Options.td
new file mode 100644
index 0000000000000..ef8d8478282d4
--- /dev/null
+++ b/include/clang/Driver/CC1Options.td
@@ -0,0 +1,26 @@
+//===--- CC1Options.td - Options for clang -cc1 ---------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines the options accepted by clang -cc1.
+//
+//===----------------------------------------------------------------------===//
+
+// Include the common option parsing interfaces.
+include "OptParser.td"
+
+// Target Options
+
+def target_abi : Separate<"-target-abi">,
+ HelpText<"Target a particular ABI type">;
+def target_cpu : Separate<"-mcpu">,
+ HelpText<"Target a specific cpu type (-mcpu=help for details)">;
+def target_features : Separate<"-target-feature">,
+ HelpText<"Target specific attributes">;
+def target_triple : Separate<"-triple">,
+ HelpText<"Specify target triple (e.g. i686-apple-darwin9)">;
diff --git a/include/clang/Driver/CMakeLists.txt b/include/clang/Driver/CMakeLists.txt
new file mode 100644
index 0000000000000..f720d15d8cccd
--- /dev/null
+++ b/include/clang/Driver/CMakeLists.txt
@@ -0,0 +1,11 @@
+set(LLVM_TARGET_DEFINITIONS Options.td)
+tablegen(Options.inc
+ -gen-opt-parser-defs)
+add_custom_target(ClangDriverOptions
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Options.inc)
+
+set(LLVM_TARGET_DEFINITIONS CC1Options.td)
+tablegen(CC1Options.inc
+ -gen-opt-parser-defs)
+add_custom_target(ClangCC1Options
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/CC1Options.inc)
diff --git a/include/clang/Driver/Makefile b/include/clang/Driver/Makefile
new file mode 100644
index 0000000000000..c0f2cc7b67777
--- /dev/null
+++ b/include/clang/Driver/Makefile
@@ -0,0 +1,16 @@
+LEVEL = ../../../../..
+BUILT_SOURCES = Options.inc CC1Options.inc
+
+TABLEGEN_INC_FILES_COMMON = 1
+
+include $(LEVEL)/Makefile.common
+
+$(ObjDir)/Options.inc.tmp : Options.td OptParser.td $(ObjDir)/.dir
+ $(Echo) "Building Clang Driver Option tables with tblgen"
+ $(Verb) $(TableGen) -gen-opt-parser-defs -o $(call SYSPATH, $@) $<
+
+$(ObjDir)/CC1Options.inc.tmp : CC1Options.td OptParser.td $(ObjDir)/.dir
+ $(Echo) "Building Clang CC1 Option tables with tblgen"
+ $(Verb) $(TableGen) -gen-opt-parser-defs -o $(call SYSPATH, $@) $<
+
+
diff --git a/include/clang/Driver/OptParser.td b/include/clang/Driver/OptParser.td
new file mode 100644
index 0000000000000..70b59c69c264d
--- /dev/null
+++ b/include/clang/Driver/OptParser.td
@@ -0,0 +1,116 @@
+//===--- OptParser.td - Common Option Parsing Interfaces ------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines the common interfaces used by the option parsing TableGen
+// backend.
+//
+//===----------------------------------------------------------------------===//
+
+// Define the kinds of options.
+
+class OptionKind<string name, int predecence = 0> {
+ string Name = name;
+ // The kind precedence, kinds with lower precedence are matched first.
+ int Precedence = predecence;
+}
+
+// An option group.
+def KIND_GROUP : OptionKind<"Group">;
+// A flag with no values.
+def KIND_FLAG : OptionKind<"Flag">;
+// An option which prefixes its (single) value.
+def KIND_JOINED : OptionKind<"Joined", 1>;
+// An option which is followed by its value.
+def KIND_SEPARATE : OptionKind<"Separate">;
+// An option followed by its values, which are separated by commas.
+def KIND_COMMAJOINED : OptionKind<"CommaJoined">;
+// An option which is which takes multiple (separate) arguments.
+def KIND_MULTIARG : OptionKind<"MultiArg">;
+// An option which is either joined to its (non-empty) value, or followed by its
+// value.
+def KIND_JOINED_OR_SEPARATE : OptionKind<"JoinedOrSeparate">;
+// An option which is both joined to its (first) value, and followed by its
+// (second) value.
+def KIND_JOINED_AND_SEPARATE : OptionKind<"JoinedAndSeparate">;
+
+// Define the option flags.
+
+class OptionFlag {}
+
+// DriverOption - The option is a "driver" option, and should not be forwarded
+// to gcc.
+def DriverOption : OptionFlag;
+
+// LinkerInput - The option is a linker input.
+def LinkerInput : OptionFlag;
+
+// NoArgumentUnused - Don't report argument unused warnings for this option; this
+// is useful for options like -static or -dynamic which a user may always end up
+// passing, even if the platform defaults to (or only supports) that option.
+def NoArgumentUnused : OptionFlag;
+
+// RenderAsInput - The option should not render the name when rendered as an
+// input (i.e., the option is rendered as values).
+def RenderAsInput : OptionFlag;
+
+// RenderJoined - The option should be rendered joined, even if separate (only
+// sensible on single value separate options).
+def RenderJoined : OptionFlag;
+
+// RenderSeparate - The option should be rendered separately, even if joined
+// (only sensible on joined options).
+def RenderSeparate : OptionFlag;
+
+// Unsupported - The option is unsupported, and the driver will reject command
+// lines that use it.
+def Unsupported : OptionFlag;
+
+// Define the option group class.
+
+class OptionGroup<string name> {
+ string EnumName = ?; // Uses the def name if undefined.
+ string Name = name;
+ OptionGroup Group = ?;
+}
+
+// Define the option class.
+
+class Option<string name, OptionKind kind> {
+ string EnumName = ?; // Uses the def name if undefined.
+ string Name = name;
+ OptionKind Kind = kind;
+ // Used by MultiArg option kind.
+ int NumArgs = 0;
+ string HelpText = ?;
+ string MetaVarName = ?;
+ list<OptionFlag> Flags = [];
+ OptionGroup Group = ?;
+ Option Alias = ?;
+}
+
+// Helpers for defining options.
+
+class Flag<string name> : Option<name, KIND_FLAG>;
+class Joined<string name> : Option<name, KIND_JOINED>;
+class Separate<string name> : Option<name, KIND_SEPARATE>;
+class CommaJoined<string name> : Option<name, KIND_COMMAJOINED>;
+class MultiArg<string name, int numargs> : Option<name, KIND_MULTIARG> {
+ int NumArgs = numargs;
+}
+class JoinedOrSeparate<string name> : Option<name, KIND_JOINED_OR_SEPARATE>;
+class JoinedAndSeparate<string name> : Option<name, KIND_JOINED_AND_SEPARATE>;
+
+// Mix-ins for adding optional attributes.
+
+class Alias<Option alias> { Option Alias = alias; }
+class EnumName<string name> { string EnumName = name; }
+class Flags<list<OptionFlag> flags> { list<OptionFlag> Flags = flags; }
+class Group<OptionGroup group> { OptionGroup Group = group; }
+class HelpText<string text> { string HelpText = text; }
+class MetaVarName<string name> { string MetaVarName = name; }
diff --git a/include/clang/Driver/OptSpecifier.h b/include/clang/Driver/OptSpecifier.h
new file mode 100644
index 0000000000000..c38b36c2f70f2
--- /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
diff --git a/include/clang/Driver/OptTable.h b/include/clang/Driver/OptTable.h
new file mode 100644
index 0000000000000..faaeba69e2e6d
--- /dev/null
+++ b/include/clang/Driver/OptTable.h
@@ -0,0 +1,163 @@
+//===--- OptTable.h - Option Table ------------------------------*- 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_OPTTABLE_H
+#define CLANG_DRIVER_OPTTABLE_H
+
+#include "clang/Driver/OptSpecifier.h"
+#include <cassert>
+
+namespace clang {
+namespace driver {
+namespace options {
+ enum DriverFlag {
+ DriverOption = (1 << 0),
+ LinkerInput = (1 << 1),
+ NoArgumentUnused = (1 << 2),
+ RenderAsInput = (1 << 3),
+ RenderJoined = (1 << 4),
+ RenderSeparate = (1 << 5),
+ Unsupported = (1 << 6)
+ };
+}
+
+ class Arg;
+ class InputArgList;
+ class Option;
+
+ /// OptTable - Provide access to the Option info table.
+ ///
+ /// The OptTable class provides a layer of indirection which allows Option
+ /// instance to be created lazily. In the common case, only a few options will
+ /// be needed at runtime; the OptTable class maintains enough information to
+ /// parse command lines without instantiating Options, while letting other
+ /// parts of the driver still use Option instances where convenient.
+ class OptTable {
+ public:
+ /// Info - Entry for a single option instance in the option data table.
+ struct Info {
+ const char *Name;
+ const char *HelpText;
+ const char *MetaVar;
+ unsigned char Kind;
+ unsigned char Flags;
+ unsigned char Param;
+ unsigned short GroupID;
+ unsigned short AliasID;
+ };
+
+ private:
+ /// The static option information table.
+ const Info *OptionInfos;
+ unsigned NumOptionInfos;
+
+ /// The lazily constructed options table, indexed by option::ID - 1.
+ mutable Option **Options;
+
+ /// Prebound input option instance.
+ const Option *TheInputOption;
+
+ /// Prebound unknown option instance.
+ const Option *TheUnknownOption;
+
+ /// The index of the first option which can be parsed (i.e., is not a
+ /// special option like 'input' or 'unknown', and is not an option group).
+ unsigned FirstSearchableIndex;
+
+ private:
+ const Info &getInfo(OptSpecifier Opt) const {
+ unsigned id = Opt.getID();
+ assert(id > 0 && id - 1 < getNumOptions() && "Invalid Option ID.");
+ return OptionInfos[id - 1];
+ }
+
+ Option *CreateOption(unsigned id) const;
+
+ protected:
+ OptTable(const Info *_OptionInfos, unsigned _NumOptionInfos);
+ public:
+ ~OptTable();
+
+ /// getNumOptions - Return the total number of option classes.
+ unsigned getNumOptions() const { return NumOptionInfos; }
+
+ /// getOption - Get the given \arg id's Option instance, lazily creating it
+ /// if necessary.
+ ///
+ /// \return The option, or null for the INVALID option id.
+ const Option *getOption(OptSpecifier Opt) const {
+ unsigned id = Opt.getID();
+ if (id == 0)
+ return 0;
+
+ assert((unsigned) (id - 1) < getNumOptions() && "Invalid ID.");
+ Option *&Entry = Options[id - 1];
+ if (!Entry)
+ Entry = CreateOption(id);
+ return Entry;
+ }
+
+ /// getOptionName - Lookup the name of the given option.
+ const char *getOptionName(OptSpecifier id) const {
+ return getInfo(id).Name;
+ }
+
+ /// getOptionKind - Get the kind of the given option.
+ unsigned getOptionKind(OptSpecifier id) const {
+ return getInfo(id).Kind;
+ }
+
+ /// getOptionHelpText - Get the help text to use to describe this option.
+ const char *getOptionHelpText(OptSpecifier id) const {
+ return getInfo(id).HelpText;
+ }
+
+ /// getOptionMetaVar - Get the meta-variable name to use when describing
+ /// this options values in the help text.
+ const char *getOptionMetaVar(OptSpecifier id) const {
+ return getInfo(id).MetaVar;
+ }
+
+ /// ParseOneArg - Parse a single argument; returning the new argument and
+ /// updating Index.
+ ///
+ /// \param [in] [out] Index - The current parsing position in the argument
+ /// string list; on return this will be the index of the next argument
+ /// string to parse.
+ ///
+ /// \return - The parsed argument, or 0 if the argument is missing values
+ /// (in which case Index still points at the conceptual next argument string
+ /// to parse).
+ Arg *ParseOneArg(const InputArgList &Args, unsigned &Index) const;
+
+ /// ParseArgs - Parse an list of arguments into an InputArgList.
+ ///
+ /// The resulting InputArgList will reference the strings in [ArgBegin,
+ /// ArgEnd), and their lifetime should extend past that of the returned
+ /// InputArgList.
+ ///
+ /// The only error that can occur in this routine is if an argument is
+ /// missing values; in this case \arg MissingArgCount will be non-zero.
+ ///
+ /// \param ArgBegin - The beginning of the argument vector.
+ /// \param ArgEnd - The end of the argument vector.
+ /// \param MissingArgIndex - On error, the index of the option which could
+ /// not be parsed.
+ /// \param MissingArgCount - On error, the number of missing options.
+ /// \return - An InputArgList; on error this will contain all the options
+ /// which could be parsed.
+ InputArgList *ParseArgs(const char **ArgBegin,
+ const char **ArgEnd,
+ unsigned &MissingArgIndex,
+ unsigned &MissingArgCount) const;
+ };
+}
+}
+
+#endif
diff --git a/include/clang/Driver/Option.h b/include/clang/Driver/Option.h
index c70b6482167b1..08b94b1d797dd 100644
--- a/include/clang/Driver/Option.h
+++ b/include/clang/Driver/Option.h
@@ -10,8 +10,7 @@
#ifndef CLANG_DRIVER_OPTION_H_
#define CLANG_DRIVER_OPTION_H_
-#include "Options.h"
-
+#include "clang/Driver/OptSpecifier.h"
#include "llvm/Support/Casting.h"
using llvm::isa;
using llvm::cast;
@@ -54,7 +53,8 @@ namespace driver {
private:
OptionClass Kind;
- options::ID ID;
+ /// The option ID.
+ OptSpecifier ID;
/// The option name.
const char *Name;
@@ -89,12 +89,12 @@ namespace driver {
bool NoArgumentUnused : 1;
protected:
- Option(OptionClass Kind, options::ID ID, const char *Name,
+ Option(OptionClass Kind, OptSpecifier ID, const char *Name,
const OptionGroup *Group, const Option *Alias);
public:
virtual ~Option();
- options::ID getId() const { return ID; }
+ unsigned getID() const { return ID.getID(); }
OptionClass getKind() const { return Kind; }
const char *getName() const { return Name; }
const OptionGroup *getGroup() const { return Group; }
@@ -138,8 +138,11 @@ namespace driver {
/// matches - Predicate for whether this option is part of the
/// given option (which may be a group).
- bool matches(const Option *Opt) const;
- bool matches(options::ID Id) const;
+ ///
+ /// Note that matches against options which are an alias should never be
+ /// done -- aliases do not participate in matching and so such a query will
+ /// always be false.
+ bool matches(OptSpecifier ID) const;
/// accept - Potentially accept the current argument, returning a
/// new Arg instance, or 0 if the option does not accept this
@@ -159,7 +162,7 @@ namespace driver {
/// by the driver.
class OptionGroup : public Option {
public:
- OptionGroup(options::ID ID, const char *Name, const OptionGroup *Group);
+ OptionGroup(OptSpecifier ID, const char *Name, const OptionGroup *Group);
virtual Arg *accept(const InputArgList &Args, unsigned &Index) const;
@@ -174,7 +177,7 @@ namespace driver {
/// InputOption - Dummy option class for representing driver inputs.
class InputOption : public Option {
public:
- InputOption();
+ InputOption(OptSpecifier ID);
virtual Arg *accept(const InputArgList &Args, unsigned &Index) const;
@@ -187,7 +190,7 @@ namespace driver {
/// UnknownOption - Dummy option class for represent unknown arguments.
class UnknownOption : public Option {
public:
- UnknownOption();
+ UnknownOption(OptSpecifier ID);
virtual Arg *accept(const InputArgList &Args, unsigned &Index) const;
@@ -201,7 +204,7 @@ namespace driver {
class FlagOption : public Option {
public:
- FlagOption(options::ID ID, const char *Name, const OptionGroup *Group,
+ FlagOption(OptSpecifier ID, const char *Name, const OptionGroup *Group,
const Option *Alias);
virtual Arg *accept(const InputArgList &Args, unsigned &Index) const;
@@ -214,7 +217,7 @@ namespace driver {
class JoinedOption : public Option {
public:
- JoinedOption(options::ID ID, const char *Name, const OptionGroup *Group,
+ JoinedOption(OptSpecifier ID, const char *Name, const OptionGroup *Group,
const Option *Alias);
virtual Arg *accept(const InputArgList &Args, unsigned &Index) const;
@@ -227,8 +230,8 @@ namespace driver {
class SeparateOption : public Option {
public:
- SeparateOption(options::ID ID, const char *Name, const OptionGroup *Group,
- const Option *Alias);
+ SeparateOption(OptSpecifier ID, const char *Name,
+ const OptionGroup *Group, const Option *Alias);
virtual Arg *accept(const InputArgList &Args, unsigned &Index) const;
@@ -240,7 +243,7 @@ namespace driver {
class CommaJoinedOption : public Option {
public:
- CommaJoinedOption(options::ID ID, const char *Name,
+ CommaJoinedOption(OptSpecifier ID, const char *Name,
const OptionGroup *Group, const Option *Alias);
virtual Arg *accept(const InputArgList &Args, unsigned &Index) const;
@@ -259,7 +262,7 @@ namespace driver {
unsigned NumArgs;
public:
- MultiArgOption(options::ID ID, const char *Name, const OptionGroup *Group,
+ MultiArgOption(OptSpecifier ID, const char *Name, const OptionGroup *Group,
const Option *Alias, unsigned NumArgs);
unsigned getNumArgs() const { return NumArgs; }
@@ -276,7 +279,7 @@ namespace driver {
/// prefixes its (non-empty) value, or is follwed by a value.
class JoinedOrSeparateOption : public Option {
public:
- JoinedOrSeparateOption(options::ID ID, const char *Name,
+ JoinedOrSeparateOption(OptSpecifier ID, const char *Name,
const OptionGroup *Group, const Option *Alias);
virtual Arg *accept(const InputArgList &Args, unsigned &Index) const;
@@ -291,7 +294,7 @@ namespace driver {
/// value and is followed by another value.
class JoinedAndSeparateOption : public Option {
public:
- JoinedAndSeparateOption(options::ID ID, const char *Name,
+ JoinedAndSeparateOption(OptSpecifier ID, const char *Name,
const OptionGroup *Group, const Option *Alias);
virtual Arg *accept(const InputArgList &Args, unsigned &Index) const;
diff --git a/include/clang/Driver/Options.def b/include/clang/Driver/Options.def
deleted file mode 100644
index 2b66b3506b015..0000000000000
--- a/include/clang/Driver/Options.def
+++ /dev/null
@@ -1,661 +0,0 @@
-//===--- Options.def - Driver option info -----------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines the driver option information. Users of this file
-// must define the OPTION macro to make use of this information.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef OPTION
-#error "Define OPTION prior to including this file!"
-#endif
-
-// OPTION(NAME, ID, KIND, GROUP, ALIAS, FLAGS, PARAM,
-// HELPTEXT, METAVARNAME)
-
-// The NAME value is the option name as a string.
-
-// The ID is the internal option id, which must be a valid
-// C++ identifier, and results in a clang::driver::options::OPT_XX
-// enum constant for XX.
-//
-// We want to unambiguously be able to refer to options from the
-// driver source code, for this reason the option name is mangled into
-// an id. This mangling isn't guaranteed to have an inverse, but for
-// practical purposes it does.
-//
-// The mangling scheme is to ignore the leading '-', and perform the
-// following substitutions:
-// _ => __
-// - => _
-// # => _HASH
-// , => _COMMA
-// = => _EQ
-// C++ => CXX
-
-// The KIND value is the option type, one of Group, Flag, Joined,
-// Separate, CommaJoined, JoinedOrSeparate, JoinedAndSeparate.
-
-// The GROUP value is the internal name of the option group, or
-// INVALID if the option is not part of a group.
-
-// The ALIAS value is the internal name of an aliased option, or
-// INVALID if the option is not an alias.
-
-// The PARAM value is a string containing option flags. Valid values:
-// d: The option is a "driver" option, and should not be forwarded to
-// gcc.
-//
-// i: The option should not render the name when rendered as an
-// input (i.e., the option is rendered as values).
-//
-// l: The option is a linker input.
-//
-// q: Don't report argument unused warnings for this option; this is
-// useful for options like -static or -dynamic which a user may
-// always end up passing, even if the platform defaults to (or
-// only supports) that option.
-//
-// u: The option is unsupported, and the driver will reject command
-// lines that use it.
-//
-// S: The option should be rendered separately, even if joined (only
-// sensible on joined options).
-//
-// J: The option should be rendered joined, even if separate (only
-// sensible on single value separate options).
-
-// The PARAM value is an arbitrary integer parameter; currently
-// this is only used for specifying the number of arguments for
-// Separate options.
-
-// The HELPTEXT value is the string to print for this option in
-// --help, or 0 if undocumented.
-
-// The METAVAR value is the name to use for this values arguments (if
-// any) in the help text. This must be defined if the help text is
-// specified and this option takes extra arguments.
-
-//
-
-// For now (pre-TableGen, that is) Options must be in order. The
-// ordering is *almost* lexicographic, with two exceptions. First,
-// '\0' comes at the end of the alphabet instead of the beginning
-// (thus options preceed any other options which prefix them). Second,
-// for options with the same name, the less permissive version should
-// come first; a Flag option should preceed a Joined option, for
-// example.
-
-/////////
-// Groups
-
-OPTION("<I group>", I_Group, Group, INVALID, INVALID, "", 0, 0, 0)
-OPTION("<M group>", M_Group, Group, INVALID, INVALID, "", 0, 0, 0)
-OPTION("<T group>", T_Group, Group, INVALID, INVALID, "", 0, 0, 0)
-OPTION("<O group>", O_Group, Group, INVALID, INVALID, "", 0, 0, 0)
-OPTION("<W group>", W_Group, Group, INVALID, INVALID, "", 0, 0, 0)
-OPTION("<X group>", X_Group, Group, INVALID, INVALID, "", 0, 0, 0)
-OPTION("<a group>", a_Group, Group, INVALID, INVALID, "", 0, 0, 0)
-OPTION("<d group>", d_Group, Group, INVALID, INVALID, "", 0, 0, 0)
-OPTION("<f group>", f_Group, Group, INVALID, INVALID, "", 0, 0, 0)
-OPTION("<g group>", g_Group, Group, INVALID, INVALID, "", 0, 0, 0)
-OPTION("<i group>", i_Group, Group, INVALID, INVALID, "", 0, 0, 0)
-OPTION("<clang i group>", clang_i_Group, Group, i_Group, INVALID, "", 0, 0, 0)
-OPTION("<m group>", m_Group, Group, INVALID, INVALID, "", 0, 0, 0)
-OPTION("<m x86 features group>", m_x86_Features_Group, Group, INVALID, INVALID, "", 0, 0, 0)
-OPTION("<u group>", u_Group, Group, INVALID, INVALID, "", 0, 0, 0)
-
-OPTION("<pedantic group>", pedantic_Group, Group, INVALID, INVALID, "", 0, 0, 0)
-
-// Temporary groups for clang options which we know we don't support,
-// but don't want to verbosely warn the user about.
-OPTION("<clang ignored f group>", clang_ignored_f_Group, Group, f_Group,
- INVALID, "", 0, 0, 0)
-OPTION("<clang ignored m group>", clang_ignored_m_Group, Group, m_Group,
- INVALID, "", 0, 0, 0)
-
-//////////
-// Options
-
-OPTION("-###", _HASH_HASH_HASH, Flag, INVALID, INVALID, "d", 0,
- "Print the commands to run for this compilation", 0)
-OPTION("--CLASSPATH=", _CLASSPATH_EQ, Joined, INVALID, fclasspath_EQ, "", 0, 0, 0)
-OPTION("--CLASSPATH", _CLASSPATH, Separate, INVALID, fclasspath_EQ, "J", 0, 0, 0)
-OPTION("--all-warnings", _all_warnings, Flag, INVALID, Wall, "", 0, 0, 0)
-OPTION("--analyze-auto", _analyze_auto, Flag, INVALID, INVALID, "d", 0, 0, 0)
-OPTION("--analyzer-no-default-checks", _analyzer_no_default_checks, Flag, INVALID, INVALID, "d", 0, 0, 0)
-OPTION("--analyzer-output", _analyzer_output, JoinedOrSeparate, INVALID, INVALID, "d", 0, 0, 0)
-OPTION("--analyze", _analyze, Flag, INVALID, INVALID, "d", 0,
- "Run the static analyzer", 0)
-OPTION("--ansi", _ansi, Flag, INVALID, ansi, "", 0, 0, 0)
-OPTION("--assemble", _assemble, Flag, INVALID, S, "", 0, 0, 0)
-OPTION("--assert=", _assert_EQ, Joined, INVALID, A, "S", 0, 0, 0)
-OPTION("--assert", _assert, Separate, INVALID, A, "", 0, 0, 0)
-OPTION("--bootclasspath=", _bootclasspath_EQ, Joined, INVALID, fbootclasspath_EQ, "", 0, 0, 0)
-OPTION("--bootclasspath", _bootclasspath, Separate, INVALID, fbootclasspath_EQ, "J", 0, 0, 0)
-OPTION("--classpath=", _classpath_EQ, Joined, INVALID, fclasspath_EQ, "", 0, 0, 0)
-OPTION("--classpath", _classpath, Separate, INVALID, fclasspath_EQ, "J", 0, 0, 0)
-OPTION("--combine", _combine, Flag, INVALID, combine, "u", 0, 0, 0)
-OPTION("--comments-in-macros", _comments_in_macros, Flag, INVALID, CC, "", 0, 0, 0)
-OPTION("--comments", _comments, Flag, INVALID, C, "", 0, 0, 0)
-OPTION("--compile", _compile, Flag, INVALID, c, "", 0, 0, 0)
-OPTION("--constant-cfstrings", _constant_cfstrings, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("--coverage", _coverage, Flag, INVALID, coverage, "", 0, 0, 0)
-OPTION("--debug=", _debug_EQ, Joined, INVALID, g_Flag, "u", 0, 0, 0)
-OPTION("--debug", _debug, Flag, INVALID, g_Flag, "u", 0, 0, 0)
-OPTION("--define-macro=", _define_macro_EQ, Joined, INVALID, D, "", 0, 0, 0)
-OPTION("--define-macro", _define_macro, Separate, INVALID, D, "J", 0, 0, 0)
-OPTION("--dependencies", _dependencies, Flag, INVALID, M, "", 0, 0, 0)
-OPTION("--encoding=", _encoding_EQ, Joined, INVALID, fencoding_EQ, "", 0, 0, 0)
-OPTION("--encoding", _encoding, Separate, INVALID, fencoding_EQ, "J", 0, 0, 0)
-OPTION("--entry", _entry, Flag, INVALID, e, "", 0, 0, 0)
-OPTION("--extdirs=", _extdirs_EQ, Joined, INVALID, fextdirs_EQ, "", 0, 0, 0)
-OPTION("--extdirs", _extdirs, Separate, INVALID, fextdirs_EQ, "J", 0, 0, 0)
-OPTION("--extra-warnings", _extra_warnings, Flag, INVALID, W_Joined, "", 0, 0, 0)
-OPTION("--for-linker=", _for_linker_EQ, Joined, INVALID, Xlinker, "liS", 0, 0, 0)
-OPTION("--for-linker", _for_linker, Separate, INVALID, Xlinker, "li", 0, 0, 0)
-OPTION("--force-link=", _force_link_EQ, Joined, INVALID, u, "S", 0, 0, 0)
-OPTION("--force-link", _force_link, Separate, INVALID, u, "", 0, 0, 0)
-OPTION("--help-hidden", _help_hidden, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("--help", _help, Flag, INVALID, INVALID, "", 0,
- "Display available options", 0)
-OPTION("--imacros=", _imacros_EQ, Joined, INVALID, imacros, "S", 0, 0, 0)
-OPTION("--imacros", _imacros, Separate, INVALID, imacros, "", 0, 0, 0)
-OPTION("--include-barrier", _include_barrier, Flag, INVALID, I_, "", 0, 0, 0)
-OPTION("--include-directory-after=", _include_directory_after_EQ, Joined, INVALID, idirafter, "S", 0, 0, 0)
-OPTION("--include-directory-after", _include_directory_after, Separate, INVALID, idirafter, "", 0, 0, 0)
-OPTION("--include-directory=", _include_directory_EQ, Joined, INVALID, I, "", 0, 0, 0)
-OPTION("--include-directory", _include_directory, Separate, INVALID, I, "J", 0, 0, 0)
-OPTION("--include-prefix=", _include_prefix_EQ, Joined, INVALID, iprefix, "S", 0, 0, 0)
-OPTION("--include-prefix", _include_prefix, Separate, INVALID, iprefix, "", 0, 0, 0)
-OPTION("--include-with-prefix-after=", _include_with_prefix_after_EQ, Joined, INVALID, iwithprefix, "S", 0, 0, 0)
-OPTION("--include-with-prefix-after", _include_with_prefix_after, Separate, INVALID, iwithprefix, "", 0, 0, 0)
-OPTION("--include-with-prefix-before=", _include_with_prefix_before_EQ, Joined, INVALID, iwithprefixbefore, "S", 0, 0, 0)
-OPTION("--include-with-prefix-before", _include_with_prefix_before, Separate, INVALID, iwithprefixbefore, "", 0, 0, 0)
-OPTION("--include-with-prefix=", _include_with_prefix_EQ, Joined, INVALID, iwithprefix, "S", 0, 0, 0)
-OPTION("--include-with-prefix", _include_with_prefix, Separate, INVALID, iwithprefix, "", 0, 0, 0)
-OPTION("--include=", _include_EQ, Joined, INVALID, include, "S", 0, 0, 0)
-OPTION("--include", _include, Separate, INVALID, include, "", 0, 0, 0)
-OPTION("--language=", _language_EQ, Joined, INVALID, x, "S", 0, 0, 0)
-OPTION("--language", _language, Separate, INVALID, x, "", 0, 0, 0)
-OPTION("--library-directory=", _library_directory_EQ, Joined, INVALID, L, "S", 0, 0, 0)
-OPTION("--library-directory", _library_directory, Separate, INVALID, L, "", 0, 0, 0)
-OPTION("--machine-=", _machine__EQ, Joined, INVALID, m_Joined, "u", 0, 0, 0)
-OPTION("--machine-", _machine_, Joined, INVALID, m_Joined, "u", 0, 0, 0)
-OPTION("--machine=", _machine_EQ, Joined, INVALID, m_Joined, "", 0, 0, 0)
-OPTION("--machine", _machine, Separate, INVALID, m_Joined, "J", 0, 0, 0)
-OPTION("--no-integrated-cpp", _no_integrated_cpp, Flag, INVALID, no_integrated_cpp, "", 0, 0, 0)
-OPTION("--no-line-commands", _no_line_commands, Flag, INVALID, P, "", 0, 0, 0)
-OPTION("--no-standard-includes", _no_standard_includes, Flag, INVALID, nostdinc, "", 0, 0, 0)
-OPTION("--no-standard-libraries", _no_standard_libraries, Flag, INVALID, nostdlib, "", 0, 0, 0)
-OPTION("--no-undefined", _no_undefined, Flag, INVALID, INVALID, "l", 0, 0, 0)
-OPTION("--no-warnings", _no_warnings, Flag, INVALID, w, "", 0, 0, 0)
-OPTION("--optimize=", _optimize_EQ, Joined, INVALID, O, "u", 0, 0, 0)
-OPTION("--optimize", _optimize, Flag, INVALID, O, "u", 0, 0, 0)
-OPTION("--output-class-directory=", _output_class_directory_EQ, Joined, INVALID, foutput_class_dir_EQ, "", 0, 0, 0)
-OPTION("--output-class-directory", _output_class_directory, Separate, INVALID, foutput_class_dir_EQ, "J", 0, 0, 0)
-OPTION("--output=", _output_EQ, Joined, INVALID, o, "S", 0, 0, 0)
-OPTION("--output", _output, Separate, INVALID, o, "", 0, 0, 0)
-OPTION("--param=", _param_EQ, Joined, INVALID, _param, "S", 0, 0, 0)
-OPTION("--param", _param, Separate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("--pass-exit-codes", _pass_exit_codes, Flag, INVALID, pass_exit_codes, "", 0, 0, 0)
-OPTION("--pedantic-errors", _pedantic_errors, Flag, INVALID, pedantic_errors, "", 0, 0, 0)
-OPTION("--pedantic", _pedantic, Flag, INVALID, pedantic, "", 0, 0, 0)
-OPTION("--pipe", _pipe, Flag, INVALID, pipe, "d", 0, 0, 0)
-OPTION("--prefix=", _prefix_EQ, Joined, INVALID, B, "S", 0, 0, 0)
-OPTION("--prefix", _prefix, Separate, INVALID, B, "", 0, 0, 0)
-OPTION("--preprocess", _preprocess, Flag, INVALID, E, "", 0, 0, 0)
-OPTION("--print-file-name=", _print_file_name_EQ, Joined, INVALID, print_file_name_EQ, "", 0, 0, 0)
-OPTION("--print-file-name", _print_file_name, Separate, INVALID, print_file_name_EQ, "", 0, 0, 0)
-OPTION("--print-libgcc-file-name", _print_libgcc_file_name, Flag, INVALID, print_libgcc_file_name, "", 0, 0, 0)
-OPTION("--print-missing-file-dependencies", _print_missing_file_dependencies, Flag, INVALID, MG, "", 0, 0, 0)
-OPTION("--print-multi-directory", _print_multi_directory, Flag, INVALID, print_multi_directory, "", 0, 0, 0)
-OPTION("--print-multi-lib", _print_multi_lib, Flag, INVALID, print_multi_lib, "", 0, 0, 0)
-OPTION("--print-multi-os-directory", _print_multi_os_directory, Flag, INVALID, print_multi_os_directory, "", 0, 0, 0)
-OPTION("--print-prog-name=", _print_prog_name_EQ, Joined, INVALID, print_prog_name_EQ, "", 0, 0, 0)
-OPTION("--print-prog-name", _print_prog_name, Separate, INVALID, print_prog_name_EQ, "", 0, 0, 0)
-OPTION("--print-search-dirs", _print_search_dirs, Flag, INVALID, print_search_dirs, "", 0, 0, 0)
-OPTION("--profile-blocks", _profile_blocks, Flag, INVALID, a, "", 0, 0, 0)
-OPTION("--profile", _profile, Flag, INVALID, p, "", 0, 0, 0)
-OPTION("--relocatable-pch", _relocatable_pch, Flag, INVALID, INVALID, "", 0,
- "Build a relocatable precompiled header", 0)
-OPTION("--resource=", _resource_EQ, Joined, INVALID, fcompile_resource_EQ, "", 0, 0, 0)
-OPTION("--resource", _resource, Separate, INVALID, fcompile_resource_EQ, "J", 0, 0, 0)
-OPTION("--save-temps", _save_temps, Flag, INVALID, save_temps, "", 0, 0, 0)
-OPTION("--shared", _shared, Flag, INVALID, shared, "", 0, 0, 0)
-OPTION("--signed-char", _signed_char, Flag, INVALID, fsigned_char, "", 0, 0, 0)
-OPTION("--specs=", _specs_EQ, Joined, INVALID, specs_EQ, "u", 0, 0, 0)
-OPTION("--specs", _specs, Separate, INVALID, specs_EQ, "uJ", 0, 0, 0)
-OPTION("--static", _static, Flag, INVALID, static, "", 0, 0, 0)
-OPTION("--std=", _std_EQ, Joined, INVALID, std_EQ, "", 0, 0, 0)
-OPTION("--std", _std, Separate, INVALID, std_EQ, "J", 0, 0, 0)
-OPTION("--sysroot=", _sysroot_EQ, Joined, INVALID, INVALID, "", 0, 0, 0)
-OPTION("--sysroot", _sysroot, Separate, INVALID, _sysroot_EQ, "J", 0, 0, 0)
-OPTION("--target-help", _target_help, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("--trace-includes", _trace_includes, Flag, INVALID, H, "", 0, 0, 0)
-OPTION("--traditional-cpp", _traditional_cpp, Flag, INVALID, traditional_cpp, "", 0, 0, 0)
-OPTION("--traditional", _traditional, Flag, INVALID, traditional, "", 0, 0, 0)
-OPTION("--trigraphs", _trigraphs, Flag, INVALID, trigraphs, "", 0, 0, 0)
-OPTION("--undefine-macro=", _undefine_macro_EQ, Joined, INVALID, U, "", 0, 0, 0)
-OPTION("--undefine-macro", _undefine_macro, Separate, INVALID, U, "J", 0, 0, 0)
-OPTION("--unsigned-char", _unsigned_char, Flag, INVALID, funsigned_char, "", 0, 0, 0)
-OPTION("--user-dependencies", _user_dependencies, Flag, INVALID, MM, "", 0, 0, 0)
-OPTION("--verbose", _verbose, Flag, INVALID, v, "", 0, 0, 0)
-OPTION("--version", _version, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("--warn-=", _warn__EQ, Joined, INVALID, W_Joined, "u", 0, 0, 0)
-OPTION("--warn-", _warn_, Joined, INVALID, W_Joined, "u", 0, 0, 0)
-OPTION("--write-dependencies", _write_dependencies, Flag, INVALID, MD, "", 0, 0, 0)
-OPTION("--write-user-dependencies", _write_user_dependencies, Flag, INVALID, MMD, "", 0, 0, 0)
-OPTION("--", _, Joined, INVALID, f, "u", 0, 0, 0)
-OPTION("-A", A, JoinedOrSeparate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-B", B, JoinedOrSeparate, INVALID, INVALID, "u", 0, 0, 0)
-OPTION("-CC", CC, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-C", C, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-D", D, JoinedOrSeparate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-E", E, Flag, INVALID, INVALID, "d", 0,
- "Only run the preprocessor", 0)
-OPTION("-F", F, JoinedOrSeparate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-H", H, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-I-", I_, Flag, I_Group, INVALID, "", 0, 0, 0)
-OPTION("-I", I, JoinedOrSeparate, I_Group, INVALID, "", 0, 0, 0)
-OPTION("-L", L, JoinedOrSeparate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-MD", MD, Flag, M_Group, INVALID, "", 0, 0, 0)
-OPTION("-MF", MF, JoinedOrSeparate, M_Group, INVALID, "", 0, 0, 0)
-OPTION("-MG", MG, Flag, M_Group, INVALID, "", 0, 0, 0)
-OPTION("-MMD", MMD, Flag, M_Group, INVALID, "", 0, 0, 0)
-OPTION("-MM", MM, Flag, M_Group, INVALID, "", 0, 0, 0)
-OPTION("-MP", MP, Flag, M_Group, INVALID, "", 0, 0, 0)
-OPTION("-MQ", MQ, JoinedOrSeparate, M_Group, INVALID, "", 0, 0, 0)
-OPTION("-MT", MT, JoinedOrSeparate, M_Group, INVALID, "", 0, 0, 0)
-OPTION("-Mach", Mach, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-M", M, Flag, M_Group, INVALID, "", 0, 0, 0)
-OPTION("-O4", O4, Joined, O_Group, INVALID, "", 0, 0, 0)
-OPTION("-ObjC++", ObjCXX, Flag, INVALID, INVALID, "d", 0,
- "Treat source input files as Objective-C++ inputs", 0)
-OPTION("-ObjC", ObjC, Flag, INVALID, INVALID, "d", 0,
- "Treat source input files as Objective-C inputs", 0)
-OPTION("-O", O, Joined, O_Group, INVALID, "", 0, 0, 0)
-OPTION("-P", P, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-Qn", Qn, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-Qunused-arguments", Qunused_arguments, Flag, INVALID, INVALID, "d", 0,
- "Don't emit warning for unused driver arguments", 0)
-OPTION("-Q", Q, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-R", R, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-S", S, Flag, INVALID, INVALID, "d", 0,
- "Only run preprocess and compilation steps", 0)
-OPTION("-Tbss", Tbss, JoinedOrSeparate, T_Group, INVALID, "", 0, 0, 0)
-OPTION("-Tdata", Tdata, JoinedOrSeparate, T_Group, INVALID, "", 0, 0, 0)
-OPTION("-Ttext", Ttext, JoinedOrSeparate, T_Group, INVALID, "", 0, 0, 0)
-OPTION("-T", T, JoinedOrSeparate, T_Group, INVALID, "", 0, 0, 0)
-OPTION("-U", U, JoinedOrSeparate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-V", V, JoinedOrSeparate, INVALID, INVALID, "du", 0, 0, 0)
-OPTION("-Wa,", Wa_COMMA, CommaJoined, INVALID, INVALID, "", 0,
- "Pass the comma separated arguments in <arg> to the assembler", "<arg>")
-OPTION("-Wall", Wall, Flag, W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wextra", Wextra, Flag, W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wl,", Wl_COMMA, CommaJoined, INVALID, INVALID, "li", 0,
- "Pass the comma separated arguments in <arg> to the linker", "<arg>")
-OPTION("-Wno-nonportable-cfstrings", Wno_nonportable_cfstrings, Joined, W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wnonportable-cfstrings", Wnonportable_cfstrings, Joined, W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Wp,", Wp_COMMA, CommaJoined, INVALID, INVALID, "", 0,
- "Pass the comma separated arguments in <arg> to the preprocessor", "<arg>")
-OPTION("-W", W_Joined, Joined, W_Group, INVALID, "", 0, 0, 0)
-OPTION("-Xanalyzer", Xanalyzer, Separate, INVALID, INVALID, "", 0,
- "Pass <arg> to the static analyzer", "<arg>")
-OPTION("-Xarch_", Xarch__, JoinedAndSeparate, INVALID, INVALID, "d", 0, 0, 0)
-OPTION("-Xassembler", Xassembler, Separate, INVALID, INVALID, "", 0,
- "Pass <arg> to the assembler", "<arg>")
-OPTION("-Xclang", Xclang, Separate, INVALID, INVALID, "", 0,
- "Pass <arg> to the clang compiler", "<arg>")
-OPTION("-Xlinker", Xlinker, Separate, INVALID, INVALID, "li", 0,
- "Pass <arg> to the linker", "<arg>")
-OPTION("-Xpreprocessor", Xpreprocessor, Separate, INVALID, INVALID, "", 0,
- "Pass <arg> to the preprocessor", "<arg>")
-OPTION("-X", X_Flag, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-X", X_Joined, Joined, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-Z", Z_Flag, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-Z", Z_Joined, Joined, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-all_load", all__load, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-allowable_client", allowable__client, Separate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-ansi", ansi, Flag, a_Group, INVALID, "", 0, 0, 0)
-OPTION("-arch_errors_fatal", arch__errors__fatal, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-arch", arch, Separate, INVALID, INVALID, "d", 0, 0, 0)
-OPTION("-a", a, Joined, a_Group, INVALID, "", 0, 0, 0)
-OPTION("-bind_at_load", bind__at__load, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-bundle_loader", bundle__loader, Separate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-bundle", bundle, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-b", b, JoinedOrSeparate, INVALID, INVALID, "u", 0, 0, 0)
-OPTION("-client_name", client__name, JoinedOrSeparate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-combine", combine, Flag, INVALID, INVALID, "du", 0, 0, 0)
-OPTION("-compatibility_version", compatibility__version, JoinedOrSeparate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-coverage", coverage, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-cpp-precomp", cpp_precomp, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-current_version", current__version, JoinedOrSeparate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-c", c, Flag, INVALID, INVALID, "d", 0,
- "Only run preprocess, compile, and assemble steps", 0)
-OPTION("-dA", dA, Flag, d_Group, INVALID, "", 0, 0, 0)
-OPTION("-dD", dD, Flag, d_Group, INVALID, "", 0, 0, 0)
-OPTION("-dM", dM, Flag, d_Group, INVALID, "", 0, 0, 0)
-OPTION("-dead_strip", dead__strip, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-dependency-file", dependency_file, Separate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-dumpmachine", dumpmachine, Flag, INVALID, INVALID, "u", 0, 0, 0)
-OPTION("-dumpspecs", dumpspecs, Flag, INVALID, INVALID, "u", 0, 0, 0)
-OPTION("-dumpversion", dumpversion, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-dylib_file", dylib__file, Separate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-dylinker_install_name", dylinker__install__name, JoinedOrSeparate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-dylinker", dylinker, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-dynamiclib", dynamiclib, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-dynamic", dynamic, Flag, INVALID, INVALID, "q", 0, 0, 0)
-OPTION("-d", d_Flag, Flag, d_Group, INVALID, "", 0, 0, 0)
-OPTION("-d", d_Joined, Joined, d_Group, INVALID, "", 0, 0, 0)
-OPTION("-emit-ast", emit_ast, Flag, INVALID, INVALID, "", 0,
- "Emit Clang AST files for source inputs", 0)
-OPTION("-emit-llvm", emit_llvm, Flag, INVALID, INVALID, "", 0,
- "Use the LLVM representation for assembler and object files", 0)
-OPTION("-exported_symbols_list", exported__symbols__list, Separate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-e", e, JoinedOrSeparate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-fPIC", fPIC, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fPIE", fPIE, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fapple-kext", fapple_kext, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fasm-blocks", fasm_blocks, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fastcp", fastcp, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fastf", fastf, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fast", fast, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fasynchronous-unwind-tables", fasynchronous_unwind_tables, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fblock-introspection", fblock_introspection, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fblocks", fblocks, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fbootclasspath=", fbootclasspath_EQ, Joined, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fbuiltin-strcat", fbuiltin_strcat, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fbuiltin-strcpy", fbuiltin_strcpy, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fbuiltin", fbuiltin, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fclasspath=", fclasspath_EQ, Joined, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fcolor-diagnostics", fcolor_diagnostics, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fcommon", fcommon, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fcompile-resource=", fcompile_resource_EQ, Joined, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fconstant-cfstrings", fconstant_cfstrings, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fconstant-string-class=", fconstant_string_class_EQ, Joined, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fcreate-profile", fcreate_profile, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fdebug-pass-arguments", fdebug_pass_arguments, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fdebug-pass-structure", fdebug_pass_structure, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fdiagnostics-fixit-info", fdiagnostics_fixit_info, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fdiagnostics-print-source-range-info", fdiagnostics_print_source_range_info, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fdiagnostics-show-option", fdiagnostics_show_option, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fdollars-in-identifiers", fdollars_in_identifiers, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-feliminate-unused-debug-symbols", feliminate_unused_debug_symbols, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-femit-all-decls", femit_all_decls, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fencoding=", fencoding_EQ, Joined, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fexceptions", fexceptions, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fextdirs=", fextdirs_EQ, Joined, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-ffreestanding", ffreestanding, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fgnu-runtime", fgnu_runtime, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fheinous-gnu-extensions", fheinous_gnu_extensions, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-filelist", filelist, Separate, INVALID, INVALID, "l", 0, 0, 0)
-OPTION("-findirect-virtual-calls", findirect_virtual_calls, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-finline-functions", finline_functions, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0)
-OPTION("-finline", finline, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fkeep-inline-functions", fkeep_inline_functions, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0)
-OPTION("-flat_namespace", flat__namespace, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-flax-vector-conversions", flax_vector_conversions, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-flimited-precision=", flimited_precision_EQ, Joined, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-flto", flto, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fmath-errno", fmath_errno, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fmerge-all-constants", fmerge_all_constants, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fmessage-length=", fmessage_length_EQ, Joined, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fms-extensions", fms_extensions, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fmudflapth", fmudflapth, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fmudflap", fmudflap, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fnested-functions", fnested_functions, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fnext-runtime", fnext_runtime, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-asynchronous-unwind-tables", fno_asynchronous_unwind_tables, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-blocks", fno_blocks, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-builtin-strcat", fno_builtin_strcat, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-builtin-strcpy", fno_builtin_strcpy, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-builtin", fno_builtin, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-caret-diagnostics", fno_caret_diagnostics, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-color-diagnostics", fno_color_diagnostics, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-common", fno_common, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-constant-cfstrings", fno_constant_cfstrings, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-diagnostics-fixit-info", fno_diagnostics_fixit_info, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-diagnostics-show-option", fno_diagnostics_show_option, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-dollars-in-identifiers", fno_dollars_in_identifiers, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-eliminate-unused-debug-symbols", fno_eliminate_unused_debug_symbols, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-exceptions", fno_exceptions, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-inline-functions", fno_inline_functions, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-inline", fno_inline, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-keep-inline-functions", fno_keep_inline_functions, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-math-errno", fno_math_errno, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-merge-all-constants", fno_merge_all_constants, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-ms-extensions", fno_ms_extensions, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-omit-frame-pointer", fno_omit_frame_pointer, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-pascal-strings", fno_pascal_strings, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-rtti", fno_rtti, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-show-column", fno_show_column, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-show-source-location", fno_show_source_location, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-stack-protector", fno_stack_protector, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-strict-aliasing", fno_strict_aliasing, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-unit-at-a-time", fno_unit_at_a_time, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-unwind-tables", fno_unwind_tables, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-working-directory", fno_working_directory, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fno-zero-initialized-in-bss", fno_zero_initialized_in_bss, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fobjc-atdefs", fobjc_atdefs, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fobjc-call-cxx-cdtors", fobjc_call_cxx_cdtors, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fobjc-gc-only", fobjc_gc_only, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fobjc-gc", fobjc_gc, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fobjc-new-property", fobjc_new_property, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fobjc-nonfragile-abi", fobjc_nonfragile_abi, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fobjc-sender-dependent-dispatch", fobjc_sender_dependent_dispatch, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fobjc", fobjc, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fomit-frame-pointer", fomit_frame_pointer, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fopenmp", fopenmp, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-force_cpusubtype_ALL", force__cpusubtype__ALL, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-force_flat_namespace", force__flat__namespace, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-foutput-class-dir=", foutput_class_dir_EQ, Joined, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fpascal-strings", fpascal_strings, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fpch-preprocess", fpch_preprocess, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fpic", fpic, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fpie", fpie, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fprofile-arcs", fprofile_arcs, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fprofile-generate", fprofile_generate, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-framework", framework, Separate, INVALID, INVALID, "l", 0, 0, 0)
-OPTION("-frtti", frtti, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fshort-wchar", fshort_wchar, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fshow-source-location", fshow_source_location, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fsigned-bitfields", fsigned_bitfields, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fsigned-char", fsigned_char, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fstack-protector-all", fstack_protector_all, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fstack-protector", fstack_protector, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fstrict-aliasing", fstrict_aliasing, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fsyntax-only", fsyntax_only, Flag, INVALID, INVALID, "d", 0, 0, 0)
-OPTION("-ftemplate-depth-", ftemplate_depth_, Joined, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fterminated-vtables", fterminated_vtables, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-ftime-report", ftime_report, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-ftrapv", ftrapv, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-funit-at-a-time", funit_at_a_time, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-funsigned-bitfields", funsigned_bitfields, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-funsigned-char", funsigned_char, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-funwind-tables", funwind_tables, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fverbose-asm", fverbose_asm, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fvisibility=", fvisibility_EQ, Joined, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fwritable-strings", fwritable_strings, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fzero-initialized-in-bss", fzero_initialized_in_bss, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-f", f, Joined, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-g0", g0, Joined, g_Group, INVALID, "", 0, 0, 0)
-OPTION("-g3", g3, Joined, g_Group, INVALID, "", 0, 0, 0)
-OPTION("-gfull", gfull, Joined, g_Group, INVALID, "", 0, 0, 0)
-OPTION("-gstabs", gstabs, Joined, g_Group, INVALID, "", 0, 0, 0)
-OPTION("-gused", gused, Joined, g_Group, INVALID, "", 0, 0, 0)
-OPTION("-g", g_Flag, Flag, g_Group, INVALID, "", 0, 0, 0)
-OPTION("-g", g_Joined, Joined, g_Group, INVALID, "", 0, 0, 0)
-OPTION("-headerpad_max_install_names", headerpad__max__install__names, Joined, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-idirafter", idirafter, JoinedOrSeparate, clang_i_Group, INVALID, "", 0, 0, 0)
-OPTION("-iframework", iframework, JoinedOrSeparate, clang_i_Group, INVALID, "", 0, 0, 0)
-OPTION("-imacros", imacros, JoinedOrSeparate, clang_i_Group, INVALID, "", 0, 0, 0)
-OPTION("-image_base", image__base, Separate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-include", include, JoinedOrSeparate, clang_i_Group, INVALID, "", 0, 0, 0)
-OPTION("-init", init, Separate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-install_name", install__name, Separate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-iprefix", iprefix, JoinedOrSeparate, clang_i_Group, INVALID, "", 0, 0, 0)
-OPTION("-iquote", iquote, JoinedOrSeparate, clang_i_Group, INVALID, "", 0, 0, 0)
-OPTION("-isysroot", isysroot, JoinedOrSeparate, i_Group, INVALID, "", 0, 0, 0)
-OPTION("-isystem", isystem, JoinedOrSeparate, clang_i_Group, INVALID, "", 0, 0, 0)
-OPTION("-iwithprefixbefore", iwithprefixbefore, JoinedOrSeparate, clang_i_Group, INVALID, "", 0, 0, 0)
-OPTION("-iwithprefix", iwithprefix, JoinedOrSeparate, clang_i_Group, INVALID, "", 0, 0, 0)
-OPTION("-iwithsysroot", iwithsysroot, JoinedOrSeparate, i_Group, INVALID, "", 0, 0, 0)
-OPTION("-i", i, Joined, i_Group, INVALID, "", 0, 0, 0)
-OPTION("-keep_private_externs", keep__private__externs, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-l", l, JoinedOrSeparate, INVALID, INVALID, "l", 0, 0, 0)
-OPTION("-m32", m32, Flag, m_Group, INVALID, "d", 0, 0, 0)
-OPTION("-m3dnowa", m3dnowa, Flag, m_x86_Features_Group, INVALID, "", 0, 0, 0)
-OPTION("-m3dnow", m3dnow, Flag, m_x86_Features_Group, INVALID, "", 0, 0, 0)
-OPTION("-m64", m64, Flag, m_Group, INVALID, "d", 0, 0, 0)
-OPTION("-mabi=", mabi_EQ, Joined, m_Group, INVALID, "d", 0, 0, 0)
-OPTION("-march=", march_EQ, Joined, m_Group, INVALID, "d", 0, 0, 0)
-OPTION("-mcmodel=", mcmodel_EQ, Joined, m_Group, INVALID, "d", 0, 0, 0)
-OPTION("-mconstant-cfstrings", mconstant_cfstrings, Flag, clang_ignored_m_Group, INVALID, "", 0, 0, 0)
-OPTION("-mcpu=", mcpu_EQ, Joined, m_Group, INVALID, "d", 0, 0, 0)
-OPTION("-mdynamic-no-pic", mdynamic_no_pic, Joined, m_Group, INVALID, "q", 0, 0, 0)
-OPTION("-mfix-and-continue", mfix_and_continue, Flag, clang_ignored_m_Group, INVALID, "", 0, 0, 0)
-OPTION("-mfloat-abi=", mfloat_abi_EQ, Joined, m_Group, INVALID, "", 0, 0, 0)
-OPTION("-mhard-float", mhard_float, Flag, m_Group, INVALID, "", 0, 0, 0)
-OPTION("-miphoneos-version-min=", miphoneos_version_min_EQ, Joined, m_Group, INVALID, "", 0, 0, 0)
-OPTION("-mkernel", mkernel, Flag, m_Group, INVALID, "", 0, 0, 0)
-OPTION("-mllvm", mllvm, Separate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-mmacosx-version-min=", mmacosx_version_min_EQ, Joined, m_Group, INVALID, "", 0, 0, 0)
-OPTION("-mmmx", mmmx, Flag, m_x86_Features_Group, INVALID, "", 0, 0, 0)
-OPTION("-mno-3dnowa", mno_3dnowa, Flag, m_x86_Features_Group, INVALID, "", 0, 0, 0)
-OPTION("-mno-3dnow", mno_3dnow, Flag, m_x86_Features_Group, INVALID, "", 0, 0, 0)
-OPTION("-mno-constant-cfstrings", mno_constant_cfstrings, Flag, m_Group, INVALID, "", 0, 0, 0)
-OPTION("-mno-mmx", mno_mmx, Flag, m_x86_Features_Group, INVALID, "", 0, 0, 0)
-OPTION("-mno-pascal-strings", mno_pascal_strings, Flag, m_Group, INVALID, "", 0, 0, 0)
-OPTION("-mno-red-zone", mno_red_zone, Flag, m_Group, INVALID, "", 0, 0, 0)
-OPTION("-mno-soft-float", mno_soft_float, Flag, m_Group, INVALID, "", 0, 0, 0)
-OPTION("-mno-sse2", mno_sse2, Flag, m_x86_Features_Group, INVALID, "", 0, 0, 0)
-OPTION("-mno-sse3", mno_sse3, Flag, m_x86_Features_Group, INVALID, "", 0, 0, 0)
-OPTION("-mno-sse4a", mno_sse4a, Flag, m_x86_Features_Group, INVALID, "", 0, 0, 0)
-OPTION("-mno-sse4", mno_sse4, Flag, m_x86_Features_Group, INVALID, "", 0, 0, 0)
-OPTION("-mno-sse", mno_sse, Flag, m_x86_Features_Group, INVALID, "", 0, 0, 0)
-OPTION("-mno-ssse3", mno_ssse3, Flag, m_x86_Features_Group, INVALID, "", 0, 0, 0)
-OPTION("-mno-thumb", mno_thumb, Flag, m_Group, INVALID, "", 0, 0, 0)
-OPTION("-mno-warn-nonportable-cfstrings", mno_warn_nonportable_cfstrings, Flag, m_Group, INVALID, "", 0, 0, 0)
-OPTION("-mpascal-strings", mpascal_strings, Flag, m_Group, INVALID, "", 0, 0, 0)
-OPTION("-mred-zone", mred_zone, Flag, m_Group, INVALID, "", 0, 0, 0)
-OPTION("-msoft-float", msoft_float, Flag, m_Group, INVALID, "", 0, 0, 0)
-OPTION("-msse2", msse2, Flag, m_x86_Features_Group, INVALID, "", 0, 0, 0)
-OPTION("-msse3", msse3, Flag, m_x86_Features_Group, INVALID, "", 0, 0, 0)
-OPTION("-msse4a", msse4a, Flag, m_x86_Features_Group, INVALID, "", 0, 0, 0)
-OPTION("-msse4", msse4, Flag, m_x86_Features_Group, INVALID, "", 0, 0, 0)
-OPTION("-msse", msse, Flag, m_x86_Features_Group, INVALID, "", 0, 0, 0)
-OPTION("-mssse3", mssse3, Flag, m_x86_Features_Group, INVALID, "", 0, 0, 0)
-OPTION("-mthumb", mthumb, Flag, m_Group, INVALID, "", 0, 0, 0)
-OPTION("-mtune=", mtune_EQ, Joined, m_Group, INVALID, "", 0, 0, 0)
-OPTION("-multi_module", multi__module, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-multiply_defined_unused", multiply__defined__unused, Separate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-multiply_defined", multiply__defined, Separate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-mwarn-nonportable-cfstrings", mwarn_nonportable_cfstrings, Flag, m_Group, INVALID, "", 0, 0, 0)
-OPTION("-m", m_Separate, Separate, m_Group, INVALID, "", 0, 0, 0)
-OPTION("-m", m_Joined, Joined, m_Group, INVALID, "", 0, 0, 0)
-OPTION("-no-cpp-precomp", no_cpp_precomp, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-no-integrated-cpp", no_integrated_cpp, Flag, INVALID, INVALID, "d", 0, 0, 0)
-OPTION("-no_dead_strip_inits_and_terms", no__dead__strip__inits__and__terms, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-nobuiltininc", nobuiltininc, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-nodefaultlibs", nodefaultlibs, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-nofixprebinding", nofixprebinding, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-nolibc", nolibc, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-nomultidefs", nomultidefs, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-noprebind", noprebind, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-noseglinkedit", noseglinkedit, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-nostartfiles", nostartfiles, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-nostdinc", nostdinc, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-nostdlib", nostdlib, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-object", object, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-o", o, JoinedOrSeparate, INVALID, INVALID, "di", 0,
- "Write output to <file>", "<file>")
-OPTION("-pagezero_size", pagezero__size, JoinedOrSeparate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-pass-exit-codes", pass_exit_codes, Flag, INVALID, INVALID, "u", 0, 0, 0)
-OPTION("-pedantic-errors", pedantic_errors, Flag, pedantic_Group, INVALID, "", 0, 0, 0)
-OPTION("-pedantic", pedantic, Flag, pedantic_Group, INVALID, "", 0, 0, 0)
-OPTION("-pg", pg, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-pipe", pipe, Flag, INVALID, INVALID, "", 0,
- "Use pipes between commands, when possible", 0)
-OPTION("-prebind_all_twolevel_modules", prebind__all__twolevel__modules, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-prebind", prebind, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-preload", preload, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-print-file-name=", print_file_name_EQ, Joined, INVALID, INVALID, "", 0,
- "Print the full library path of <file>", "<file>")
-OPTION("-print-ivar-layout", print_ivar_layout, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-print-libgcc-file-name", print_libgcc_file_name, Flag, INVALID, INVALID, "", 0,
- "Print the library path for \"libgcc.a\"", 0)
-OPTION("-print-multi-directory", print_multi_directory, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-print-multi-lib", print_multi_lib, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-print-multi-os-directory", print_multi_os_directory, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-print-prog-name=", print_prog_name_EQ, Joined, INVALID, INVALID, "", 0,
- "Print the full program path of <name>", "<name>")
-OPTION("-print-search-dirs", print_search_dirs, Flag, INVALID, INVALID, "", 0,
- "Print the paths used for finding libraries and programs", 0)
-OPTION("-private_bundle", private__bundle, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-pthreads", pthreads, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-pthread", pthread, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-p", p, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-read_only_relocs", read__only__relocs, Separate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-remap", remap, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-rpath", rpath, Separate, INVALID, INVALID, "l", 0, 0, 0)
-OPTION("-r", r, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-save-temps", save_temps, Flag, INVALID, INVALID, "d", 0,
- "Save intermediate compilation results", 0)
-OPTION("-sectalign", sectalign, MultiArg, INVALID, INVALID, "", 3, 0, 0)
-OPTION("-sectcreate", sectcreate, MultiArg, INVALID, INVALID, "", 3, 0, 0)
-OPTION("-sectobjectsymbols", sectobjectsymbols, MultiArg, INVALID, INVALID, "", 2, 0, 0)
-OPTION("-sectorder", sectorder, MultiArg, INVALID, INVALID, "", 3, 0, 0)
-OPTION("-seg1addr", seg1addr, JoinedOrSeparate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-seg_addr_table_filename", seg__addr__table__filename, Separate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-seg_addr_table", seg__addr__table, Separate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-segaddr", segaddr, MultiArg, INVALID, INVALID, "", 2, 0, 0)
-OPTION("-segcreate", segcreate, MultiArg, INVALID, INVALID, "", 3, 0, 0)
-OPTION("-seglinkedit", seglinkedit, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-segprot", segprot, MultiArg, INVALID, INVALID, "", 3, 0, 0)
-OPTION("-segs_read_only_addr", segs__read__only__addr, Separate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-segs_read_write_addr", segs__read__write__addr, Separate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-segs_read_", segs__read__, Joined, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-shared-libgcc", shared_libgcc, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-shared", shared, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-single_module", single__module, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-specs=", specs_EQ, Joined, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-specs", specs, Separate, INVALID, INVALID, "u", 0, 0, 0)
-OPTION("-static-libgcc", static_libgcc, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-static", static, Flag, INVALID, INVALID, "q", 0, 0, 0)
-OPTION("-std-default=", std_default_EQ, Joined, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-std=", std_EQ, Joined, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-sub_library", sub__library, JoinedOrSeparate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-sub_umbrella", sub__umbrella, JoinedOrSeparate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-s", s, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-time", time, Flag, INVALID, INVALID, "", 0,
- "Time individual commands", 0)
-OPTION("-traditional-cpp", traditional_cpp, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-traditional", traditional, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-trigraphs", trigraphs, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-twolevel_namespace_hints", twolevel__namespace__hints, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-twolevel_namespace", twolevel__namespace, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-t", t, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-umbrella", umbrella, Separate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-undefined", undefined, JoinedOrSeparate, u_Group, INVALID, "", 0, 0, 0)
-OPTION("-undef", undef, Flag, u_Group, INVALID, "", 0, 0, 0)
-OPTION("-unexported_symbols_list", unexported__symbols__list, Separate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-u", u, JoinedOrSeparate, u_Group, INVALID, "", 0, 0, 0)
-OPTION("-v", v, Flag, INVALID, INVALID, "", 0,
- "Show commands to run and use verbose output", 0)
-OPTION("-weak-l", weak_l, Joined, INVALID, INVALID, "l", 0, 0, 0)
-OPTION("-weak_framework", weak__framework, Separate, INVALID, INVALID, "l", 0, 0, 0)
-OPTION("-weak_library", weak__library, Separate, INVALID, INVALID, "l", 0, 0, 0)
-OPTION("-weak_reference_mismatches", weak__reference__mismatches, Separate, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-whatsloaded", whatsloaded, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-whyload", whyload, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-w", w, Flag, INVALID, INVALID, "", 0, 0, 0)
-OPTION("-x", x, JoinedOrSeparate, INVALID, INVALID, "d", 0,
- "Treat subsequent input files as having type <language>", "<language>")
-OPTION("-y", y, Joined, INVALID, INVALID, "", 0, 0, 0)
diff --git a/include/clang/Driver/Options.h b/include/clang/Driver/Options.h
index 7fcaf3f497bef..b05d5afd7578a 100644
--- a/include/clang/Driver/Options.h
+++ b/include/clang/Driver/Options.h
@@ -7,11 +7,13 @@
//
//===----------------------------------------------------------------------===//
-#ifndef CLANG_DRIVER_OPTIONS_H_
-#define CLANG_DRIVER_OPTIONS_H_
+#ifndef CLANG_DRIVER_OPTIONS_H
+#define CLANG_DRIVER_OPTIONS_H
namespace clang {
namespace driver {
+ class OptTable;
+
namespace options {
enum ID {
OPT_INVALID = 0, // This is not an option ID.
@@ -19,71 +21,13 @@ namespace options {
OPT_UNKNOWN, // Reserved ID for unknown option.
#define OPTION(NAME, ID, KIND, GROUP, ALIAS, FLAGS, PARAM, \
HELPTEXT, METAVAR) OPT_##ID,
-#include "clang/Driver/Options.def"
+#include "clang/Driver/Options.inc"
LastOption
#undef OPTION
};
}
- class Arg;
- class InputArgList;
- class Option;
-
- /// OptTable - Provide access to the Option info table.
- ///
- /// The OptTable class provides a layer of indirection which allows
- /// Option instance to be created lazily. In the common case, only a
- /// few options will be needed at runtime; the OptTable class
- /// maintains enough information to parse command lines without
- /// instantiating Options, while letting other parts of the driver
- /// still use Option instances where convient.
- class OptTable {
- /// The table of options which have been constructed, indexed by
- /// option::ID - 1.
- mutable Option **Options;
-
- /// The index of the first option which can be parsed (i.e., is
- /// not a special option like 'input' or 'unknown', and is not an
- /// option group).
- unsigned FirstSearchableOption;
-
- Option *constructOption(options::ID id) const;
-
- public:
- OptTable();
- ~OptTable();
-
- unsigned getNumOptions() const;
-
- const char *getOptionName(options::ID id) const;
-
- /// getOption - Get the given \arg id's Option instance, lazily
- /// creating it if necessary.
- const Option *getOption(options::ID id) const;
-
- /// getOptionKind - Get the kind of the given option.
- unsigned getOptionKind(options::ID id) const;
-
- /// getOptionHelpText - Get the help text to use to describe this
- /// option.
- const char *getOptionHelpText(options::ID id) const;
-
- /// getOptionMetaVar - Get the meta-variable name to use when
- /// describing this options values in the help text.
- const char *getOptionMetaVar(options::ID id) const;
-
- /// parseOneArg - Parse a single argument; returning the new
- /// argument and updating Index.
- ///
- /// \param [in] [out] Index - The current parsing position in the
- /// argument string list; on return this will be the index of the
- /// next argument string to parse.
- ///
- /// \return - The parsed argument, or 0 if the argument is missing
- /// values (in which case Index still points at the conceptual
- /// next argument string to parse).
- Arg *ParseOneArg(const InputArgList &Args, unsigned &Index) const;
- };
+ OptTable *createDriverOptTable();
}
}
diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td
new file mode 100644
index 0000000000000..ace1a3c16addf
--- /dev/null
+++ b/include/clang/Driver/Options.td
@@ -0,0 +1,607 @@
+//===--- DriverOptions.td - Options for clang -----------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines the options accepted by clang.
+//
+//===----------------------------------------------------------------------===//
+
+// Include the common option parsing interfaces.
+include "OptParser.td"
+
+/////////
+// Groups
+
+def I_Group : OptionGroup<"<I group>">;
+def M_Group : OptionGroup<"<M group>">;
+def T_Group : OptionGroup<"<T group>">;
+def O_Group : OptionGroup<"<O group>">;
+def W_Group : OptionGroup<"<W group>">;
+def X_Group : OptionGroup<"<X group>">;
+def a_Group : OptionGroup<"<a group>">;
+def d_Group : OptionGroup<"<d group>">;
+def f_Group : OptionGroup<"<f group>">;
+def g_Group : OptionGroup<"<g group>">;
+def i_Group : OptionGroup<"<i group>">;
+def clang_i_Group : OptionGroup<"<clang i group>">, Group<i_Group>;
+def m_Group : OptionGroup<"<m group>">;
+def m_x86_Features_Group : OptionGroup<"<m x86 features group>">;
+def u_Group : OptionGroup<"<u group>">;
+
+def pedantic_Group : OptionGroup<"<pedantic group>">;
+
+// Temporary groups for clang options which we know we don't support,
+// but don't want to verbosely warn the user about.
+def clang_ignored_f_Group : OptionGroup<"<clang ignored f group>">,
+ Group<f_Group>;
+def clang_ignored_m_Group : OptionGroup<"<clang ignored m group>">,
+ Group<m_Group>;
+
+/////////
+// Options
+
+// The internal option ID must be a valid C++ identifier and results in a
+// clang::driver::options::OPT_XX enum constant for XX.
+//
+// We want to unambiguously be able to refer to options from the driver source
+// code, for this reason the option name is mangled into an ID. This mangling
+// isn't guaranteed to have an inverse, but for practical purposes it does.
+//
+// The mangling scheme is to ignore the leading '-', and perform the following
+// substitutions:
+// _ => __
+// - => _
+// # => _HASH
+// , => _COMMA
+// = => _EQ
+// C++ => CXX
+
+def _HASH_HASH_HASH : Flag<"-###">, Flags<[DriverOption]>,
+ HelpText<"Print the commands to run for this compilation">;
+def A : JoinedOrSeparate<"-A">;
+def B : JoinedOrSeparate<"-B">, Flags<[Unsupported]>;
+def CC : Flag<"-CC">;
+def C : Flag<"-C">;
+def D : JoinedOrSeparate<"-D">;
+def E : Flag<"-E">, Flags<[DriverOption]>,
+ HelpText<"Only run the preprocessor">;
+def F : JoinedOrSeparate<"-F">;
+def H : Flag<"-H">;
+def I_ : Flag<"-I-">, Group<I_Group>;
+def I : JoinedOrSeparate<"-I">, Group<I_Group>;
+def L : JoinedOrSeparate<"-L">;
+def MD : Flag<"-MD">, Group<M_Group>;
+def MF : JoinedOrSeparate<"-MF">, Group<M_Group>;
+def MG : Flag<"-MG">, Group<M_Group>;
+def MMD : Flag<"-MMD">, Group<M_Group>;
+def MM : Flag<"-MM">, Group<M_Group>;
+def MP : Flag<"-MP">, Group<M_Group>;
+def MQ : JoinedOrSeparate<"-MQ">, Group<M_Group>;
+def MT : JoinedOrSeparate<"-MT">, Group<M_Group>;
+def Mach : Flag<"-Mach">;
+def M : Flag<"-M">, Group<M_Group>;
+def O4 : Joined<"-O4">, Group<O_Group>;
+def ObjCXX : Flag<"-ObjC++">, Flags<[DriverOption]>,
+ HelpText<"Treat source input files as Objective-C++ inputs">;
+def ObjC : Flag<"-ObjC">, Flags<[DriverOption]>,
+ HelpText<"Treat source input files as Objective-C inputs">;
+def O : Joined<"-O">, Group<O_Group>;
+def P : Flag<"-P">;
+def Qn : Flag<"-Qn">;
+def Qunused_arguments : Flag<"-Qunused-arguments">, Flags<[DriverOption]>,
+ HelpText<"Don't emit warning for unused driver arguments">;
+def Q : Flag<"-Q">;
+def R : Flag<"-R">;
+def S : Flag<"-S">, Flags<[DriverOption]>,
+ HelpText<"Only run preprocess and compilation steps">;
+def Tbss : JoinedOrSeparate<"-Tbss">, Group<T_Group>;
+def Tdata : JoinedOrSeparate<"-Tdata">, Group<T_Group>;
+def Ttext : JoinedOrSeparate<"-Ttext">, Group<T_Group>;
+def T : JoinedOrSeparate<"-T">, Group<T_Group>;
+def U : JoinedOrSeparate<"-U">;
+def V : JoinedOrSeparate<"-V">, Flags<[DriverOption, Unsupported]>;
+def Wa_COMMA : CommaJoined<"-Wa,">,
+ HelpText<"Pass the comma separated arguments in <arg> to the assembler">,
+ MetaVarName<"<arg>">;
+def Wall : Flag<"-Wall">, Group<W_Group>;
+def Wextra : Flag<"-Wextra">, Group<W_Group>;
+def Wl_COMMA : CommaJoined<"-Wl,">, Flags<[LinkerInput, RenderAsInput]>,
+ HelpText<"Pass the comma separated arguments in <arg> to the linker">,
+ MetaVarName<"<arg>">;
+def Wno_nonportable_cfstrings : Joined<"-Wno-nonportable-cfstrings">, Group<W_Group>;
+def Wnonportable_cfstrings : Joined<"-Wnonportable-cfstrings">, Group<W_Group>;
+def Wp_COMMA : CommaJoined<"-Wp,">,
+ HelpText<"Pass the comma separated arguments in <arg> to the preprocessor">,
+ MetaVarName<"<arg>">;
+def W_Joined : Joined<"-W">, Group<W_Group>;
+def Xanalyzer : Separate<"-Xanalyzer">,
+ HelpText<"Pass <arg> to the static analyzer">, MetaVarName<"<arg>">;
+def Xarch__ : JoinedAndSeparate<"-Xarch_">, Flags<[DriverOption]>;
+def Xassembler : Separate<"-Xassembler">,
+ HelpText<"Pass <arg> to the assembler">, MetaVarName<"<arg>">;
+def Xclang : Separate<"-Xclang">,
+ HelpText<"Pass <arg> to the clang compiler">, MetaVarName<"<arg>">;
+def Xlinker : Separate<"-Xlinker">, Flags<[LinkerInput, RenderAsInput]>,
+ HelpText<"Pass <arg> to the linker">, MetaVarName<"<arg>">;
+def Xpreprocessor : Separate<"-Xpreprocessor">,
+ HelpText<"Pass <arg> to the preprocessor">, MetaVarName<"<arg>">;
+def X_Flag : Flag<"-X">;
+def X_Joined : Joined<"-X">;
+def Z_Flag : Flag<"-Z">;
+def Z_Joined : Joined<"-Z">;
+def all__load : Flag<"-all_load">;
+def allowable__client : Separate<"-allowable_client">;
+def ansi : Flag<"-ansi">, Group<a_Group>;
+def arch__errors__fatal : Flag<"-arch_errors_fatal">;
+def arch : Separate<"-arch">, Flags<[DriverOption]>;
+def a : Joined<"-a">, Group<a_Group>;
+def bind__at__load : Flag<"-bind_at_load">;
+def bundle__loader : Separate<"-bundle_loader">;
+def bundle : Flag<"-bundle">;
+def b : JoinedOrSeparate<"-b">, Flags<[Unsupported]>;
+def client__name : JoinedOrSeparate<"-client_name">;
+def combine : Flag<"-combine">, Flags<[DriverOption, Unsupported]>;
+def compatibility__version : JoinedOrSeparate<"-compatibility_version">;
+def coverage : Flag<"-coverage">;
+def cpp_precomp : Flag<"-cpp-precomp">;
+def current__version : JoinedOrSeparate<"-current_version">;
+def c : Flag<"-c">, Flags<[DriverOption]>,
+ HelpText<"Only run preprocess, compile, and assemble steps">;
+def dA : Flag<"-dA">, Group<d_Group>;
+def dD : Flag<"-dD">, Group<d_Group>;
+def dM : Flag<"-dM">, Group<d_Group>;
+def dead__strip : Flag<"-dead_strip">;
+def dependency_file : Separate<"-dependency-file">;
+def dumpmachine : Flag<"-dumpmachine">, Flags<[Unsupported]>;
+def dumpspecs : Flag<"-dumpspecs">, Flags<[Unsupported]>;
+def dumpversion : Flag<"-dumpversion">;
+def dylib__file : Separate<"-dylib_file">;
+def dylinker__install__name : JoinedOrSeparate<"-dylinker_install_name">;
+def dylinker : Flag<"-dylinker">;
+def dynamiclib : Flag<"-dynamiclib">;
+def dynamic : Flag<"-dynamic">, Flags<[NoArgumentUnused]>;
+def d_Flag : Flag<"-d">, Group<d_Group>;
+def d_Joined : Joined<"-d">, Group<d_Group>;
+def emit_ast : Flag<"-emit-ast">,
+ HelpText<"Emit Clang AST files for source inputs">;
+def emit_llvm : Flag<"-emit-llvm">,
+ HelpText<"Use the LLVM representation for assembler and object files">;
+def exported__symbols__list : Separate<"-exported_symbols_list">;
+def e : JoinedOrSeparate<"-e">;
+def fPIC : Flag<"-fPIC">, Group<f_Group>;
+def fPIE : Flag<"-fPIE">, Group<f_Group>;
+def fapple_kext : Flag<"-fapple-kext">, Group<f_Group>;
+def fasm_blocks : Flag<"-fasm-blocks">, Group<clang_ignored_f_Group>;
+def fastcp : Flag<"-fastcp">, Group<f_Group>;
+def fastf : Flag<"-fastf">, Group<f_Group>;
+def fast : Flag<"-fast">, Group<f_Group>;
+def fasynchronous_unwind_tables : Flag<"-fasynchronous-unwind-tables">, Group<f_Group>;
+def fblock_introspection : Flag<"-fblock-introspection">, Group<f_Group>;
+def fblocks : Flag<"-fblocks">, Group<f_Group>;
+def fbootclasspath_EQ : Joined<"-fbootclasspath=">, Group<f_Group>;
+def fbuiltin_strcat : Flag<"-fbuiltin-strcat">, Group<f_Group>;
+def fbuiltin_strcpy : Flag<"-fbuiltin-strcpy">, Group<f_Group>;
+def fbuiltin : Flag<"-fbuiltin">, Group<f_Group>;
+def fclasspath_EQ : Joined<"-fclasspath=">, Group<f_Group>;
+def fcolor_diagnostics : Flag<"-fcolor-diagnostics">, Group<f_Group>;
+def fcommon : Flag<"-fcommon">, Group<f_Group>;
+def fcompile_resource_EQ : Joined<"-fcompile-resource=">, Group<f_Group>;
+def fconstant_cfstrings : Flag<"-fconstant-cfstrings">, Group<clang_ignored_f_Group>;
+def fconstant_string_class_EQ : Joined<"-fconstant-string-class=">, Group<f_Group>;
+def fcreate_profile : Flag<"-fcreate-profile">, Group<f_Group>;
+def fdebug_pass_arguments : Flag<"-fdebug-pass-arguments">, Group<f_Group>;
+def fdebug_pass_structure : Flag<"-fdebug-pass-structure">, Group<f_Group>;
+def fdiagnostics_fixit_info : Flag<"-fdiagnostics-fixit-info">, Group<f_Group>;
+def fdiagnostics_print_source_range_info : Flag<"-fdiagnostics-print-source-range-info">, Group<f_Group>;
+def fdiagnostics_show_option : Flag<"-fdiagnostics-show-option">, Group<f_Group>;
+def fdollars_in_identifiers : Flag<"-fdollars-in-identifiers">, Group<f_Group>;
+def feliminate_unused_debug_symbols : Flag<"-feliminate-unused-debug-symbols">, Group<f_Group>;
+def femit_all_decls : Flag<"-femit-all-decls">, Group<f_Group>;
+def fencoding_EQ : Joined<"-fencoding=">, Group<f_Group>;
+def fexceptions : Flag<"-fexceptions">, Group<f_Group>;
+def fextdirs_EQ : Joined<"-fextdirs=">, Group<f_Group>;
+def ffreestanding : Flag<"-ffreestanding">, Group<f_Group>;
+def fgnu_runtime : Flag<"-fgnu-runtime">, Group<f_Group>;
+def fheinous_gnu_extensions : Flag<"-fheinous-gnu-extensions">;
+def filelist : Separate<"-filelist">, Flags<[LinkerInput]>;
+def findirect_virtual_calls : Flag<"-findirect-virtual-calls">, Group<f_Group>;
+def finline_functions : Flag<"-finline-functions">, Group<clang_ignored_f_Group>;
+def finline : Flag<"-finline">, Group<clang_ignored_f_Group>;
+def fkeep_inline_functions : Flag<"-fkeep-inline-functions">, Group<clang_ignored_f_Group>;
+def flat__namespace : Flag<"-flat_namespace">;
+def flax_vector_conversions : Flag<"-flax-vector-conversions">, Group<f_Group>;
+def flimited_precision_EQ : Joined<"-flimited-precision=">, Group<f_Group>;
+def flto : Flag<"-flto">, Group<f_Group>;
+def fmath_errno : Flag<"-fmath-errno">, Group<f_Group>;
+def fmerge_all_constants : Flag<"-fmerge-all-constants">, Group<f_Group>;
+def fmessage_length_EQ : Joined<"-fmessage-length=">, Group<f_Group>;
+def fms_extensions : Flag<"-fms-extensions">, Group<f_Group>;
+def fmudflapth : Flag<"-fmudflapth">, Group<f_Group>;
+def fmudflap : Flag<"-fmudflap">, Group<f_Group>;
+def fnested_functions : Flag<"-fnested-functions">, Group<f_Group>;
+def fnext_runtime : Flag<"-fnext-runtime">, Group<f_Group>;
+def fno_asynchronous_unwind_tables : Flag<"-fno-asynchronous-unwind-tables">, Group<f_Group>;
+def fno_blocks : Flag<"-fno-blocks">, Group<f_Group>;
+def fno_builtin_strcat : Flag<"-fno-builtin-strcat">, Group<f_Group>;
+def fno_builtin_strcpy : Flag<"-fno-builtin-strcpy">, Group<f_Group>;
+def fno_builtin : Flag<"-fno-builtin">, Group<f_Group>;
+def fno_caret_diagnostics : Flag<"-fno-caret-diagnostics">, Group<f_Group>;
+def fno_color_diagnostics : Flag<"-fno-color-diagnostics">, Group<f_Group>;
+def fno_common : Flag<"-fno-common">, Group<f_Group>;
+def fno_constant_cfstrings : Flag<"-fno-constant-cfstrings">, Group<f_Group>;
+def fno_diagnostics_fixit_info : Flag<"-fno-diagnostics-fixit-info">, Group<f_Group>;
+def fno_diagnostics_show_option : Flag<"-fno-diagnostics-show-option">, Group<f_Group>;
+def fno_dollars_in_identifiers : Flag<"-fno-dollars-in-identifiers">, Group<f_Group>;
+def fno_eliminate_unused_debug_symbols : Flag<"-fno-eliminate-unused-debug-symbols">, Group<f_Group>;
+def fno_exceptions : Flag<"-fno-exceptions">, Group<f_Group>;
+def fno_inline_functions : Flag<"-fno-inline-functions">, Group<clang_ignored_f_Group>;
+def fno_inline : Flag<"-fno-inline">, Group<clang_ignored_f_Group>;
+def fno_keep_inline_functions : Flag<"-fno-keep-inline-functions">, Group<clang_ignored_f_Group>;
+def fno_math_errno : Flag<"-fno-math-errno">, Group<f_Group>;
+def fno_merge_all_constants : Flag<"-fno-merge-all-constants">, Group<f_Group>;
+def fno_ms_extensions : Flag<"-fno-ms-extensions">, Group<f_Group>;
+def fno_omit_frame_pointer : Flag<"-fno-omit-frame-pointer">, Group<f_Group>;
+def fno_pascal_strings : Flag<"-fno-pascal-strings">, Group<f_Group>;
+def fno_rtti : Flag<"-fno-rtti">, Group<f_Group>;
+def fno_show_column : Flag<"-fno-show-column">, Group<f_Group>;
+def fno_show_source_location : Flag<"-fno-show-source-location">, Group<f_Group>;
+def fno_stack_protector : Flag<"-fno-stack-protector">, Group<f_Group>;
+def fno_strict_aliasing : Flag<"-fno-strict-aliasing">, Group<clang_ignored_f_Group>;
+def fno_unit_at_a_time : Flag<"-fno-unit-at-a-time">, Group<f_Group>;
+def fno_unwind_tables : Flag<"-fno-unwind-tables">, Group<f_Group>;
+def fno_working_directory : Flag<"-fno-working-directory">, Group<f_Group>;
+def fno_zero_initialized_in_bss : Flag<"-fno-zero-initialized-in-bss">, Group<f_Group>;
+def fobjc_atdefs : Flag<"-fobjc-atdefs">, Group<clang_ignored_f_Group>;
+def fobjc_call_cxx_cdtors : Flag<"-fobjc-call-cxx-cdtors">, Group<clang_ignored_f_Group>;
+def fobjc_gc_only : Flag<"-fobjc-gc-only">, Group<f_Group>;
+def fobjc_gc : Flag<"-fobjc-gc">, Group<f_Group>;
+def fobjc_new_property : Flag<"-fobjc-new-property">, Group<clang_ignored_f_Group>;
+def fobjc_nonfragile_abi : Flag<"-fobjc-nonfragile-abi">, Group<f_Group>;
+def fobjc_sender_dependent_dispatch : Flag<"-fobjc-sender-dependent-dispatch">, Group<f_Group>;
+def fobjc : Flag<"-fobjc">, Group<f_Group>;
+def fomit_frame_pointer : Flag<"-fomit-frame-pointer">, Group<f_Group>;
+def fopenmp : Flag<"-fopenmp">, Group<f_Group>;
+def force__cpusubtype__ALL : Flag<"-force_cpusubtype_ALL">;
+def force__flat__namespace : Flag<"-force_flat_namespace">;
+def foutput_class_dir_EQ : Joined<"-foutput-class-dir=">, Group<f_Group>;
+def fpascal_strings : Flag<"-fpascal-strings">, Group<f_Group>;
+def fpch_preprocess : Flag<"-fpch-preprocess">, Group<f_Group>;
+def fpic : Flag<"-fpic">, Group<f_Group>;
+def fpie : Flag<"-fpie">, Group<f_Group>;
+def fprofile_arcs : Flag<"-fprofile-arcs">, Group<f_Group>;
+def fprofile_generate : Flag<"-fprofile-generate">, Group<f_Group>;
+def framework : Separate<"-framework">, Flags<[LinkerInput]>;
+def frtti : Flag<"-frtti">, Group<f_Group>;
+def fshort_wchar : Flag<"-fshort-wchar">, Group<f_Group>;
+def fshow_source_location : Flag<"-fshow-source-location">, Group<f_Group>;
+def fsigned_bitfields : Flag<"-fsigned-bitfields">, Group<f_Group>;
+def fsigned_char : Flag<"-fsigned-char">, Group<f_Group>;
+def fstack_protector_all : Flag<"-fstack-protector-all">, Group<f_Group>;
+def fstack_protector : Flag<"-fstack-protector">, Group<f_Group>;
+def fstrict_aliasing : Flag<"-fstrict-aliasing">, Group<clang_ignored_f_Group>;
+def fsyntax_only : Flag<"-fsyntax-only">, Flags<[DriverOption]>;
+def ftemplate_depth_ : Joined<"-ftemplate-depth-">, Group<f_Group>;
+def fterminated_vtables : Flag<"-fterminated-vtables">, Group<f_Group>;
+def ftime_report : Flag<"-ftime-report">, Group<f_Group>;
+def ftrapv : Flag<"-ftrapv">, Group<f_Group>;
+def funit_at_a_time : Flag<"-funit-at-a-time">, Group<f_Group>;
+def funsigned_bitfields : Flag<"-funsigned-bitfields">, Group<f_Group>;
+def funsigned_char : Flag<"-funsigned-char">, Group<f_Group>;
+def funwind_tables : Flag<"-funwind-tables">, Group<f_Group>;
+def fverbose_asm : Flag<"-fverbose-asm">, Group<f_Group>;
+def fvisibility_EQ : Joined<"-fvisibility=">, Group<f_Group>;
+def fwritable_strings : Flag<"-fwritable-strings">, Group<f_Group>;
+def fzero_initialized_in_bss : Flag<"-fzero-initialized-in-bss">, Group<f_Group>;
+def f : Joined<"-f">, Group<f_Group>;
+def g0 : Joined<"-g0">, Group<g_Group>;
+def g3 : Joined<"-g3">, Group<g_Group>;
+def gfull : Joined<"-gfull">, Group<g_Group>;
+def gstabs : Joined<"-gstabs">, Group<g_Group>;
+def gused : Joined<"-gused">, Group<g_Group>;
+def g_Flag : Flag<"-g">, Group<g_Group>;
+def g_Joined : Joined<"-g">, Group<g_Group>;
+def headerpad__max__install__names : Joined<"-headerpad_max_install_names">;
+def idirafter : JoinedOrSeparate<"-idirafter">, Group<clang_i_Group>;
+def iframework : JoinedOrSeparate<"-iframework">, Group<clang_i_Group>;
+def imacros : JoinedOrSeparate<"-imacros">, Group<clang_i_Group>;
+def image__base : Separate<"-image_base">;
+def include_ : JoinedOrSeparate<"-include">, Group<clang_i_Group>, EnumName<"include">;
+def init : Separate<"-init">;
+def install__name : Separate<"-install_name">;
+def iprefix : JoinedOrSeparate<"-iprefix">, Group<clang_i_Group>;
+def iquote : JoinedOrSeparate<"-iquote">, Group<clang_i_Group>;
+def isysroot : JoinedOrSeparate<"-isysroot">, Group<i_Group>;
+def isystem : JoinedOrSeparate<"-isystem">, Group<clang_i_Group>;
+def iwithprefixbefore : JoinedOrSeparate<"-iwithprefixbefore">, Group<clang_i_Group>;
+def iwithprefix : JoinedOrSeparate<"-iwithprefix">, Group<clang_i_Group>;
+def iwithsysroot : JoinedOrSeparate<"-iwithsysroot">, Group<i_Group>;
+def i : Joined<"-i">, Group<i_Group>;
+def keep__private__externs : Flag<"-keep_private_externs">;
+def l : JoinedOrSeparate<"-l">, Flags<[LinkerInput]>;
+def m32 : Flag<"-m32">, Group<m_Group>, Flags<[DriverOption]>;
+def m3dnowa : Flag<"-m3dnowa">, Group<m_x86_Features_Group>;
+def m3dnow : Flag<"-m3dnow">, Group<m_x86_Features_Group>;
+def m64 : Flag<"-m64">, Group<m_Group>, Flags<[DriverOption]>;
+def mabi_EQ : Joined<"-mabi=">, Group<m_Group>, Flags<[DriverOption]>;
+def march_EQ : Joined<"-march=">, Group<m_Group>, Flags<[DriverOption]>;
+def mcmodel_EQ : Joined<"-mcmodel=">, Group<m_Group>, Flags<[DriverOption]>;
+def mconstant_cfstrings : Flag<"-mconstant-cfstrings">, Group<clang_ignored_m_Group>;
+def mcpu_EQ : Joined<"-mcpu=">, Group<m_Group>, Flags<[DriverOption]>;
+def mdynamic_no_pic : Joined<"-mdynamic-no-pic">, Group<m_Group>, Flags<[NoArgumentUnused]>;
+def mfix_and_continue : Flag<"-mfix-and-continue">, Group<clang_ignored_m_Group>;
+def mfloat_abi_EQ : Joined<"-mfloat-abi=">, Group<m_Group>;
+def mhard_float : Flag<"-mhard-float">, Group<m_Group>;
+def miphoneos_version_min_EQ : Joined<"-miphoneos-version-min=">, Group<m_Group>;
+def mkernel : Flag<"-mkernel">, Group<m_Group>;
+def mllvm : Separate<"-mllvm">;
+def mmacosx_version_min_EQ : Joined<"-mmacosx-version-min=">, Group<m_Group>;
+def mmmx : Flag<"-mmmx">, Group<m_x86_Features_Group>;
+def mno_3dnowa : Flag<"-mno-3dnowa">, Group<m_x86_Features_Group>;
+def mno_3dnow : Flag<"-mno-3dnow">, Group<m_x86_Features_Group>;
+def mno_constant_cfstrings : Flag<"-mno-constant-cfstrings">, Group<m_Group>;
+def mno_mmx : Flag<"-mno-mmx">, Group<m_x86_Features_Group>;
+def mno_pascal_strings : Flag<"-mno-pascal-strings">, Group<m_Group>;
+def mno_red_zone : Flag<"-mno-red-zone">, Group<m_Group>;
+def mno_soft_float : Flag<"-mno-soft-float">, Group<m_Group>;
+def mno_sse2 : Flag<"-mno-sse2">, Group<m_x86_Features_Group>;
+def mno_sse3 : Flag<"-mno-sse3">, Group<m_x86_Features_Group>;
+def mno_sse4a : Flag<"-mno-sse4a">, Group<m_x86_Features_Group>;
+def mno_sse4 : Flag<"-mno-sse4">, Group<m_x86_Features_Group>;
+def mno_sse : Flag<"-mno-sse">, Group<m_x86_Features_Group>;
+def mno_ssse3 : Flag<"-mno-ssse3">, Group<m_x86_Features_Group>;
+def mno_thumb : Flag<"-mno-thumb">, Group<m_Group>;
+def mno_warn_nonportable_cfstrings : Flag<"-mno-warn-nonportable-cfstrings">, Group<m_Group>;
+def mpascal_strings : Flag<"-mpascal-strings">, Group<m_Group>;
+def mred_zone : Flag<"-mred-zone">, Group<m_Group>;
+def msoft_float : Flag<"-msoft-float">, Group<m_Group>;
+def msse2 : Flag<"-msse2">, Group<m_x86_Features_Group>;
+def msse3 : Flag<"-msse3">, Group<m_x86_Features_Group>;
+def msse4a : Flag<"-msse4a">, Group<m_x86_Features_Group>;
+def msse4 : Flag<"-msse4">, Group<m_x86_Features_Group>;
+def msse : Flag<"-msse">, Group<m_x86_Features_Group>;
+def mssse3 : Flag<"-mssse3">, Group<m_x86_Features_Group>;
+def mthumb : Flag<"-mthumb">, Group<m_Group>;
+def mtune_EQ : Joined<"-mtune=">, Group<m_Group>;
+def multi__module : Flag<"-multi_module">;
+def multiply__defined__unused : Separate<"-multiply_defined_unused">;
+def multiply__defined : Separate<"-multiply_defined">;
+def mwarn_nonportable_cfstrings : Flag<"-mwarn-nonportable-cfstrings">, Group<m_Group>;
+def m_Separate : Separate<"-m">, Group<m_Group>;
+def m_Joined : Joined<"-m">, Group<m_Group>;
+def no_cpp_precomp : Flag<"-no-cpp-precomp">;
+def no_integrated_cpp : Flag<"-no-integrated-cpp">, Flags<[DriverOption]>;
+def no__dead__strip__inits__and__terms : Flag<"-no_dead_strip_inits_and_terms">;
+def nobuiltininc : Flag<"-nobuiltininc">;
+def nodefaultlibs : Flag<"-nodefaultlibs">;
+def nofixprebinding : Flag<"-nofixprebinding">;
+def nolibc : Flag<"-nolibc">;
+def nomultidefs : Flag<"-nomultidefs">;
+def noprebind : Flag<"-noprebind">;
+def noseglinkedit : Flag<"-noseglinkedit">;
+def nostartfiles : Flag<"-nostartfiles">;
+def nostdinc : Flag<"-nostdinc">;
+def nostdlib : Flag<"-nostdlib">;
+def object : Flag<"-object">;
+def o : JoinedOrSeparate<"-o">, Flags<[DriverOption, RenderAsInput]>,
+ HelpText<"Write output to <file>">, MetaVarName<"<file>">;
+def pagezero__size : JoinedOrSeparate<"-pagezero_size">;
+def pass_exit_codes : Flag<"-pass-exit-codes">, Flags<[Unsupported]>;
+def pedantic_errors : Flag<"-pedantic-errors">, Group<pedantic_Group>;
+def pedantic : Flag<"-pedantic">, Group<pedantic_Group>;
+def pg : Flag<"-pg">;
+def pipe : Flag<"-pipe">,
+ HelpText<"Use pipes between commands, when possible">;
+def prebind__all__twolevel__modules : Flag<"-prebind_all_twolevel_modules">;
+def prebind : Flag<"-prebind">;
+def preload : Flag<"-preload">;
+def print_file_name_EQ : Joined<"-print-file-name=">,
+ HelpText<"Print the full library path of <file>">, MetaVarName<"<file>">;
+def print_ivar_layout : Flag<"-print-ivar-layout">;
+def print_libgcc_file_name : Flag<"-print-libgcc-file-name">,
+ HelpText<"Print the library path for \"libgcc.a\"">;
+def print_multi_directory : Flag<"-print-multi-directory">;
+def print_multi_lib : Flag<"-print-multi-lib">;
+def print_multi_os_directory : Flag<"-print-multi-os-directory">;
+def print_prog_name_EQ : Joined<"-print-prog-name=">,
+ HelpText<"Print the full program path of <name>">, MetaVarName<"<name>">;
+def print_search_dirs : Flag<"-print-search-dirs">,
+ HelpText<"Print the paths used for finding libraries and programs">;
+def private__bundle : Flag<"-private_bundle">;
+def pthreads : Flag<"-pthreads">;
+def pthread : Flag<"-pthread">;
+def p : Flag<"-p">;
+def read__only__relocs : Separate<"-read_only_relocs">;
+def remap : Flag<"-remap">;
+def rpath : Separate<"-rpath">, Flags<[LinkerInput]>;
+def r : Flag<"-r">;
+def save_temps : Flag<"-save-temps">, Flags<[DriverOption]>,
+ HelpText<"Save intermediate compilation results">;
+def sectalign : MultiArg<"-sectalign", 3>;
+def sectcreate : MultiArg<"-sectcreate", 3>;
+def sectobjectsymbols : MultiArg<"-sectobjectsymbols", 2>;
+def sectorder : MultiArg<"-sectorder", 3>;
+def seg1addr : JoinedOrSeparate<"-seg1addr">;
+def seg__addr__table__filename : Separate<"-seg_addr_table_filename">;
+def seg__addr__table : Separate<"-seg_addr_table">;
+def segaddr : MultiArg<"-segaddr", 2>;
+def segcreate : MultiArg<"-segcreate", 3>;
+def seglinkedit : Flag<"-seglinkedit">;
+def segprot : MultiArg<"-segprot", 3>;
+def segs__read__only__addr : Separate<"-segs_read_only_addr">;
+def segs__read__write__addr : Separate<"-segs_read_write_addr">;
+def segs__read__ : Joined<"-segs_read_">;
+def shared_libgcc : Flag<"-shared-libgcc">;
+def shared : Flag<"-shared">;
+def single__module : Flag<"-single_module">;
+def specs_EQ : Joined<"-specs=">;
+def specs : Separate<"-specs">, Flags<[Unsupported]>;
+def static_libgcc : Flag<"-static-libgcc">;
+def static : Flag<"-static">, Flags<[NoArgumentUnused]>;
+def std_default_EQ : Joined<"-std-default=">;
+def std_EQ : Joined<"-std=">;
+def sub__library : JoinedOrSeparate<"-sub_library">;
+def sub__umbrella : JoinedOrSeparate<"-sub_umbrella">;
+def s : Flag<"-s">;
+def time : Flag<"-time">,
+ HelpText<"Time individual commands">;
+def traditional_cpp : Flag<"-traditional-cpp">;
+def traditional : Flag<"-traditional">;
+def trigraphs : Flag<"-trigraphs">;
+def twolevel__namespace__hints : Flag<"-twolevel_namespace_hints">;
+def twolevel__namespace : Flag<"-twolevel_namespace">;
+def t : Flag<"-t">;
+def umbrella : Separate<"-umbrella">;
+def undefined : JoinedOrSeparate<"-undefined">, Group<u_Group>;
+def undef : Flag<"-undef">, Group<u_Group>;
+def unexported__symbols__list : Separate<"-unexported_symbols_list">;
+def u : JoinedOrSeparate<"-u">, Group<u_Group>;
+def v : Flag<"-v">,
+ HelpText<"Show commands to run and use verbose output">;
+def weak_l : Joined<"-weak-l">, Flags<[LinkerInput]>;
+def weak__framework : Separate<"-weak_framework">, Flags<[LinkerInput]>;
+def weak__library : Separate<"-weak_library">, Flags<[LinkerInput]>;
+def weak__reference__mismatches : Separate<"-weak_reference_mismatches">;
+def whatsloaded : Flag<"-whatsloaded">;
+def whyload : Flag<"-whyload">;
+def w : Flag<"-w">;
+def x : JoinedOrSeparate<"-x">, Flags<[DriverOption]>,
+ HelpText<"Treat subsequent input files as having type <language>">,
+ MetaVarName<"<language>">;
+def y : Joined<"-y">;
+
+// Double dash options, which are usually an alias for one of the previous
+// options.
+
+def _CLASSPATH_EQ : Joined<"--CLASSPATH=">, Alias<fclasspath_EQ>;
+def _CLASSPATH : Separate<"--CLASSPATH">, Alias<fclasspath_EQ>, Flags<[RenderJoined]>;
+def _all_warnings : Flag<"--all-warnings">, Alias<Wall>;
+def _analyze_auto : Flag<"--analyze-auto">, Flags<[DriverOption]>;
+def _analyzer_no_default_checks : Flag<"--analyzer-no-default-checks">, Flags<[DriverOption]>;
+def _analyzer_output : JoinedOrSeparate<"--analyzer-output">, Flags<[DriverOption]>;
+def _analyze : Flag<"--analyze">, Flags<[DriverOption]>,
+ HelpText<"Run the static analyzer">;
+def _ansi : Flag<"--ansi">, Alias<ansi>;
+def _assemble : Flag<"--assemble">, Alias<S>;
+def _assert_EQ : Joined<"--assert=">, Alias<A>, Flags<[RenderSeparate]>;
+def _assert : Separate<"--assert">, Alias<A>;
+def _bootclasspath_EQ : Joined<"--bootclasspath=">, Alias<fbootclasspath_EQ>;
+def _bootclasspath : Separate<"--bootclasspath">, Alias<fbootclasspath_EQ>, Flags<[RenderJoined]>;
+def _classpath_EQ : Joined<"--classpath=">, Alias<fclasspath_EQ>;
+def _classpath : Separate<"--classpath">, Alias<fclasspath_EQ>, Flags<[RenderJoined]>;
+def _combine : Flag<"--combine">, Alias<combine>, Flags<[Unsupported]>;
+def _comments_in_macros : Flag<"--comments-in-macros">, Alias<CC>;
+def _comments : Flag<"--comments">, Alias<C>;
+def _compile : Flag<"--compile">, Alias<c>;
+def _constant_cfstrings : Flag<"--constant-cfstrings">;
+def _coverage : Flag<"--coverage">, Alias<coverage>;
+def _debug_EQ : Joined<"--debug=">, Alias<g_Flag>, Flags<[Unsupported]>;
+def _debug : Flag<"--debug">, Alias<g_Flag>, Flags<[Unsupported]>;
+def _define_macro_EQ : Joined<"--define-macro=">, Alias<D>;
+def _define_macro : Separate<"--define-macro">, Alias<D>, Flags<[RenderJoined]>;
+def _dependencies : Flag<"--dependencies">, Alias<M>;
+def _encoding_EQ : Joined<"--encoding=">, Alias<fencoding_EQ>;
+def _encoding : Separate<"--encoding">, Alias<fencoding_EQ>, Flags<[RenderJoined]>;
+def _entry : Flag<"--entry">, Alias<e>;
+def _extdirs_EQ : Joined<"--extdirs=">, Alias<fextdirs_EQ>;
+def _extdirs : Separate<"--extdirs">, Alias<fextdirs_EQ>, Flags<[RenderJoined]>;
+def _extra_warnings : Flag<"--extra-warnings">, Alias<W_Joined>;
+def _for_linker_EQ : Joined<"--for-linker=">, Alias<Xlinker>, Flags<[LinkerInput, RenderAsInput, RenderSeparate]>;
+def _for_linker : Separate<"--for-linker">, Alias<Xlinker>, Flags<[LinkerInput, RenderAsInput]>;
+def _force_link_EQ : Joined<"--force-link=">, Alias<u>, Flags<[RenderSeparate]>;
+def _force_link : Separate<"--force-link">, Alias<u>;
+def _help_hidden : Flag<"--help-hidden">;
+def _help : Flag<"--help">,
+ HelpText<"Display available options">;
+def _imacros_EQ : Joined<"--imacros=">, Alias<imacros>, Flags<[RenderSeparate]>;
+def _imacros : Separate<"--imacros">, Alias<imacros>;
+def _include_barrier : Flag<"--include-barrier">, Alias<I_>;
+def _include_directory_after_EQ : Joined<"--include-directory-after=">, Alias<idirafter>, Flags<[RenderSeparate]>;
+def _include_directory_after : Separate<"--include-directory-after">, Alias<idirafter>;
+def _include_directory_EQ : Joined<"--include-directory=">, Alias<I>;
+def _include_directory : Separate<"--include-directory">, Alias<I>, Flags<[RenderJoined]>;
+def _include_prefix_EQ : Joined<"--include-prefix=">, Alias<iprefix>, Flags<[RenderSeparate]>;
+def _include_prefix : Separate<"--include-prefix">, Alias<iprefix>;
+def _include_with_prefix_after_EQ : Joined<"--include-with-prefix-after=">, Alias<iwithprefix>, Flags<[RenderSeparate]>;
+def _include_with_prefix_after : Separate<"--include-with-prefix-after">, Alias<iwithprefix>;
+def _include_with_prefix_before_EQ : Joined<"--include-with-prefix-before=">, Alias<iwithprefixbefore>, Flags<[RenderSeparate]>;
+def _include_with_prefix_before : Separate<"--include-with-prefix-before">, Alias<iwithprefixbefore>;
+def _include_with_prefix_EQ : Joined<"--include-with-prefix=">, Alias<iwithprefix>, Flags<[RenderSeparate]>;
+def _include_with_prefix : Separate<"--include-with-prefix">, Alias<iwithprefix>;
+def _include_EQ : Joined<"--include=">, Alias<include_>, Flags<[RenderSeparate]>;
+def _include : Separate<"--include">, Alias<include_>;
+def _language_EQ : Joined<"--language=">, Alias<x>, Flags<[RenderSeparate]>;
+def _language : Separate<"--language">, Alias<x>;
+def _library_directory_EQ : Joined<"--library-directory=">, Alias<L>, Flags<[RenderSeparate]>;
+def _library_directory : Separate<"--library-directory">, Alias<L>;
+def _machine__EQ : Joined<"--machine-=">, Alias<m_Joined>, Flags<[Unsupported]>;
+def _machine_ : Joined<"--machine-">, Alias<m_Joined>, Flags<[Unsupported]>;
+def _machine_EQ : Joined<"--machine=">, Alias<m_Joined>;
+def _machine : Separate<"--machine">, Alias<m_Joined>, Flags<[RenderJoined]>;
+def _no_integrated_cpp : Flag<"--no-integrated-cpp">, Alias<no_integrated_cpp>;
+def _no_line_commands : Flag<"--no-line-commands">, Alias<P>;
+def _no_standard_includes : Flag<"--no-standard-includes">, Alias<nostdinc>;
+def _no_standard_libraries : Flag<"--no-standard-libraries">, Alias<nostdlib>;
+def _no_undefined : Flag<"--no-undefined">, Flags<[LinkerInput]>;
+def _no_warnings : Flag<"--no-warnings">, Alias<w>;
+def _optimize_EQ : Joined<"--optimize=">, Alias<O>, Flags<[Unsupported]>;
+def _optimize : Flag<"--optimize">, Alias<O>, Flags<[Unsupported]>;
+def _output_class_directory_EQ : Joined<"--output-class-directory=">, Alias<foutput_class_dir_EQ>;
+def _output_class_directory : Separate<"--output-class-directory">, Alias<foutput_class_dir_EQ>, Flags<[RenderJoined]>;
+def _output_EQ : Joined<"--output=">, Alias<o>, Flags<[RenderSeparate]>;
+def _output : Separate<"--output">, Alias<o>;
+def _param : Separate<"--param">;
+def _param_EQ : Joined<"--param=">, Alias<_param>, Flags<[RenderSeparate]>;
+def _pass_exit_codes : Flag<"--pass-exit-codes">, Alias<pass_exit_codes>;
+def _pedantic_errors : Flag<"--pedantic-errors">, Alias<pedantic_errors>;
+def _pedantic : Flag<"--pedantic">, Alias<pedantic>;
+def _pipe : Flag<"--pipe">, Alias<pipe>, Flags<[DriverOption]>;
+def _prefix_EQ : Joined<"--prefix=">, Alias<B>, Flags<[RenderSeparate]>;
+def _prefix : Separate<"--prefix">, Alias<B>;
+def _preprocess : Flag<"--preprocess">, Alias<E>;
+def _print_file_name_EQ : Joined<"--print-file-name=">, Alias<print_file_name_EQ>;
+def _print_file_name : Separate<"--print-file-name">, Alias<print_file_name_EQ>;
+def _print_libgcc_file_name : Flag<"--print-libgcc-file-name">, Alias<print_libgcc_file_name>;
+def _print_missing_file_dependencies : Flag<"--print-missing-file-dependencies">, Alias<MG>;
+def _print_multi_directory : Flag<"--print-multi-directory">, Alias<print_multi_directory>;
+def _print_multi_lib : Flag<"--print-multi-lib">, Alias<print_multi_lib>;
+def _print_multi_os_directory : Flag<"--print-multi-os-directory">, Alias<print_multi_os_directory>;
+def _print_prog_name_EQ : Joined<"--print-prog-name=">, Alias<print_prog_name_EQ>;
+def _print_prog_name : Separate<"--print-prog-name">, Alias<print_prog_name_EQ>;
+def _print_search_dirs : Flag<"--print-search-dirs">, Alias<print_search_dirs>;
+def _profile_blocks : Flag<"--profile-blocks">, Alias<a>;
+def _profile : Flag<"--profile">, Alias<p>;
+def _relocatable_pch : Flag<"--relocatable-pch">,
+ HelpText<"Build a relocatable precompiled header">;
+def _resource_EQ : Joined<"--resource=">, Alias<fcompile_resource_EQ>;
+def _resource : Separate<"--resource">, Alias<fcompile_resource_EQ>, Flags<[RenderJoined]>;
+def _save_temps : Flag<"--save-temps">, Alias<save_temps>;
+def _shared : Flag<"--shared">, Alias<shared>;
+def _signed_char : Flag<"--signed-char">, Alias<fsigned_char>;
+def _specs_EQ : Joined<"--specs=">, Alias<specs_EQ>, Flags<[Unsupported]>;
+def _specs : Separate<"--specs">, Alias<specs_EQ>, Flags<[RenderJoined, Unsupported]>;
+def _static : Flag<"--static">, Alias<static>;
+def _std_EQ : Joined<"--std=">, Alias<std_EQ>;
+def _std : Separate<"--std">, Alias<std_EQ>, Flags<[RenderJoined]>;
+def _sysroot_EQ : Joined<"--sysroot=">;
+def _sysroot : Separate<"--sysroot">, Alias<_sysroot_EQ>, Flags<[RenderJoined]>;
+def _target_help : Flag<"--target-help">;
+def _trace_includes : Flag<"--trace-includes">, Alias<H>;
+def _traditional_cpp : Flag<"--traditional-cpp">, Alias<traditional_cpp>;
+def _traditional : Flag<"--traditional">, Alias<traditional>;
+def _trigraphs : Flag<"--trigraphs">, Alias<trigraphs>;
+def _undefine_macro_EQ : Joined<"--undefine-macro=">, Alias<U>;
+def _undefine_macro : Separate<"--undefine-macro">, Alias<U>, Flags<[RenderJoined]>;
+def _unsigned_char : Flag<"--unsigned-char">, Alias<funsigned_char>;
+def _user_dependencies : Flag<"--user-dependencies">, Alias<MM>;
+def _verbose : Flag<"--verbose">, Alias<v>;
+def _version : Flag<"--version">;
+def _warn__EQ : Joined<"--warn-=">, Alias<W_Joined>, Flags<[Unsupported]>;
+def _warn_ : Joined<"--warn-">, Alias<W_Joined>, Flags<[Unsupported]>;
+def _write_dependencies : Flag<"--write-dependencies">, Alias<MD>;
+def _write_user_dependencies : Flag<"--write-user-dependencies">, Alias<MMD>;
+def _ : Joined<"--">, Alias<f>, Flags<[Unsupported]>;
diff --git a/include/clang/Frontend/CompileOptions.h b/include/clang/Frontend/CompileOptions.h
deleted file mode 100644
index ad53a8d592ba6..0000000000000
--- a/include/clang/Frontend/CompileOptions.h
+++ /dev/null
@@ -1,77 +0,0 @@
-//===--- CompileOptions.h ---------------------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines the CompileOptions interface.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_FRONTEND_COMPILEOPTIONS_H
-#define LLVM_CLANG_FRONTEND_COMPILEOPTIONS_H
-
-#include <string>
-#include <vector>
-
-namespace clang {
-
-/// CompileOptions - Track various options which control how the code
-/// is optimized and passed to the backend.
-class CompileOptions {
-public:
- enum InliningMethod {
- NoInlining, // Perform no inlining whatsoever.
- NormalInlining, // Use the standard function inlining pass.
- OnlyAlwaysInlining // Only run the always inlining pass.
- };
-
- unsigned OptimizationLevel : 3; /// The -O[0-4] option specified.
- unsigned OptimizeSize : 1; /// If -Os is specified.
- unsigned DebugInfo : 1; /// Should generate deubg info (-g).
- unsigned UnitAtATime : 1; /// Unused. For mirroring GCC
- /// optimization selection.
- unsigned SimplifyLibCalls : 1; /// Should standard library calls be
- /// treated specially.
- unsigned UnrollLoops : 1; /// Control whether loops are unrolled.
- unsigned VerifyModule : 1; /// Control whether the module
- /// should be run through the LLVM Verifier.
- unsigned TimePasses : 1; /// Set when -ftime-report is enabled.
- unsigned NoCommon : 1; /// Set when -fno-common or C++ is enabled.
- unsigned DisableRedZone : 1; /// Set when -mno-red-zone is enabled.
- unsigned NoImplicitFloat : 1; /// Set when -mno-implicit-float is enabled.
- unsigned MergeAllConstants : 1; // Merge identical constants.
-
- /// Inlining - The kind of inlining to perform.
- InliningMethod Inlining;
-
- /// CPU - An optional CPU to target.
- std::string CPU;
-
- /// Features - A list of subtarget features to pass to the code
- /// generator.
- std::vector<std::string> Features;
-
-public:
- CompileOptions() {
- OptimizationLevel = 0;
- OptimizeSize = 0;
- DebugInfo = 0;
- UnitAtATime = 1;
- SimplifyLibCalls = UnrollLoops = 0;
- VerifyModule = 1;
- TimePasses = 0;
- NoCommon = 0;
- Inlining = NoInlining;
- DisableRedZone = 0;
- NoImplicitFloat = 0;
- MergeAllConstants = 1;
- }
-};
-
-} // end namespace clang
-
-#endif
diff --git a/include/clang/Frontend/HeaderSearchOptions.h b/include/clang/Frontend/HeaderSearchOptions.h
index 2edc7e1f4ab43..67129775ac8d0 100644
--- a/include/clang/Frontend/HeaderSearchOptions.h
+++ b/include/clang/Frontend/HeaderSearchOptions.h
@@ -72,8 +72,8 @@ public:
unsigned Verbose : 1;
public:
- HeaderSearchOptions(llvm::StringRef _Sysroot = "")
- : Sysroot(_Sysroot), UseStandardIncludes(true) {}
+ HeaderSearchOptions(llvm::StringRef _Sysroot = "/")
+ : Sysroot(_Sysroot), UseStandardIncludes(true), Verbose(false) {}
/// AddPath - Add the \arg Path path to the specified \arg Group list.
void AddPath(llvm::StringRef Path, frontend::IncludeDirGroup Group,
diff --git a/include/clang/Frontend/InitHeaderSearch.h b/include/clang/Frontend/InitHeaderSearch.h
deleted file mode 100644
index 48c4268252624..0000000000000
--- a/include/clang/Frontend/InitHeaderSearch.h
+++ /dev/null
@@ -1,98 +0,0 @@
-//===--- InitHeaderSearch.h - Initialize header search paths ----*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines the InitHeaderSearch class.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_FRONTEND_INIT_HEADER_SEARCH_H_
-#define LLVM_CLANG_FRONTEND_INIT_HEADER_SEARCH_H_
-
-#include "clang/Lex/DirectoryLookup.h"
-#include "llvm/ADT/StringRef.h"
-#include "llvm/ADT/Triple.h"
-#include <string>
-#include <vector>
-
-namespace clang {
-
-class HeaderSearch;
-class LangOptions;
-
-/// InitHeaderSearch - This class makes it easier to set the search paths of
-/// a HeaderSearch object. InitHeaderSearch stores several search path lists
-/// internally, which can be sent to a HeaderSearch object in one swoop.
-class InitHeaderSearch {
- std::vector<DirectoryLookup> IncludeGroup[4];
- HeaderSearch& Headers;
- bool Verbose;
- std::string isysroot;
-
-public:
- /// InitHeaderSearch::IncludeDirGroup - Identifies the several search path
- /// lists stored internally.
- enum IncludeDirGroup {
- Quoted = 0, //< `#include ""` paths. Thing `gcc -iquote`.
- Angled, //< Paths for both `#include ""` and `#include <>`. (`-I`)
- System, //< Like Angled, but marks system directories.
- After //< Like System, but searched after the system directories.
- };
-
- InitHeaderSearch(HeaderSearch &HS,
- bool verbose = false, const std::string &iSysroot = "")
- : Headers(HS), Verbose(verbose), isysroot(iSysroot) {}
-
- /// AddPath - Add the specified path to the specified group list.
- void AddPath(const llvm::StringRef &Path, IncludeDirGroup Group,
- bool isCXXAware, bool isUserSupplied,
- bool isFramework, bool IgnoreSysRoot = false);
-
- /// AddEnvVarPaths - Add a list of paths from an environment variable to a
- /// header search list.
- void AddEnvVarPaths(const char *Name);
-
- /// AddGnuCPlusPlusIncludePaths - Add the necessary paths to suport a gnu
- /// libstdc++.
- void AddGnuCPlusPlusIncludePaths(const std::string &Base, const char *Dir32,
- const char *Dir64,
- const llvm::Triple &triple);
-
- /// AddMinGWCPlusPlusIncludePaths - Add the necessary paths to suport a MinGW
- /// libstdc++.
- void AddMinGWCPlusPlusIncludePaths(const std::string &Base,
- const char *Arch,
- const char *Version);
-
- /// AddDefaultEnvVarPaths - Adds list of paths from default environment
- /// variables such as CPATH.
- void AddDefaultEnvVarPaths(const LangOptions &Lang);
-
- // AddDefaultCIncludePaths - Add paths that should always be searched.
- void AddDefaultCIncludePaths(const llvm::Triple &triple);
-
- // AddDefaultCPlusPlusIncludePaths - Add paths that should be searched when
- // compiling c++.
- void AddDefaultCPlusPlusIncludePaths(const llvm::Triple &triple);
-
- // AddDefaultFrameworkIncludePaths - Add the framework paths. Used on darwin.
- void AddDefaultFrameworkIncludePaths(const llvm::Triple &triple);
-
- /// AddDefaultSystemIncludePaths - Adds the default system include paths so
- /// that e.g. stdio.h is found.
- void AddDefaultSystemIncludePaths(const LangOptions &Lang,
- const llvm::Triple &triple);
-
- /// Realize - Merges all search path lists into one list and send it to
- /// HeaderSearch.
- void Realize();
-};
-
-} // end namespace clang
-
-#endif
diff --git a/include/clang/Frontend/InitPreprocessor.h b/include/clang/Frontend/InitPreprocessor.h
deleted file mode 100644
index 415acea79a26c..0000000000000
--- a/include/clang/Frontend/InitPreprocessor.h
+++ /dev/null
@@ -1,79 +0,0 @@
-//===--- InitPreprocessor.h - InitializePreprocessor function. --*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines the clang::InitializePreprocessor function.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_FRONTEND_INIT_PREPROCESSOR_H_
-#define LLVM_CLANG_FRONTEND_INIT_PREPROCESSOR_H_
-
-#include <string>
-#include <vector>
-
-namespace clang {
-
-class Preprocessor;
-class LangOptions;
-
-/// PreprocessorInitOptions - This class is used for passing the various
-/// options used in preprocessor initialization to InitializePreprocessor().
-class PreprocessorInitOptions {
- std::vector<std::pair<std::string, bool/*isUndef*/> > Macros;
- std::vector<std::pair<std::string, bool/*isPTH*/> > Includes;
- std::vector<std::string> MacroIncludes;
-
- unsigned UsePredefines : 1; /// Initialize the preprocessor with the compiler
- /// and target specific predefines.
-
-public:
- PreprocessorInitOptions() : UsePredefines(true) {}
-
- bool getUsePredefines() const { return UsePredefines; }
- void setUsePredefines(bool Value) {
- UsePredefines = Value;
- }
-
- void addMacroDef(const std::string &Name) {
- Macros.push_back(std::make_pair(Name, false));
- }
- void addMacroUndef(const std::string &Name) {
- Macros.push_back(std::make_pair(Name, true));
- }
- void addInclude(const std::string &Name, bool isPTH = false) {
- Includes.push_back(std::make_pair(Name, isPTH));
- }
- void addMacroInclude(const std::string &Name) {
- MacroIncludes.push_back(Name);
- }
-
- typedef std::vector<std::pair<std::string,
- bool> >::const_iterator macro_iterator;
- macro_iterator macro_begin() const { return Macros.begin(); }
- macro_iterator macro_end() const { return Macros.end(); }
-
- typedef std::vector<std::pair<std::string,
- bool> >::const_iterator include_iterator;
- include_iterator include_begin() const { return Includes.begin(); }
- include_iterator include_end() const { return Includes.end(); }
-
- typedef std::vector<std::string>::const_iterator imacro_iterator;
- imacro_iterator imacro_begin() const { return MacroIncludes.begin(); }
- imacro_iterator imacro_end() const { return MacroIncludes.end(); }
-};
-
-/// InitializePreprocessor - Initialize the preprocessor getting it and the
-/// environment ready to process a single file.
-///
-void InitializePreprocessor(Preprocessor &PP,
- const PreprocessorInitOptions& InitOptions);
-
-} // end namespace clang
-
-#endif
diff --git a/include/clang/Frontend/ManagerRegistry.h b/include/clang/Frontend/ManagerRegistry.h
deleted file mode 100644
index f05cfe6df6b8d..0000000000000
--- a/include/clang/Frontend/ManagerRegistry.h
+++ /dev/null
@@ -1,53 +0,0 @@
-//===-- ManagerRegistry.h - Pluggable analyzer module registry --*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines the ManagerRegistry and Register* classes.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_FRONTEND_MANAGER_REGISTRY_H
-#define LLVM_CLANG_FRONTEND_MANAGER_REGISTRY_H
-
-#include "clang/Analysis/PathSensitive/GRState.h"
-
-namespace clang {
-
-/// ManagerRegistry - This class records manager creators registered at
-/// runtime. The information is communicated to AnalysisManager through static
-/// members. Better design is expected.
-
-class ManagerRegistry {
-public:
- static StoreManagerCreator StoreMgrCreator;
- static ConstraintManagerCreator ConstraintMgrCreator;
-};
-
-/// RegisterConstraintManager - This class is used to setup the constraint
-/// manager of the static analyzer. The constructor takes a creator function
-/// pointer for creating the constraint manager.
-///
-/// It is used like this:
-///
-/// class MyConstraintManager {};
-/// ConstraintManager* CreateMyConstraintManager(GRStateManager& statemgr) {
-/// return new MyConstraintManager(statemgr);
-/// }
-/// RegisterConstraintManager X(CreateMyConstraintManager);
-
-class RegisterConstraintManager {
-public:
- RegisterConstraintManager(ConstraintManagerCreator CMC) {
- assert(ManagerRegistry::ConstraintMgrCreator == 0
- && "ConstraintMgrCreator already set!");
- ManagerRegistry::ConstraintMgrCreator = CMC;
- }
-};
-
-}
-#endif
diff --git a/include/clang/Makefile b/include/clang/Makefile
index 82a16d53ea33e..624292a128ee4 100644
--- a/include/clang/Makefile
+++ b/include/clang/Makefile
@@ -1,4 +1,4 @@
LEVEL = ../../../..
-DIRS := Basic
+DIRS := Basic Driver
include $(LEVEL)/Makefile.common
diff --git a/include/clang/Parse/Action.h b/include/clang/Parse/Action.h
index a9b32133234a0..3d3232b6f68ea 100644
--- a/include/clang/Parse/Action.h
+++ b/include/clang/Parse/Action.h
@@ -2329,29 +2329,75 @@ public:
/// found after the left paren.
///
/// \param S the scope in which the operator keyword occurs.
- virtual void CodeCompleteObjCProperty(Scope *S, ObjCDeclSpec &ODS) { }
-
+ virtual void CodeCompleteObjCPropertyFlags(Scope *S, ObjCDeclSpec &ODS) { }
+
+ /// \brief Code completion for the getter of an Objective-C property
+ /// declaration.
+ ///
+ /// This code completion action is invoked when the code-completion
+ /// token is found after the "getter = " in a property declaration.
+ ///
+ /// \param S the scope in which the property is being declared.
+ ///
+ /// \param ClassDecl the Objective-C class or category in which the property
+ /// is being defined.
+ ///
+ /// \param Methods the set of methods declared thus far within \p ClassDecl.
+ ///
+ /// \param NumMethods the number of methods in \p Methods
+ virtual void CodeCompleteObjCPropertyGetter(Scope *S, DeclPtrTy ClassDecl,
+ DeclPtrTy *Methods,
+ unsigned NumMethods) {
+ }
+
+ /// \brief Code completion for the setter of an Objective-C property
+ /// declaration.
+ ///
+ /// This code completion action is invoked when the code-completion
+ /// token is found after the "setter = " in a property declaration.
+ ///
+ /// \param S the scope in which the property is being declared.
+ ///
+ /// \param ClassDecl the Objective-C class or category in which the property
+ /// is being defined.
+ ///
+ /// \param Methods the set of methods declared thus far within \p ClassDecl.
+ ///
+ /// \param NumMethods the number of methods in \p Methods
+ virtual void CodeCompleteObjCPropertySetter(Scope *S, DeclPtrTy ClassDecl,
+ DeclPtrTy *Methods,
+ unsigned NumMethods) {
+ }
+
/// \brief Code completion for an ObjC message expression that refers to
/// a class method.
///
/// This code completion action is invoked when the code-completion token is
- /// found after the class name.
+ /// found after the class name and after each argument.
///
/// \param S the scope in which the message expression occurs.
/// \param FName the factory name.
/// \param FNameLoc the source location of the factory name.
+ /// \param SelIdents the identifiers that describe the selector (thus far).
+ /// \param NumSelIdents the number of identifiers in \p SelIdents.
virtual void CodeCompleteObjCClassMessage(Scope *S, IdentifierInfo *FName,
- SourceLocation FNameLoc){ }
+ SourceLocation FNameLoc,
+ IdentifierInfo **SelIdents,
+ unsigned NumSelIdents){ }
/// \brief Code completion for an ObjC message expression that refers to
/// an instance method.
///
/// This code completion action is invoked when the code-completion token is
- /// found after the receiver expression.
+ /// found after the receiver expression and after each argument.
///
/// \param S the scope in which the operator keyword occurs.
/// \param Receiver an expression for the receiver of the message.
- virtual void CodeCompleteObjCInstanceMessage(Scope *S, ExprTy *Receiver) { }
+ /// \param SelIdents the identifiers that describe the selector (thus far).
+ /// \param NumSelIdents the number of identifiers in \p SelIdents.
+ virtual void CodeCompleteObjCInstanceMessage(Scope *S, ExprTy *Receiver,
+ IdentifierInfo **SelIdents,
+ unsigned NumSelIdents) { }
/// \brief Code completion for a list of protocol references in Objective-C,
/// such as P1 and P2 in \c id<P1,P2>.
@@ -2371,6 +2417,61 @@ public:
///
/// \param S the scope in which the protocol declaration occurs.
virtual void CodeCompleteObjCProtocolDecl(Scope *S) { }
+
+ /// \brief Code completion for an Objective-C interface, after the
+ /// @interface but before any identifier.
+ virtual void CodeCompleteObjCInterfaceDecl(Scope *S) { }
+
+ /// \brief Code completion for the superclass of an Objective-C
+ /// interface, after the ':'.
+ ///
+ /// \param S the scope in which the interface declaration occurs.
+ ///
+ /// \param ClassName the name of the class being defined.
+ virtual void CodeCompleteObjCSuperclass(Scope *S,
+ IdentifierInfo *ClassName) {
+ }
+
+ /// \brief Code completion for an Objective-C implementation, after the
+ /// @implementation but before any identifier.
+ virtual void CodeCompleteObjCImplementationDecl(Scope *S) { }
+
+ /// \brief Code completion for the category name in an Objective-C interface
+ /// declaration.
+ ///
+ /// This code completion action is invoked after the '(' that indicates
+ /// a category name within an Objective-C interface declaration.
+ virtual void CodeCompleteObjCInterfaceCategory(Scope *S,
+ IdentifierInfo *ClassName) {
+ }
+
+ /// \brief Code completion for the category name in an Objective-C category
+ /// implementation.
+ ///
+ /// This code completion action is invoked after the '(' that indicates
+ /// the category name within an Objective-C category implementation.
+ virtual void CodeCompleteObjCImplementationCategory(Scope *S,
+ IdentifierInfo *ClassName) {
+ }
+
+ /// \brief Code completion for the property names when defining an
+ /// Objective-C property.
+ ///
+ /// This code completion action is invoked after @synthesize or @dynamic and
+ /// after each "," within one of those definitions.
+ virtual void CodeCompleteObjCPropertyDefinition(Scope *S,
+ DeclPtrTy ObjCImpDecl) {
+ }
+
+ /// \brief Code completion for the instance variable name that should
+ /// follow an '=' when synthesizing an Objective-C property.
+ ///
+ /// This code completion action is invoked after each '=' that occurs within
+ /// an @synthesized definition.
+ virtual void CodeCompleteObjCPropertySynthesizeIvar(Scope *S,
+ IdentifierInfo *PropertyName,
+ DeclPtrTy ObjCImpDecl) {
+ }
//@}
};
diff --git a/include/clang/Parse/Parser.h b/include/clang/Parse/Parser.h
index e7dabdbd5b660..f7ccccac09525 100644
--- a/include/clang/Parse/Parser.h
+++ b/include/clang/Parse/Parser.h
@@ -810,7 +810,8 @@ private:
DeclPtrTy ParseObjCMethodDecl(SourceLocation mLoc, tok::TokenKind mType,
DeclPtrTy classDecl,
tok::ObjCKeywordKind MethodImplKind = tok::objc_not_keyword);
- void ParseObjCPropertyAttribute(ObjCDeclSpec &DS);
+ void ParseObjCPropertyAttribute(ObjCDeclSpec &DS, DeclPtrTy ClassDecl,
+ DeclPtrTy *Methods, unsigned NumMethods);
DeclPtrTy ParseObjCMethodDefinition();
diff --git a/include/clang/Sema/CodeCompleteConsumer.h b/include/clang/Sema/CodeCompleteConsumer.h
index 43ff6869184d9..ed747613c3856 100644
--- a/include/clang/Sema/CodeCompleteConsumer.h
+++ b/include/clang/Sema/CodeCompleteConsumer.h
@@ -123,6 +123,9 @@ public:
/// \brief Create a new current-parameter chunk.
static Chunk CreateCurrentParameter(llvm::StringRef CurrentParameter);
+ /// \brief Clone the given chunk.
+ Chunk Clone() const;
+
/// \brief Destroy this chunk, deallocating any memory it owns.
void Destroy();
};
@@ -192,15 +195,21 @@ public:
/// \brief Add a new chunk.
void AddChunk(Chunk C) { Chunks.push_back(C); }
+ /// \brief Returns the text in the TypedText chunk.
+ const char *getTypedText() const;
+
/// \brief Retrieve a string representation of the code completion string,
/// which is mainly useful for debugging.
std::string getAsString() const;
+ /// \brief Clone this code-completion string.
+ CodeCompletionString *Clone() const;
+
/// \brief Serialize this code-completion string to the given stream.
void Serialize(llvm::raw_ostream &OS) const;
/// \brief Deserialize a code-completion string from the given string.
- static CodeCompletionString *Deserialize(llvm::StringRef &Str);
+ static CodeCompletionString *Deserialize(llvm::StringRef &Str);
};
llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
@@ -220,7 +229,8 @@ public:
enum ResultKind {
RK_Declaration = 0, //< Refers to a declaration
RK_Keyword, //< Refers to a keyword or symbol.
- RK_Macro //< Refers to a macro
+ RK_Macro, //< Refers to a macro
+ RK_Pattern //< Refers to a precomputed pattern.
};
/// \brief The kind of result stored here.
@@ -235,6 +245,10 @@ public:
/// or symbol's spelling.
const char *Keyword;
+ /// \brief When Kind == RK_Pattern, the code-completion string that
+ /// describes the completion text to insert.
+ CodeCompletionString *Pattern;
+
/// \brief When Kind == RK_Macro, the identifier that refers to a macro.
IdentifierInfo *Macro;
};
@@ -243,6 +257,10 @@ public:
/// result and progressively higher numbers representing poorer results.
unsigned Rank;
+ /// \brief Specifiers which parameter (of a function, Objective-C method,
+ /// macro, etc.) we should start with when formatting the result.
+ unsigned StartParameter;
+
/// \brief Whether this result is hidden by another name.
bool Hidden : 1;
@@ -252,7 +270,11 @@ public:
/// \brief Whether this declaration is the beginning of a
/// nested-name-specifier and, therefore, should be followed by '::'.
bool StartsNestedNameSpecifier : 1;
-
+
+ /// \brief Whether all parameters (of a function, Objective-C
+ /// method, etc.) should be considered "informative".
+ bool AllParametersAreInformative : 1;
+
/// \brief If the result should have a nested-name-specifier, this is it.
/// When \c QualifierIsInformative, the nested-name-specifier is
/// informative rather than required.
@@ -263,20 +285,31 @@ public:
NestedNameSpecifier *Qualifier = 0,
bool QualifierIsInformative = false)
: Kind(RK_Declaration), Declaration(Declaration), Rank(Rank),
- Hidden(false), QualifierIsInformative(QualifierIsInformative),
- StartsNestedNameSpecifier(false), Qualifier(Qualifier) { }
+ StartParameter(0), Hidden(false),
+ QualifierIsInformative(QualifierIsInformative),
+ StartsNestedNameSpecifier(false), AllParametersAreInformative(false),
+ Qualifier(Qualifier) { }
/// \brief Build a result that refers to a keyword or symbol.
Result(const char *Keyword, unsigned Rank)
- : Kind(RK_Keyword), Keyword(Keyword), Rank(Rank), Hidden(false),
- QualifierIsInformative(0), StartsNestedNameSpecifier(false),
+ : Kind(RK_Keyword), Keyword(Keyword), Rank(Rank), StartParameter(0),
+ Hidden(false), QualifierIsInformative(0),
+ StartsNestedNameSpecifier(false), AllParametersAreInformative(false),
Qualifier(0) { }
/// \brief Build a result that refers to a macro.
Result(IdentifierInfo *Macro, unsigned Rank)
- : Kind(RK_Macro), Macro(Macro), Rank(Rank), Hidden(false),
- QualifierIsInformative(0), StartsNestedNameSpecifier(false),
+ : Kind(RK_Macro), Macro(Macro), Rank(Rank), StartParameter(0),
+ Hidden(false), QualifierIsInformative(0),
+ StartsNestedNameSpecifier(false), AllParametersAreInformative(false),
Qualifier(0) { }
+
+ /// \brief Build a result that refers to a pattern.
+ Result(CodeCompletionString *Pattern, unsigned Rank)
+ : Kind(RK_Pattern), Pattern(Pattern), Rank(Rank), StartParameter(0),
+ Hidden(false), QualifierIsInformative(0),
+ StartsNestedNameSpecifier(false), AllParametersAreInformative(false),
+ Qualifier(0) { }
/// \brief Retrieve the declaration stored in this result.
NamedDecl *getDeclaration() const {
@@ -293,6 +326,8 @@ public:
/// \brief Create a new code-completion string that describes how to insert
/// this result into a program.
CodeCompletionString *CreateCodeCompletionString(Sema &S);
+
+ void Destroy();
};
class OverloadCandidate {