summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-20 07:33:29 +0000
committerChris Lattner <sabre@nondot.org>2010-01-20 07:33:29 +0000
commitdb42c8d23da7a2b63b7d7c8add7518d2279fea47 (patch)
tree3554ebccd782b62485eb4a71617e6d2d15e94c7c /llvm/lib/Target/ARM
parentf8dcf784a7d05d77880a0638b7557d60b7f57e4b (diff)
downloadbcm5719-llvm-db42c8d23da7a2b63b7d7c8add7518d2279fea47.tar.gz
bcm5719-llvm-db42c8d23da7a2b63b7d7c8add7518d2279fea47.zip
inline and radically simplify printDataDirective. It will eventually
go completely away. llvm-svn: 93994
Diffstat (limited to 'llvm/lib/Target/ARM')
-rw-r--r--llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
index bacb13489a9..855b5c530aa 100644
--- a/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
+++ b/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
@@ -170,7 +170,12 @@ namespace {
/// EmitMachineConstantPoolValue - Print a machine constantpool value to
/// the .s file.
virtual void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) {
- printDataDirective(MCPV->getType());
+ switch (TM.getTargetData()->getTypeAllocSize(MCPV->getType())) {
+ case 1: O << MAI->getData8bitsDirective(0); break;
+ case 2: O << MAI->getData16bitsDirective(0); break;
+ case 4: O << MAI->getData32bitsDirective(0); break;
+ default: assert(0 && "Unknown CPV size");
+ }
ARMConstantPoolValue *ACPV = static_cast<ARMConstantPoolValue*>(MCPV);
SmallString<128> TmpNameStr;
OpenPOWER on IntegriCloud