summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetLoweringObjectFile.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-12-02 16:25:47 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-12-02 16:25:47 +0000
commitf4e6b29a03dc48e358c117609ba25fe64a53fa2f (patch)
tree510ac8181154f5e90112a2731f2f27f3f0dbff3b /llvm/lib/Target/TargetLoweringObjectFile.cpp
parent5010a76fe20b9db312a3ebc207e40fea7ef9dc37 (diff)
downloadbcm5719-llvm-f4e6b29a03dc48e358c117609ba25fe64a53fa2f.tar.gz
bcm5719-llvm-f4e6b29a03dc48e358c117609ba25fe64a53fa2f.zip
Move getSymbolWithGlobalValueBase to TargetLoweringObjectFile.
This allows it to be used in TargetLoweringObjectFileImpl.cpp. llvm-svn: 196117
Diffstat (limited to 'llvm/lib/Target/TargetLoweringObjectFile.cpp')
-rw-r--r--llvm/lib/Target/TargetLoweringObjectFile.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/TargetLoweringObjectFile.cpp b/llvm/lib/Target/TargetLoweringObjectFile.cpp
index 7b8d1108f1b..836edeb5a2a 100644
--- a/llvm/lib/Target/TargetLoweringObjectFile.cpp
+++ b/llvm/lib/Target/TargetLoweringObjectFile.cpp
@@ -106,6 +106,13 @@ MCSymbol *TargetLoweringObjectFile::getSymbol(Mangler &M,
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,
OpenPOWER on IntegriCloud