Move getSymbolWithGlobalValueBase to TargetLoweringObjectFile.

This allows it to be used in TargetLoweringObjectFileImpl.cpp.

llvm-svn: 196117
diff --git a/llvm/lib/Target/TargetLoweringObjectFile.cpp b/llvm/lib/Target/TargetLoweringObjectFile.cpp
index 7b8d110..836edeb 100644
--- a/llvm/lib/Target/TargetLoweringObjectFile.cpp
+++ b/llvm/lib/Target/TargetLoweringObjectFile.cpp
@@ -106,6 +106,13 @@
   return Ctx->GetOrCreateSymbol(NameStr.str());
 }
 
+MCSymbol *TargetLoweringObjectFile::getSymbolWithGlobalValueBase(
+    Mangler &M, const GlobalValue *GV, StringRef Suffix) const {
+  SmallString<60> NameStr;
+  M.getNameWithPrefix(NameStr, GV, true);
+  NameStr.append(Suffix.begin(), Suffix.end());
+  return Ctx->GetOrCreateSymbol(NameStr.str());
+}
 
 MCSymbol *TargetLoweringObjectFile::
 getCFIPersonalitySymbol(const GlobalValue *GV, Mangler *Mang,