#define CLANG_DRIVER_ARG_H_
#include "Util.h"
-#include "llvm/ADT/ilist_node.h"
namespace clang {
namespace driver {
/// instances have an intrusive double linked list which is used by
/// ArgList to provide efficient iteration over all instances of a
/// particular option.
- class Arg : public llvm::ilist_node<Arg> {
+ class Arg {
private:
enum ArgClass {
PositionalArg = 0,
#define CLANG_DRIVER_ARGLIST_H_
#include "Util.h"
-#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallVector.h"
namespace clang {
/// The full list of arguments.
arglist_type Args;
- /// A map of arguments by option ID; in conjunction with the
- /// intrusive list in Arg instances this allows iterating over all
- /// arguments for a particular option.
- llvm::DenseMap<unsigned, Arg*> ArgMap;
-
public:
ArgList(const char **ArgBegin, const char **ArgEnd);
ArgList(const ArgList &);
const_iterator begin() const { return Args.begin(); }
const_iterator end() const { return Args.end(); }
-
- Arg *getArgForID(unsigned ID) const {
- llvm::DenseMap<unsigned, Arg*>::iterator it = ArgMap.find(ID);
- if (it != ArgMap.end())
- return it->second;
- return 0;
- }
};
} // end namespace driver
} // end namespace clang