diff options
author | Chris Lattner <sabre@nondot.org> | 2009-09-11 05:40:42 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-09-11 05:40:42 +0000 |
commit | bd7e1108fe9851970a8f9cf190defddde49ab16b (patch) | |
tree | 9f5fb09948f820c6de3e9f3fe68f9b56c2058c74 /include/llvm/Support | |
parent | 2fe752edba6d2b52a4171262ad9281a3cf21b003 (diff) | |
download | external_llvm-bd7e1108fe9851970a8f9cf190defddde49ab16b.zip external_llvm-bd7e1108fe9851970a8f9cf190defddde49ab16b.tar.gz external_llvm-bd7e1108fe9851970a8f9cf190defddde49ab16b.tar.bz2 |
add a new Mangler::getNameWithPrefix API which returns the
(uniqued if unnamed) global variable name with the prefix that
it is supposed to get. It doesn't do "mangling" in the sense of
adding quotes and hacking on bad characters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81505 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support')
-rw-r--r-- | include/llvm/Support/Mangler.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Support/Mangler.h b/include/llvm/Support/Mangler.h index d9234ac..23ea377 100644 --- a/include/llvm/Support/Mangler.h +++ b/include/llvm/Support/Mangler.h @@ -23,6 +23,7 @@ class Type; class Module; class Value; class GlobalValue; +template <typename T> class SmallVectorImpl; class Mangler { public: @@ -104,6 +105,12 @@ public: /// std::string makeNameProper(const std::string &x, 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 |