summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-02-09 02:26:04 +0000
committerChris Lattner <sabre@nondot.org>2006-02-09 02:26:04 +0000
commit47f7319f0050bb99fe02b259f115c340231961d6 (patch)
treeb7586ebaca698a999b79068f829d6b2393730dae /llvm/lib/CodeGen/AsmPrinter.cpp
parent0ece4214ad278ffba3db23ae24554bafedee60b4 (diff)
downloadbcm5719-llvm-47f7319f0050bb99fe02b259f115c340231961d6.tar.gz
bcm5719-llvm-47f7319f0050bb99fe02b259f115c340231961d6.zip
Simplify code, alignment must be specified now.
llvm-svn: 26074
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp
index 263b35cf4d2..b6a48206df1 100644
--- a/llvm/lib/CodeGen/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter.cpp
@@ -112,16 +112,7 @@ void AsmPrinter::EmitConstantPool(MachineConstantPool *MCP) {
SwitchSection(ConstantPoolSection, 0);
for (unsigned i = 0, e = CP.size(); i != e; ++i) {
- // FIXME: force doubles to be naturally aligned. We should handle this
- // more correctly in the future.
- unsigned Alignment = CP[i].second;
- if (Alignment == 0) {
- Alignment = TD.getTypeAlignmentShift(CP[i].first->getType());
- if (CP[i].first->getType() == Type::DoubleTy && Alignment < 3)
- Alignment = 3;
- }
-
- EmitAlignment(Alignment);
+ EmitAlignment(CP[i].second);
O << PrivateGlobalPrefix << "CPI" << getFunctionNumber() << '_' << i
<< ":\t\t\t\t\t" << CommentString << *CP[i].first << '\n';
EmitGlobalConstant(CP[i].first);
OpenPOWER on IntegriCloud