From bd7e1108fe9851970a8f9cf190defddde49ab16b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 11 Sep 2009 05:40:42 +0000 Subject: 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 --- include/llvm/Support/Mangler.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/llvm') 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 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 &OutName, const GlobalValue *GV, + bool isImplicitlyPrivate); }; } // End llvm namespace -- cgit v1.1