Drop the argument to AsmPrinter::EmitConstantPool and make it virtual.
authorChris Lattner <sabre@nondot.org>
Thu, 28 Jan 2010 00:19:24 +0000 (00:19 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 28 Jan 2010 00:19:24 +0000 (00:19 +0000)
Overload it in the ARM backend to do nothing, since is does insane
constant pool emission.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94708 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/AsmPrinter.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp

index 589788a7cc4dca4f3edfed1d1ce65e8300e3a747..31cc868f057b32bd19cd08b1254549d81bd96743 100644 (file)
@@ -220,7 +220,7 @@ namespace llvm {
     /// used to print out constants which have been "spilled to memory" by
     /// the code generator.
     ///
-    void EmitConstantPool(const MachineConstantPool *MCP);
+    virtual void EmitConstantPool();
 
     /// EmitJumpTableInfo - Print assembly representations of the jump tables 
     /// used by the current function to the current output stream.  
index 2e61a6f655fe4d10ed262b3217dbdfc21a9aee02..ed410a9614f3cd907fdfca347c3cb661e4bf133a 100644 (file)
@@ -294,7 +294,7 @@ void AsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
 /// function.
 void AsmPrinter::EmitFunctionHeader() {
   // Print out constants referenced by the function
-  EmitConstantPool(MF->getConstantPool());
+  EmitConstantPool();
   
   // Print the 'header' of function.
   const Function *F = MF->getFunction();
@@ -440,7 +440,8 @@ namespace {
 /// used to print out constants which have been "spilled to memory" by
 /// the code generator.
 ///
-void AsmPrinter::EmitConstantPool(const MachineConstantPool *MCP) {
+void AsmPrinter::EmitConstantPool() {
+  const MachineConstantPool *MCP = MF->getConstantPool();
   const std::vector<MachineConstantPoolEntry> &CP = MCP->getConstants();
   if (CP.empty()) return;
 
index f263db4e7c77763308f442cf72fb4d58782b9db0..348c455472c72b83ccf4404a99a82227800c4073 100644 (file)
@@ -164,6 +164,8 @@ namespace {
 
     void printMachineInstruction(const MachineInstr *MI);
     bool runOnMachineFunction(MachineFunction &F);
+    
+    virtual void EmitConstantPool() {} // we emit constant pools customly!
     virtual void EmitFunctionEntryLabel();
     void EmitStartOfAsmFile(Module &M);
     void EmitEndOfAsmFile(Module &M);
index e9813b6f02846206571b8b9ddb0707040f66a1e4..e2e0b2befcff0b1f4bc4d8b9c954467975d879c1 100644 (file)
@@ -233,7 +233,7 @@ bool XCoreAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
   SetupMachineFunction(MF);
 
   // Print out constants referenced by the function
-  EmitConstantPool(MF.getConstantPool());
+  EmitConstantPool();
 
   // Emit the function start directives
   emitFunctionStart(MF);