From c5397abb52551ce0c93e8e5c0054c5a85db086d4 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 29 Jul 2009 05:20:33 +0000 Subject: fix PR4584 with a trivial patch now that the pieces are in place. llvm-svn: 77434 --- llvm/lib/Target/TargetLoweringObjectFile.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Target/TargetLoweringObjectFile.cpp') diff --git a/llvm/lib/Target/TargetLoweringObjectFile.cpp b/llvm/lib/Target/TargetLoweringObjectFile.cpp index 4f07f90..e0b2941 100644 --- a/llvm/lib/Target/TargetLoweringObjectFile.cpp +++ b/llvm/lib/Target/TargetLoweringObjectFile.cpp @@ -16,6 +16,7 @@ #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" #include "llvm/GlobalVariable.h" +#include "llvm/Support/Mangler.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetData.h" #include "llvm/Target/TargetOptions.h" @@ -407,9 +408,8 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, // into a 'uniqued' section name, create and return the section now. if (Kind.isWeak()) { const char *Prefix = getSectionPrefixForUniqueGlobal(Kind); - // FIXME: Use mangler interface (PR4584). - std::string Name = Prefix+GV->getNameStr(); - return getOrCreateSection(Name.c_str(), false, Kind.getKind()); + std::string Name = Mang->makeNameProper(GV->getNameStr()); + return getOrCreateSection((Prefix+Name).c_str(), false, Kind.getKind()); } if (Kind.isText()) return TextSection; -- cgit v1.1