summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-28 00:19:24 +0000
committerChris Lattner <sabre@nondot.org>2010-01-28 00:19:24 +0000
commit2b796241a788f309a3a30223537598de2149cc7d (patch)
treedc8e1f412240fb7b7a0dbc41001b3cf94078172c /llvm/lib
parentfa784e88e8763a374e1976c1086e75cede80cd39 (diff)
downloadbcm5719-llvm-2b796241a788f309a3a30223537598de2149cc7d.tar.gz
bcm5719-llvm-2b796241a788f309a3a30223537598de2149cc7d.zip
Drop the argument to AsmPrinter::EmitConstantPool and make it virtual.
Overload it in the ARM backend to do nothing, since is does insane constant pool emission. llvm-svn: 94708
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp5
-rw-r--r--llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp2
-rw-r--r--llvm/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp2
3 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 2e61a6f655f..ed410a9614f 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -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;
diff --git a/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
index f263db4e7c7..348c455472c 100644
--- a/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
+++ b/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
@@ -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);
diff --git a/llvm/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp b/llvm/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp
index e9813b6f028..e2e0b2befcf 100644
--- a/llvm/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp
+++ b/llvm/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp
@@ -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);
OpenPOWER on IntegriCloud