Simplify code, alignment must be specified now.
authorChris Lattner <sabre@nondot.org>
Thu, 9 Feb 2006 02:26:04 +0000 (02:26 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 9 Feb 2006 02:26:04 +0000 (02:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26074 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter.cpp

index 263b35cf4d2bce86175e317bce0d8ad9c1917117..b6a48206df19ccb86d35f19041c64c6f50bcf0ca 100644 (file)
@@ -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);