diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-12 21:19:23 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-12 21:19:23 +0000 |
commit | d62f1b4168d4327c119642d28c26c836ae6717ab (patch) | |
tree | b4a88870cf7567e31729390addd8f4df27428ff6 /lib/Target/PIC16 | |
parent | deb0cba1bad5a46bbecb75666e415c3dee9c89eb (diff) | |
download | external_llvm-d62f1b4168d4327c119642d28c26c836ae6717ab.zip external_llvm-d62f1b4168d4327c119642d28c26c836ae6717ab.tar.gz external_llvm-d62f1b4168d4327c119642d28c26c836ae6717ab.tar.bz2 |
inline GetGlobalValueSymbol into the rest its callers and
remove it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98390 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PIC16')
-rw-r--r-- | lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp b/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp index 44a6cc0..78dc48a 100644 --- a/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp +++ b/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp @@ -25,6 +25,7 @@ #include "llvm/CodeGen/MachineModuleInfo.h" #include "llvm/MC/MCStreamer.h" #include "llvm/MC/MCSymbol.h" +#include "llvm/Target/Mangler.h" #include "llvm/Target/TargetRegistry.h" #include "llvm/Target/TargetLoweringObjectFile.h" #include "llvm/Support/ErrorHandling.h" @@ -179,7 +180,7 @@ void PIC16AsmPrinter::printOperand(const MachineInstr *MI, int opNum) { return; case MachineOperand::MO_GlobalAddress: { - MCSymbol *Sym = GetGlobalValueSymbol(MO.getGlobal()); + MCSymbol *Sym = Mang->getSymbol(MO.getGlobal()); // FIXME: currently we do not have a memcpy def coming in the module // by any chance, as we do not link in those as .bc lib. So these calls // are always external and it is safe to emit an extern. @@ -312,7 +313,7 @@ void PIC16AsmPrinter::EmitFunctionDecls(Module &M) { if (!I->isDeclaration() && !I->hasExternalLinkage()) continue; - MCSymbol *Sym = GetGlobalValueSymbol(I); + MCSymbol *Sym = Mang->getSymbol(I); // Do not emit memcpy, memset, and memmove here. // Calls to these routines can be generated in two ways, @@ -342,7 +343,7 @@ void PIC16AsmPrinter::EmitUndefinedVars(Module &M) { O << "\n" << MAI->getCommentString() << "Imported Variables - BEGIN" << "\n"; for (unsigned j = 0; j < Items.size(); j++) - O << MAI->getExternDirective() << *GetGlobalValueSymbol(Items[j]) << "\n"; + O << MAI->getExternDirective() << *Mang->getSymbol(Items[j]) << "\n"; O << MAI->getCommentString() << "Imported Variables - END" << "\n"; } @@ -353,7 +354,7 @@ void PIC16AsmPrinter::EmitDefinedVars(Module &M) { O << "\n" << MAI->getCommentString() << "Exported Variables - BEGIN" << "\n"; for (unsigned j = 0; j < Items.size(); j++) - O << MAI->getGlobalDirective() << *GetGlobalValueSymbol(Items[j]) << "\n"; + O << MAI->getGlobalDirective() << *Mang->getSymbol(Items[j]) << "\n"; O << MAI->getCommentString() << "Exported Variables - END" << "\n"; } @@ -432,7 +433,7 @@ void PIC16AsmPrinter::EmitInitializedDataSection(const PIC16Section *S) { for (unsigned j = 0; j < Items.size(); j++) { Constant *C = Items[j]->getInitializer(); int AddrSpace = Items[j]->getType()->getAddressSpace(); - O << *GetGlobalValueSymbol(Items[j]); + O << *Mang->getSymbol(Items[j]); EmitGlobalConstant(C, AddrSpace); } } @@ -451,7 +452,7 @@ EmitUninitializedDataSection(const PIC16Section *S) { Constant *C = Items[j]->getInitializer(); const Type *Ty = C->getType(); unsigned Size = TD->getTypeAllocSize(Ty); - O << *GetGlobalValueSymbol(Items[j]) << " RES " << Size << "\n"; + O << *Mang->getSymbol(Items[j]) << " RES " << Size << "\n"; } } |