[llvm-commits] [llvm] r76592 - in /llvm/trunk/lib/Target: MSP430/MSP430AsmPrinter.cpp Sparc/AsmPrinter/SparcAsmPrinter.cpp SystemZ/AsmPrinter/SystemZAsmPrinter.cpp

Chris Lattner sabre at nondot.org
Tue Jul 21 10:37:37 PDT 2009


Author: lattner
Date: Tue Jul 21 12:37:35 2009
New Revision: 76592

URL: http://llvm.org/viewvc/llvm-project?rev=76592&view=rev
Log:
fix Sparc, SystemZ, and MSP430 to not override AsmPrinter::doInitialization.
This eliminates redundancy setting up the mangler and adds support to them
for module-level inline asm and a .file directive.

Modified:
    llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp
    llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp
    llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp

Modified: llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp?rev=76592&r1=76591&r2=76592&view=diff

==============================================================================
--- llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/MSP430/MSP430AsmPrinter.cpp Tue Jul 21 12:37:35 2009
@@ -58,7 +58,6 @@
 
     void emitFunctionHeader(const MachineFunction &MF);
     bool runOnMachineFunction(MachineFunction &F);
-    bool doInitialization(Module &M);
 
     void getAnalysisUsage(AnalysisUsage &AU) const {
       AsmPrinter::getAnalysisUsage(AU);
@@ -80,12 +79,6 @@
   return new MSP430AsmPrinter(o, tm, tm.getTargetAsmInfo(), verbose);
 }
 
-bool MSP430AsmPrinter::doInitialization(Module &M) {
-  Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(),
-                     TAI->getLinkerPrivateGlobalPrefix());
-  return false; // success
-}
-
 
 void MSP430AsmPrinter::emitFunctionHeader(const MachineFunction &MF) {
   const Function *F = MF.getFunction();

Modified: llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp?rev=76592&r1=76591&r2=76592&view=diff

==============================================================================
--- llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp Tue Jul 21 12:37:35 2009
@@ -67,7 +67,6 @@
 
     bool printInstruction(const MachineInstr *MI);  // autogenerated.
     bool runOnMachineFunction(MachineFunction &F);
-    bool doInitialization(Module &M);
     bool doFinalization(Module &M);
     bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
                        unsigned AsmVariant, const char *ExtraCode);
@@ -222,12 +221,6 @@
   O << SPARCCondCodeToString((SPCC::CondCodes)CC);
 }
 
-bool SparcAsmPrinter::doInitialization(Module &M) {
-  Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(),
-                     TAI->getLinkerPrivateGlobalPrefix());
-  return false; // success
-}
-
 bool SparcAsmPrinter::doFinalization(Module &M) {
   // Print out module-level global variables here.
   for (Module::const_global_iterator I = M.global_begin(), E = M.global_end();

Modified: llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp?rev=76592&r1=76591&r2=76592&view=diff

==============================================================================
--- llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp Tue Jul 21 12:37:35 2009
@@ -67,7 +67,6 @@
 
     void emitFunctionHeader(const MachineFunction &MF);
     bool runOnMachineFunction(MachineFunction &F);
-    bool doInitialization(Module &M);
     bool doFinalization(Module &M);
     void printModuleLevelGV(const GlobalVariable* GVar);
 
@@ -91,13 +90,6 @@
   return new SystemZAsmPrinter(o, tm, tm.getTargetAsmInfo(), verbose);
 }
 
-bool SystemZAsmPrinter::doInitialization(Module &M) {
-  Mang = new Mangler(M, "", TAI->getPrivateGlobalPrefix(),
-                     TAI->getLinkerPrivateGlobalPrefix());
-  return false; // success
-}
-
-
 bool SystemZAsmPrinter::doFinalization(Module &M) {
   // Print out module-level global variables here.
   for (Module::const_global_iterator I = M.global_begin(), E = M.global_end();





More information about the llvm-commits mailing list