diff options
author | Chris Lattner <sabre@nondot.org> | 2002-07-24 22:08:36 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-07-24 22:08:36 +0000 |
commit | 7f4dd472e35569efefbeffef096c490075e3e824 (patch) | |
tree | 0648cc581fe63945f426ca9e07d9087fdd350aa8 /include | |
parent | 24e9872732dd8b3c0422dd8679de3969d495b74b (diff) | |
download | external_llvm-7f4dd472e35569efefbeffef096c490075e3e824.zip external_llvm-7f4dd472e35569efefbeffef096c490075e3e824.tar.gz external_llvm-7f4dd472e35569efefbeffef096c490075e3e824.tar.bz2 |
Changes to build with GCC 3.1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3064 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/Support/CommandLine.h | 22 | ||||
-rw-r--r-- | include/Support/DepthFirstIterator.h | 8 | ||||
-rw-r--r-- | include/llvm/ADT/DepthFirstIterator.h | 8 | ||||
-rw-r--r-- | include/llvm/Support/CommandLine.h | 22 |
4 files changed, 32 insertions, 28 deletions
diff --git a/include/Support/CommandLine.h b/include/Support/CommandLine.h index 633227a..3c9d9b0 100644 --- a/include/Support/CommandLine.h +++ b/include/Support/CommandLine.h @@ -403,8 +403,8 @@ public: // Default implementation, requires user to populate it with values somehow. template<class Opt> // parse - Return true on error. - bool parse(Opt &O, const char *ArgName, const string &Arg) { - string ArgVal; + bool parse(Opt &O, const char *ArgName, const std::string &Arg) { + std::string ArgVal; if (hasArgStr) ArgVal = Arg; else @@ -441,11 +441,11 @@ public: // template<> class parser<bool> { - static bool parseImpl(Option &O, const string &Arg, bool &Val); + static bool parseImpl(Option &O, const std::string &Arg, bool &Val); public: template<class Opt> // parse - Return true on error. - bool parse(Opt &O, const char *ArgName, const string &Arg) { + bool parse(Opt &O, const char *ArgName, const std::string &Arg) { bool Val; bool Error = parseImpl(O, Arg, Val); if (!Error) O.addValue(Val); @@ -473,12 +473,12 @@ public: // template<> class parser<int> { - static bool parseImpl(Option &O, const string &Arg, int &Val); + static bool parseImpl(Option &O, const std::string &Arg, int &Val); public: // parse - Return true on error. template<class Opt> - bool parse(Opt &O, const char *ArgName, const string &Arg) { + bool parse(Opt &O, const char *ArgName, const std::string &Arg) { int Val; bool Error = parseImpl(O, Arg, Val); if (!Error) O.addValue(Val); @@ -506,12 +506,12 @@ public: // template<> class parser<double> { - static bool parseImpl(Option &O, const string &Arg, double &Val); + static bool parseImpl(Option &O, const std::string &Arg, double &Val); public: // parse - Return true on error. template<class Opt> - bool parse(Opt &O, const char *ArgName, const string &Arg) { + bool parse(Opt &O, const char *ArgName, const std::string &Arg) { double Val; bool Error = parseImpl(O, Arg, Val); if (!Error) O.addValue(Val); @@ -539,13 +539,13 @@ template<> struct parser<float> : public parser<double> {}; //-------------------------------------------------- -// parser<string> +// parser<std::string> // template<> -struct parser<string> { +struct parser<std::string> { // parse - Return true on error. template<class Opt> - bool parse(Opt &O, const char *ArgName, const string &Arg) { + bool parse(Opt &O, const char *ArgName, const std::string &Arg) { O.addValue(Arg); return false; } diff --git a/include/Support/DepthFirstIterator.h b/include/Support/DepthFirstIterator.h index 2961497..e0782ac 100644 --- a/include/Support/DepthFirstIterator.h +++ b/include/Support/DepthFirstIterator.h @@ -9,14 +9,16 @@ #define LLVM_SUPPORT_DEPTH_FIRST_ITERATOR_H #include "Support/GraphTraits.h" -#include <iterator> +#include <Support/iterator> #include <stack> #include <set> // Generic Depth First Iterator template<class GraphT, class GT = GraphTraits<GraphT> > -class df_iterator : public std::forward_iterator<typename GT::NodeType, - ptrdiff_t> { +class df_iterator : public forward_iterator<typename GT::NodeType, ptrdiff_t> { + typedef forward_iterator<typename GT::NodeType, ptrdiff_t> super; + typedef typename super::pointer pointer; + typedef typename GT::NodeType NodeType; typedef typename GT::ChildIteratorType ChildItTy; diff --git a/include/llvm/ADT/DepthFirstIterator.h b/include/llvm/ADT/DepthFirstIterator.h index 2961497..e0782ac 100644 --- a/include/llvm/ADT/DepthFirstIterator.h +++ b/include/llvm/ADT/DepthFirstIterator.h @@ -9,14 +9,16 @@ #define LLVM_SUPPORT_DEPTH_FIRST_ITERATOR_H #include "Support/GraphTraits.h" -#include <iterator> +#include <Support/iterator> #include <stack> #include <set> // Generic Depth First Iterator template<class GraphT, class GT = GraphTraits<GraphT> > -class df_iterator : public std::forward_iterator<typename GT::NodeType, - ptrdiff_t> { +class df_iterator : public forward_iterator<typename GT::NodeType, ptrdiff_t> { + typedef forward_iterator<typename GT::NodeType, ptrdiff_t> super; + typedef typename super::pointer pointer; + typedef typename GT::NodeType NodeType; typedef typename GT::ChildIteratorType ChildItTy; diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index 633227a..3c9d9b0 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -403,8 +403,8 @@ public: // Default implementation, requires user to populate it with values somehow. template<class Opt> // parse - Return true on error. - bool parse(Opt &O, const char *ArgName, const string &Arg) { - string ArgVal; + bool parse(Opt &O, const char *ArgName, const std::string &Arg) { + std::string ArgVal; if (hasArgStr) ArgVal = Arg; else @@ -441,11 +441,11 @@ public: // template<> class parser<bool> { - static bool parseImpl(Option &O, const string &Arg, bool &Val); + static bool parseImpl(Option &O, const std::string &Arg, bool &Val); public: template<class Opt> // parse - Return true on error. - bool parse(Opt &O, const char *ArgName, const string &Arg) { + bool parse(Opt &O, const char *ArgName, const std::string &Arg) { bool Val; bool Error = parseImpl(O, Arg, Val); if (!Error) O.addValue(Val); @@ -473,12 +473,12 @@ public: // template<> class parser<int> { - static bool parseImpl(Option &O, const string &Arg, int &Val); + static bool parseImpl(Option &O, const std::string &Arg, int &Val); public: // parse - Return true on error. template<class Opt> - bool parse(Opt &O, const char *ArgName, const string &Arg) { + bool parse(Opt &O, const char *ArgName, const std::string &Arg) { int Val; bool Error = parseImpl(O, Arg, Val); if (!Error) O.addValue(Val); @@ -506,12 +506,12 @@ public: // template<> class parser<double> { - static bool parseImpl(Option &O, const string &Arg, double &Val); + static bool parseImpl(Option &O, const std::string &Arg, double &Val); public: // parse - Return true on error. template<class Opt> - bool parse(Opt &O, const char *ArgName, const string &Arg) { + bool parse(Opt &O, const char *ArgName, const std::string &Arg) { double Val; bool Error = parseImpl(O, Arg, Val); if (!Error) O.addValue(Val); @@ -539,13 +539,13 @@ template<> struct parser<float> : public parser<double> {}; //-------------------------------------------------- -// parser<string> +// parser<std::string> // template<> -struct parser<string> { +struct parser<std::string> { // parse - Return true on error. template<class Opt> - bool parse(Opt &O, const char *ArgName, const string &Arg) { + bool parse(Opt &O, const char *ArgName, const std::string &Arg) { O.addValue(Arg); return false; } |