diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-04-25 05:30:43 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-04-25 05:30:43 +0000 |
| commit | 044698b39a5360f6132cdbecf484f78ae76cb6e1 (patch) | |
| tree | 3c3209dc9e867f234fa2d2a5d5ee8dd31ee423bd /lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
| parent | 73382423f2b1f4735941dcffff2f31d0c25876b4 (diff) | |
Fix PR6921: globals were not getting correctly rounded up to their
preferred alignment unless they were common or some other special
case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102300 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
| -rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 4660e1b2cc..08e2ed60a3 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -285,7 +285,7 @@ void AsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) { OutStreamer.SwitchSection(TheSection); EmitLinkage(GV->getLinkage(), GVSym); - EmitAlignment(AlignLog, GV); + EmitAlignment(AlignLog, GV, AlignLog); if (isVerbose()) { WriteAsOperand(OutStreamer.GetCommentOS(), GV, @@ -987,7 +987,7 @@ bool AsmPrinter::EmitSpecialLLVMGlobal(const GlobalVariable *GV) { unsigned Align = Log2_32(TD->getPointerPrefAlignment()); if (GV->getName() == "llvm.global_ctors") { OutStreamer.SwitchSection(getObjFileLowering().getStaticCtorSection()); - EmitAlignment(Align, 0); + EmitAlignment(Align); EmitXXStructorList(GV->getInitializer()); if (TM.getRelocationModel() == Reloc::Static && @@ -1001,7 +1001,7 @@ bool AsmPrinter::EmitSpecialLLVMGlobal(const GlobalVariable *GV) { if (GV->getName() == "llvm.global_dtors") { OutStreamer.SwitchSection(getObjFileLowering().getStaticDtorSection()); - EmitAlignment(Align, 0); + EmitAlignment(Align); EmitXXStructorList(GV->getInitializer()); if (TM.getRelocationModel() == Reloc::Static && |
