mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-31 08:16:47 +00:00 
			
		
		
		
	Changes to build with GCC 3.1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3064 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
		| @@ -403,8 +403,8 @@ public: | |||||||
|  |  | ||||||
|   // Default implementation, requires user to populate it with values somehow. |   // Default implementation, requires user to populate it with values somehow. | ||||||
|   template<class Opt>   // parse - Return true on error. |   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) { | ||||||
|     string ArgVal; |     std::string ArgVal; | ||||||
|     if (hasArgStr) |     if (hasArgStr) | ||||||
|       ArgVal = Arg; |       ArgVal = Arg; | ||||||
|     else |     else | ||||||
| @@ -441,11 +441,11 @@ public: | |||||||
| // | // | ||||||
| template<> | template<> | ||||||
| class parser<bool> { | 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: | public: | ||||||
|    |    | ||||||
|   template<class Opt>     // parse - Return true on error. |   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 Val; | ||||||
|     bool Error = parseImpl(O, Arg, Val); |     bool Error = parseImpl(O, Arg, Val); | ||||||
|     if (!Error) O.addValue(Val); |     if (!Error) O.addValue(Val); | ||||||
| @@ -473,12 +473,12 @@ public: | |||||||
| // | // | ||||||
| template<> | template<> | ||||||
| class parser<int> { | 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: | public: | ||||||
|    |    | ||||||
|   // parse - Return true on error. |   // parse - Return true on error. | ||||||
|   template<class Opt> |   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; |     int Val; | ||||||
|     bool Error = parseImpl(O, Arg, Val); |     bool Error = parseImpl(O, Arg, Val); | ||||||
|     if (!Error) O.addValue(Val); |     if (!Error) O.addValue(Val); | ||||||
| @@ -506,12 +506,12 @@ public: | |||||||
| // | // | ||||||
| template<> | template<> | ||||||
| class parser<double> { | 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: | public: | ||||||
|    |    | ||||||
|   // parse - Return true on error. |   // parse - Return true on error. | ||||||
|   template<class Opt> |   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; |     double Val; | ||||||
|     bool Error = parseImpl(O, Arg, Val); |     bool Error = parseImpl(O, Arg, Val); | ||||||
|     if (!Error) O.addValue(Val); |     if (!Error) O.addValue(Val); | ||||||
| @@ -539,13 +539,13 @@ template<> struct parser<float> : public parser<double> {}; | |||||||
|  |  | ||||||
|  |  | ||||||
| //-------------------------------------------------- | //-------------------------------------------------- | ||||||
| // parser<string> | // parser<std::string> | ||||||
| // | // | ||||||
| template<> | template<> | ||||||
| struct parser<string> { | struct parser<std::string> { | ||||||
|   // parse - Return true on error. |   // parse - Return true on error. | ||||||
|   template<class Opt> |   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); |     O.addValue(Arg); | ||||||
|     return false; |     return false; | ||||||
|   } |   } | ||||||
|   | |||||||
| @@ -9,14 +9,16 @@ | |||||||
| #define LLVM_SUPPORT_DEPTH_FIRST_ITERATOR_H | #define LLVM_SUPPORT_DEPTH_FIRST_ITERATOR_H | ||||||
|  |  | ||||||
| #include "Support/GraphTraits.h" | #include "Support/GraphTraits.h" | ||||||
| #include <iterator> | #include <Support/iterator> | ||||||
| #include <stack> | #include <stack> | ||||||
| #include <set> | #include <set> | ||||||
|  |  | ||||||
| // Generic Depth First Iterator | // Generic Depth First Iterator | ||||||
| template<class GraphT, class GT = GraphTraits<GraphT> > | template<class GraphT, class GT = GraphTraits<GraphT> > | ||||||
| class df_iterator : public std::forward_iterator<typename GT::NodeType, | class df_iterator : public forward_iterator<typename GT::NodeType, ptrdiff_t> { | ||||||
|                                                  ptrdiff_t> { |   typedef forward_iterator<typename GT::NodeType, ptrdiff_t> super; | ||||||
|  |   typedef typename super::pointer pointer; | ||||||
|  |  | ||||||
|   typedef typename GT::NodeType          NodeType; |   typedef typename GT::NodeType          NodeType; | ||||||
|   typedef typename GT::ChildIteratorType ChildItTy; |   typedef typename GT::ChildIteratorType ChildItTy; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -9,14 +9,16 @@ | |||||||
| #define LLVM_SUPPORT_DEPTH_FIRST_ITERATOR_H | #define LLVM_SUPPORT_DEPTH_FIRST_ITERATOR_H | ||||||
|  |  | ||||||
| #include "Support/GraphTraits.h" | #include "Support/GraphTraits.h" | ||||||
| #include <iterator> | #include <Support/iterator> | ||||||
| #include <stack> | #include <stack> | ||||||
| #include <set> | #include <set> | ||||||
|  |  | ||||||
| // Generic Depth First Iterator | // Generic Depth First Iterator | ||||||
| template<class GraphT, class GT = GraphTraits<GraphT> > | template<class GraphT, class GT = GraphTraits<GraphT> > | ||||||
| class df_iterator : public std::forward_iterator<typename GT::NodeType, | class df_iterator : public forward_iterator<typename GT::NodeType, ptrdiff_t> { | ||||||
|                                                  ptrdiff_t> { |   typedef forward_iterator<typename GT::NodeType, ptrdiff_t> super; | ||||||
|  |   typedef typename super::pointer pointer; | ||||||
|  |  | ||||||
|   typedef typename GT::NodeType          NodeType; |   typedef typename GT::NodeType          NodeType; | ||||||
|   typedef typename GT::ChildIteratorType ChildItTy; |   typedef typename GT::ChildIteratorType ChildItTy; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -403,8 +403,8 @@ public: | |||||||
|  |  | ||||||
|   // Default implementation, requires user to populate it with values somehow. |   // Default implementation, requires user to populate it with values somehow. | ||||||
|   template<class Opt>   // parse - Return true on error. |   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) { | ||||||
|     string ArgVal; |     std::string ArgVal; | ||||||
|     if (hasArgStr) |     if (hasArgStr) | ||||||
|       ArgVal = Arg; |       ArgVal = Arg; | ||||||
|     else |     else | ||||||
| @@ -441,11 +441,11 @@ public: | |||||||
| // | // | ||||||
| template<> | template<> | ||||||
| class parser<bool> { | 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: | public: | ||||||
|    |    | ||||||
|   template<class Opt>     // parse - Return true on error. |   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 Val; | ||||||
|     bool Error = parseImpl(O, Arg, Val); |     bool Error = parseImpl(O, Arg, Val); | ||||||
|     if (!Error) O.addValue(Val); |     if (!Error) O.addValue(Val); | ||||||
| @@ -473,12 +473,12 @@ public: | |||||||
| // | // | ||||||
| template<> | template<> | ||||||
| class parser<int> { | 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: | public: | ||||||
|    |    | ||||||
|   // parse - Return true on error. |   // parse - Return true on error. | ||||||
|   template<class Opt> |   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; |     int Val; | ||||||
|     bool Error = parseImpl(O, Arg, Val); |     bool Error = parseImpl(O, Arg, Val); | ||||||
|     if (!Error) O.addValue(Val); |     if (!Error) O.addValue(Val); | ||||||
| @@ -506,12 +506,12 @@ public: | |||||||
| // | // | ||||||
| template<> | template<> | ||||||
| class parser<double> { | 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: | public: | ||||||
|    |    | ||||||
|   // parse - Return true on error. |   // parse - Return true on error. | ||||||
|   template<class Opt> |   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; |     double Val; | ||||||
|     bool Error = parseImpl(O, Arg, Val); |     bool Error = parseImpl(O, Arg, Val); | ||||||
|     if (!Error) O.addValue(Val); |     if (!Error) O.addValue(Val); | ||||||
| @@ -539,13 +539,13 @@ template<> struct parser<float> : public parser<double> {}; | |||||||
|  |  | ||||||
|  |  | ||||||
| //-------------------------------------------------- | //-------------------------------------------------- | ||||||
| // parser<string> | // parser<std::string> | ||||||
| // | // | ||||||
| template<> | template<> | ||||||
| struct parser<string> { | struct parser<std::string> { | ||||||
|   // parse - Return true on error. |   // parse - Return true on error. | ||||||
|   template<class Opt> |   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); |     O.addValue(Arg); | ||||||
|     return false; |     return false; | ||||||
|   } |   } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user