aboutsummaryrefslogtreecommitdiff
path: root/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
commit74b7d27ab177be8c643591427c912e24aaf7e585 (patch)
treea3456c90b19854af8011f7c8928f20e469fd2167 /lib/CodeGen/AsmPrinter.cpp
parente7a1e2152cf5dadf98bf78f9b0337213271b8786 (diff)
Simplify code, alignment must be specified now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26074 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp
index 263b35cf4d..b6a48206df 100644
--- a/lib/CodeGen/AsmPrinter.cpp
+++ b/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);