diff options
author | Chris Lattner <sabre@nondot.org> | 2002-01-20 22:54:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-01-20 22:54:45 +0000 |
commit | 697954c15da58bd8b186dbafdedd8b06db770201 (patch) | |
tree | e119a71f09b5c2513c8c270161ae2a858c6f3b96 /include/llvm/Support | |
parent | 13c4659220bc78a0a3529f4d9e57546e898088e3 (diff) | |
download | external_llvm-697954c15da58bd8b186dbafdedd8b06db770201.zip external_llvm-697954c15da58bd8b186dbafdedd8b06db770201.tar.gz external_llvm-697954c15da58bd8b186dbafdedd8b06db770201.tar.bz2 |
Changes to build successfully with GCC 3.02
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1503 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support')
-rw-r--r-- | include/llvm/Support/Annotation.h | 7 | ||||
-rw-r--r-- | include/llvm/Support/CommandLine.h | 36 | ||||
-rw-r--r-- | include/llvm/Support/Linker.h | 2 | ||||
-rw-r--r-- | include/llvm/Support/NameMangling.h | 4 |
4 files changed, 25 insertions, 24 deletions
diff --git a/include/llvm/Support/Annotation.h b/include/llvm/Support/Annotation.h index 9919732..c0642e1 100644 --- a/include/llvm/Support/Annotation.h +++ b/include/llvm/Support/Annotation.h @@ -166,12 +166,13 @@ struct AnnotationManager { //===--------------------------------------------------------------------===// // Basic ID <-> Name map functionality - static AnnotationID getID (const string &Name); // Name -> ID - static const string &getName(AnnotationID ID); // ID -> Name + static AnnotationID getID(const std::string &Name); // Name -> ID + static const std::string &getName(AnnotationID ID); // ID -> Name // getID - Name -> ID + registration of a factory function for demand driven // annotation support. - static AnnotationID getID (const string &Name, Factory Fact, void *Data=0); + static AnnotationID getID(const std::string &Name, Factory Fact, + void *Data = 0); //===--------------------------------------------------------------------===// // Annotation creation on demand support... diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index 84a3bc9..3c0ac1a 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -100,7 +100,7 @@ class Option { // an argument. Should return true if there was an error processing the // argument and the program should exit. // - virtual bool handleOccurance(const char *ArgName, const string &Arg) = 0; + virtual bool handleOccurance(const char *ArgName, const std::string &Arg) = 0; virtual enum NumOccurances getNumOccurancesFlagDefault() const { return Optional; @@ -146,10 +146,10 @@ public: // addOccurance - Wrapper around handleOccurance that enforces Flags // - bool addOccurance(const char *ArgName, const string &Value); + bool addOccurance(const char *ArgName, const std::string &Value); // Prints option name followed by message. Always returns true. - bool error(string Message, const char *ArgName = 0); + bool error(std::string Message, const char *ArgName = 0); public: inline int getNumOccurances() const { return NumOccurances; } @@ -162,7 +162,7 @@ public: // class Alias : public Option { Option &AliasFor; - virtual bool handleOccurance(const char *ArgName, const string &Arg) { + virtual bool handleOccurance(const char *ArgName, const std::string &Arg) { return AliasFor.handleOccurance(AliasFor.ArgStr, Arg); } virtual enum OptionHidden getOptionHiddenFlagDefault() const {return Hidden;} @@ -177,7 +177,7 @@ public: // class Flag : public Option { bool Value; - virtual bool handleOccurance(const char *ArgName, const string &Arg); + virtual bool handleOccurance(const char *ArgName, const std::string &Arg); public: inline Flag(const char *ArgStr, const char *Message, int Flags = 0, bool DefaultVal = 0) : Option(ArgStr, Message, Flags), @@ -193,7 +193,7 @@ public: // class Int : public Option { int Value; - virtual bool handleOccurance(const char *ArgName, const string &Arg); + virtual bool handleOccurance(const char *ArgName, const std::string &Arg); virtual enum ValueExpected getValueExpectedFlagDefault() const { return ValueRequired; } @@ -209,18 +209,18 @@ public: //===----------------------------------------------------------------------===// // String valued command line option // -class String : public Option, public string { - virtual bool handleOccurance(const char *ArgName, const string &Arg); +class String : public Option, public std::string { + virtual bool handleOccurance(const char *ArgName, const std::string &Arg); virtual enum ValueExpected getValueExpectedFlagDefault() const { return ValueRequired; } public: inline String(const char *ArgStr, const char *Help, int Flags = 0, const char *DefaultVal = "") - : Option(ArgStr, Help, Flags), string(DefaultVal) {} + : Option(ArgStr, Help, Flags), std::string(DefaultVal) {} - inline const string &operator=(const string &Val) { - return string::operator=(Val); + inline const std::string &operator=(const std::string &Val) { + return std::string::operator=(Val); } }; @@ -228,7 +228,7 @@ public: //===----------------------------------------------------------------------===// // String list command line option // -class StringList : public Option, public vector<string> { +class StringList : public Option, public std::vector<std::string> { virtual enum NumOccurances getNumOccurancesFlagDefault() const { return ZeroOrMore; @@ -236,7 +236,7 @@ class StringList : public Option, public vector<string> { virtual enum ValueExpected getValueExpectedFlagDefault() const { return ValueRequired; } - virtual bool handleOccurance(const char *ArgName, const string &Arg); + virtual bool handleOccurance(const char *ArgName, const std::string &Arg); public: inline StringList(const char *ArgStr, const char *Help, int Flags = 0) @@ -256,7 +256,7 @@ protected: // Use a vector instead of a map, because the lists should be short, // the overhead is less, and most importantly, it keeps them in the order // inserted so we can print our option out nicely. - vector<pair<const char *, pair<int, const char *> > > ValueMap; + std::vector<std::pair<const char *, std::pair<int, const char *> > > ValueMap; inline EnumBase(const char *ArgStr, const char *Help, int Flags) : Option(ArgStr, Help, Flags) {} @@ -284,7 +284,7 @@ protected: inline EnumValueBase(int Flags) : EnumBase(Flags) {} // handleOccurance - Set Value to the enum value specified by Arg - virtual bool handleOccurance(const char *ArgName, const string &Arg); + virtual bool handleOccurance(const char *ArgName, const std::string &Arg); // Return the width of the option tag for printing... virtual unsigned getOptionWidth() const; @@ -323,7 +323,7 @@ class EnumFlagsBase : public EnumValueBase { return ValueDisallowed; } protected: - virtual bool handleOccurance(const char *ArgName, const string &Arg); + virtual bool handleOccurance(const char *ArgName, const std::string &Arg); inline EnumFlagsBase(int Flags) : EnumValueBase(Flags) {} // Return the width of the option tag for printing... @@ -363,11 +363,11 @@ class EnumListBase : public EnumBase { return ValueDisallowed; } protected: - vector<int> Values; // The options specified so far. + std::vector<int> Values; // The options specified so far. inline EnumListBase(int Flags) : EnumBase(Flags) {} - virtual bool handleOccurance(const char *ArgName, const string &Arg); + virtual bool handleOccurance(const char *ArgName, const std::string &Arg); // Return the width of the option tag for printing... virtual unsigned getOptionWidth() const; diff --git a/include/llvm/Support/Linker.h b/include/llvm/Support/Linker.h index 3650ccb..e74c5d4 100644 --- a/include/llvm/Support/Linker.h +++ b/include/llvm/Support/Linker.h @@ -16,7 +16,7 @@ class Module; // error occurs, true is returned and ErrorMsg (if not null) is set to indicate // the problem. // -bool LinkModules(Module *Dest, const Module *Src, string *ErrorMsg = 0); +bool LinkModules(Module *Dest, const Module *Src, std::string *ErrorMsg = 0); #endif diff --git a/include/llvm/Support/NameMangling.h b/include/llvm/Support/NameMangling.h index 67e68c7..8d33dcc 100644 --- a/include/llvm/Support/NameMangling.h +++ b/include/llvm/Support/NameMangling.h @@ -14,14 +14,14 @@ class Value; // MangleTypeName - Implement a consistent name-mangling scheme for // a given type. // -string MangleTypeName(const Type *type); +std::string MangleTypeName(const Type *type); // MangleName - implement a consistent name-mangling scheme for all // externally visible (i.e., global) objects. // // privateName should be unique within the module. // -string MangleName(const string &privateName, const Value *V); +std::string MangleName(const std::string &privateName, const Value *V); #endif |