diff options
Diffstat (limited to 'include/llvm/Support')
-rw-r--r-- | include/llvm/Support/Annotation.h | 4 | ||||
-rw-r--r-- | include/llvm/Support/CommandLine.h | 32 | ||||
-rw-r--r-- | include/llvm/Support/DOTGraphTraits.h | 2 |
3 files changed, 21 insertions, 17 deletions
diff --git a/include/llvm/Support/Annotation.h b/include/llvm/Support/Annotation.h index 4325836c29..2331ca5a23 100644 --- a/include/llvm/Support/Annotation.h +++ b/include/llvm/Support/Annotation.h @@ -30,7 +30,7 @@ namespace llvm { class AnnotationID; class Annotation; class Annotable; -class AnnotationManager; +struct AnnotationManager; //===----------------------------------------------------------------------===// // @@ -39,7 +39,7 @@ class AnnotationManager; // freely around and passed byvalue with little or no overhead. // class AnnotationID { - friend class AnnotationManager; + friend struct AnnotationManager; unsigned ID; AnnotationID(); // Default ctor is disabled diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index 2c38e0aac0..4bb1c1f4ee 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -513,8 +513,8 @@ struct basic_parser : public basic_parser_impl { // parser<bool> // template<> -struct parser<bool> : public basic_parser<bool> { - +class parser<bool> : public basic_parser<bool> { +public: // parse - Return true on error. bool parse(Option &O, const char *ArgName, const std::string &Arg, bool &Val); @@ -531,8 +531,8 @@ struct parser<bool> : public basic_parser<bool> { // parser<int> // template<> -struct parser<int> : public basic_parser<int> { - +class parser<int> : public basic_parser<int> { +public: // parse - Return true on error. bool parse(Option &O, const char *ArgName, const std::string &Arg, int &Val); @@ -545,8 +545,8 @@ struct parser<int> : public basic_parser<int> { // parser<unsigned> // template<> -struct parser<unsigned> : public basic_parser<unsigned> { - +class parser<unsigned> : public basic_parser<unsigned> { +public: // parse - Return true on error. bool parse(Option &O, const char *AN, const std::string &Arg, unsigned &Val); @@ -559,7 +559,8 @@ struct parser<unsigned> : public basic_parser<unsigned> { // parser<double> // template<> -struct parser<double> : public basic_parser<double> { +class parser<double> : public basic_parser<double> { +public: // parse - Return true on error. bool parse(Option &O, const char *AN, const std::string &Arg, double &Val); @@ -572,7 +573,8 @@ struct parser<double> : public basic_parser<double> { // parser<float> // template<> -struct parser<float> : public basic_parser<float> { +class parser<float> : public basic_parser<float> { +public: // parse - Return true on error. bool parse(Option &O, const char *AN, const std::string &Arg, float &Val); @@ -585,7 +587,8 @@ struct parser<float> : public basic_parser<float> { // parser<std::string> // template<> -struct parser<std::string> : public basic_parser<std::string> { +class parser<std::string> : public basic_parser<std::string> { +public: // parse - Return true on error. bool parse(Option &O, const char *AN, const std::string &Arg, std::string &Value) { @@ -687,8 +690,8 @@ public: // object in all cases that it is used. // template<class DataType> -struct opt_storage<DataType,false,true> : public DataType { - +class opt_storage<DataType,false,true> : public DataType { +public: template<class T> void setValue(const T &V) { DataType::operator=(V); } @@ -701,7 +704,8 @@ struct opt_storage<DataType,false,true> : public DataType { // to get at the value. // template<class DataType> -struct opt_storage<DataType, false, false> { +class opt_storage<DataType, false, false> { +public: DataType Value; // Make sure we initialize the value with the default constructor for the @@ -864,8 +868,8 @@ public: // object in all cases that it is used. // template<class DataType> -struct list_storage<DataType, bool> : public std::vector<DataType> { - +class list_storage<DataType, bool> : public std::vector<DataType> { +public: template<class T> void addValue(const T &V) { push_back(V); } }; diff --git a/include/llvm/Support/DOTGraphTraits.h b/include/llvm/Support/DOTGraphTraits.h index b83b759f40..7196e51f8c 100644 --- a/include/llvm/Support/DOTGraphTraits.h +++ b/include/llvm/Support/DOTGraphTraits.h @@ -95,7 +95,7 @@ struct DefaultDOTGraphTraits { /// from DefaultDOTGraphTraits if you don't need to override everything. /// template <typename Ty> -class DOTGraphTraits : public DefaultDOTGraphTraits {}; +struct DOTGraphTraits : public DefaultDOTGraphTraits {}; } // End llvm namespace |