From 4ea397f845119291030824b9efdcc4e102398350 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 13 Jul 2009 23:47:27 +0000 Subject: [PATCH] remove mangler support for mangling local names. Mangler should only be used with globals. llvm-svn: 75557 --- include/llvm/Support/Mangler.h | 1 - lib/VMCore/Mangler.cpp | 14 -------------- 2 files changed, 15 deletions(-) diff --git a/include/llvm/Support/Mangler.h b/include/llvm/Support/Mangler.h index 8f672bdd6f6..1de1905b60c 100644 --- a/include/llvm/Support/Mangler.h +++ b/include/llvm/Support/Mangler.h @@ -89,7 +89,6 @@ public: /// in the current module. /// std::string getValueName(const GlobalValue *V, const char *Suffix = ""); - std::string getValueName(const Value *V); /// makeNameProper - We don't want identifier names with ., space, or /// - in them, so we mangle these characters into the strings "d_", diff --git a/lib/VMCore/Mangler.cpp b/lib/VMCore/Mangler.cpp index 948bb36a657..5a4df62f150 100644 --- a/lib/VMCore/Mangler.cpp +++ b/lib/VMCore/Mangler.cpp @@ -136,20 +136,6 @@ unsigned Mangler::getTypeID(const Type *Ty) { return E; } -std::string Mangler::getValueName(const Value *V) { - if (const GlobalValue *GV = dyn_cast(V)) - return getValueName(GV); - - std::string &Name = Memo[V]; - if (!Name.empty()) - return Name; // Return the already-computed name for V. - - // Always mangle local names. - Name = "ltmp_" + utostr(Count++) + "_" + utostr(getTypeID(V->getType())); - return Name; -} - - std::string Mangler::getValueName(const GlobalValue *GV, const char *Suffix) { // Check to see whether we've already named V. std::string &Name = Memo[GV];