From: Chris Lattner Date: Wed, 24 Jul 2002 22:08:36 +0000 (+0000) Subject: Changes to build with GCC 3.1 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=7f4dd472e35569efefbeffef096c490075e3e824;p=oota-llvm.git Changes to build with GCC 3.1 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3064 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/Support/CommandLine.h b/include/Support/CommandLine.h index 633227adc38..3c9d9b0e6e1 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 // 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 { - static bool parseImpl(Option &O, const string &Arg, bool &Val); + static bool parseImpl(Option &O, const std::string &Arg, bool &Val); public: template // 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 { - 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 - 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 { - 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 - 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 : public parser {}; //-------------------------------------------------- -// parser +// parser // template<> -struct parser { +struct parser { // parse - Return true on error. template - 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 2961497adc3..e0782ac83aa 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 +#include #include #include // Generic Depth First Iterator template > -class df_iterator : public std::forward_iterator { +class df_iterator : public forward_iterator { + typedef forward_iterator 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 2961497adc3..e0782ac83aa 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 +#include #include #include // Generic Depth First Iterator template > -class df_iterator : public std::forward_iterator { +class df_iterator : public forward_iterator { + typedef forward_iterator 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 633227adc38..3c9d9b0e6e1 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 // 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 { - static bool parseImpl(Option &O, const string &Arg, bool &Val); + static bool parseImpl(Option &O, const std::string &Arg, bool &Val); public: template // 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 { - 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 - 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 { - 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 - 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 : public parser {}; //-------------------------------------------------- -// parser +// parser // template<> -struct parser { +struct parser { // parse - Return true on error. template - 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; }