diff options
Diffstat (limited to 'include/llvm/Support/Mangler.h')
-rw-r--r-- | include/llvm/Support/Mangler.h | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/include/llvm/Support/Mangler.h b/include/llvm/Support/Mangler.h index 03c5648..aa230d4 100644 --- a/include/llvm/Support/Mangler.h +++ b/include/llvm/Support/Mangler.h @@ -19,6 +19,7 @@ #include <string> namespace llvm { +class Twine; class Type; class Module; class Value; @@ -101,9 +102,25 @@ public: /// specified suffix. If 'ForcePrivate' is specified, the label is specified /// to have a private label prefix. /// + /// FIXME: This is deprecated, new code should use getNameWithPrefix and use + /// MCSymbol printing to handle quotes or not etc. + /// std::string getMangledName(const GlobalValue *V, const char *Suffix = "", bool ForcePrivate = false); + /// getNameWithPrefix - Fill OutName with the name of the appropriate prefix + /// and the specified global variable's name. If the global variable doesn't + /// have a name, this fills in a unique name for the global. + void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV, + bool isImplicitlyPrivate); + + /// getNameWithPrefix - Fill OutName with the name of the appropriate prefix + /// and the specified name as the global variable name. GVName must not be + /// empty. + void getNameWithPrefix(SmallVectorImpl<char> &OutName, const Twine &GVName, + ManglerPrefixTy PrefixTy = Mangler::Default); + +private: /// makeNameProper - We don't want identifier names with ., space, or /// - in them, so we mangle these characters into the strings "d_", /// "s_", and "D_", respectively. This is a very simple mangling that @@ -111,14 +128,13 @@ public: /// does this for you, so there's no point calling it on the result /// from getValueName. /// - std::string makeNameProper(const std::string &x, - ManglerPrefixTy PrefixTy = Mangler::Default); + /// FIXME: This is deprecated, new code should use getNameWithPrefix and use + /// MCSymbol printing to handle quotes or not etc. + /// + void makeNameProper(SmallVectorImpl<char> &OutName, + const Twine &Name, + ManglerPrefixTy PrefixTy = Mangler::Default); - /// getNameWithPrefix - Fill OutName with the name of the appropriate prefix - /// and the specified global variable's name. If the global variable doesn't - /// have a name, this fills in a unique name for the global. - void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV, - bool isImplicitlyPrivate); }; } // End llvm namespace |