diff options
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 680afc0..013889b 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/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 { |