mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 05:25:47 +00:00
Clean up interface to getGlobalLinkName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31001 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -103,8 +103,7 @@ namespace llvm {
|
|||||||
/// getGlobalLinkName - Returns the asm/link name of of the specified
|
/// getGlobalLinkName - Returns the asm/link name of of the specified
|
||||||
/// global variable. Should be overridden by each target asm printer to
|
/// global variable. Should be overridden by each target asm printer to
|
||||||
/// generate the appropriate value.
|
/// generate the appropriate value.
|
||||||
virtual void getGlobalLinkName(const GlobalVariable *GV,
|
virtual const std::string getGlobalLinkName(const GlobalVariable *GV) const;
|
||||||
std::string &LinkName);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// doInitialization - Set up the AsmPrinter when we are working on a new
|
/// doInitialization - Set up the AsmPrinter when we are working on a new
|
||||||
|
@@ -352,11 +352,12 @@ unsigned AsmPrinter::getPreferredAlignmentLog(const GlobalVariable *GV) const {
|
|||||||
/// getGlobalLinkName - Returns the asm/link name of of the specified
|
/// getGlobalLinkName - Returns the asm/link name of of the specified
|
||||||
/// global variable. Should be overridden by each target asm printer to
|
/// global variable. Should be overridden by each target asm printer to
|
||||||
/// generate the appropriate value.
|
/// generate the appropriate value.
|
||||||
void AsmPrinter::getGlobalLinkName(const GlobalVariable *GV,
|
const std::string AsmPrinter::getGlobalLinkName(const GlobalVariable *GV) const{
|
||||||
std::string &LinkName) {
|
std::string LinkName;
|
||||||
// Default action is to use a global symbol.
|
// Default action is to use a global symbol.
|
||||||
LinkName = TAI->getGlobalPrefix();
|
LinkName = TAI->getGlobalPrefix();
|
||||||
LinkName += GV->getName();
|
LinkName += GV->getName();
|
||||||
|
return LinkName;
|
||||||
}
|
}
|
||||||
|
|
||||||
// EmitAlignment - Emit an alignment directive to the specified power of two.
|
// EmitAlignment - Emit an alignment directive to the specified power of two.
|
||||||
|
@@ -1634,8 +1634,7 @@ DIE *DwarfWriter::NewGlobalVariable(GlobalVariableDesc *GVD) {
|
|||||||
AddSourceLine(VariableDie, UnitDesc, GVD->getLine());
|
AddSourceLine(VariableDie, UnitDesc, GVD->getLine());
|
||||||
|
|
||||||
// Work up linkage name.
|
// Work up linkage name.
|
||||||
std::string LinkageName;
|
const std::string LinkageName = Asm->getGlobalLinkName(GV);
|
||||||
Asm->getGlobalLinkName(GV, LinkageName);
|
|
||||||
|
|
||||||
// Add address.
|
// Add address.
|
||||||
DIEBlock *Block = new DIEBlock();
|
DIEBlock *Block = new DIEBlock();
|
||||||
|
Reference in New Issue
Block a user