summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2007-09-17 22:39:32 +0000
committerBill Wendling <isanbard@gmail.com>2007-09-17 22:39:32 +0000
commitecd91377583b9f42a006eb78aab550c2265d4c9b (patch)
treebbe4bf7f1bb7a5ee0825d8196bdc0b2594d7baf7 /lib
parent30729b48d40e76d23191ad8449741860a7c841c8 (diff)
downloadexternal_llvm-ecd91377583b9f42a006eb78aab550c2265d4c9b.zip
external_llvm-ecd91377583b9f42a006eb78aab550c2265d4c9b.tar.gz
external_llvm-ecd91377583b9f42a006eb78aab550c2265d4c9b.tar.bz2
Add support for appending a suffix to the end of a mangled name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42071 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/VMCore/Mangler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VMCore/Mangler.cpp b/lib/VMCore/Mangler.cpp
index 52e3d0d..8b8ba59 100644
--- a/lib/VMCore/Mangler.cpp
+++ b/lib/VMCore/Mangler.cpp
@@ -126,7 +126,7 @@ std::string Mangler::getValueName(const Value *V) {
}
-std::string Mangler::getValueName(const GlobalValue *GV) {
+std::string Mangler::getValueName(const GlobalValue *GV, const char * Suffix) {
// Check to see whether we've already named V.
std::string &Name = Memo[GV];
if (!Name.empty())
@@ -143,7 +143,7 @@ std::string Mangler::getValueName(const GlobalValue *GV) {
static unsigned GlobalID = 0;
Name = "__unnamed_" + utostr(TypeUniqueID) + "_" + utostr(GlobalID++);
} else if (!MangledGlobals.count(GV)) {
- Name = makeNameProper(GV->getName(), Prefix);
+ Name = makeNameProper(GV->getName() + Suffix, Prefix);
} else {
unsigned TypeUniqueID = getTypeID(GV->getType());
Name = "l" + utostr(TypeUniqueID) + "_" + makeNameProper(GV->getName());