diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-15 23:25:11 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-15 23:25:11 +0000 |
commit | 0dca0a9650d13491ca4a893d06acbec102f06397 (patch) | |
tree | bf5a5b2383bc733ba6f7cd68f1b447324cef7aa6 /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
parent | b0c0e6433f9540ad0640bfd253e449661531095b (diff) | |
download | bcm5719-llvm-0dca0a9650d13491ca4a893d06acbec102f06397.tar.gz bcm5719-llvm-0dca0a9650d13491ca4a893d06acbec102f06397.zip |
add another helper
llvm-svn: 93577
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 680afc001c1..013889b5b2a 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -1706,6 +1706,17 @@ MCSymbol *AsmPrinter::GetGlobalValueSymbol(const GlobalValue *GV) const { return OutContext.GetOrCreateSymbol(NameStr.str()); } +/// GetPrivateGlobalValueSymbolStub - Return the MCSymbol for a symbol with +/// global value name as its base, with the specified suffix, and where the +/// symbol is forced to have private linkage. +MCSymbol *AsmPrinter::GetPrivateGlobalValueSymbolStub(const GlobalValue *GV, + StringRef Suffix) const { + SmallString<60> NameStr; + Mang->getNameWithPrefix(NameStr, GV, true); + NameStr.append(Suffix.begin(), Suffix.end()); + return OutContext.GetOrCreateSymbol(NameStr.str()); +} + /// GetExternalSymbolSymbol - Return the MCSymbol for the specified /// ExternalSymbol. MCSymbol *AsmPrinter::GetExternalSymbolSymbol(StringRef Sym) const { |