[llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp
Dale Johannesen
dalej at apple.com
Mon Apr 23 12:59:12 PDT 2007
Changes in directory llvm/lib/CodeGen:
AsmPrinter.cpp updated: 1.154 -> 1.155
---
Log message:
make EmitAlignment work the way Chris says it should
---
Diffs of the changes: (+3 -1)
AsmPrinter.cpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
Index: llvm/lib/CodeGen/AsmPrinter.cpp
diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.154 llvm/lib/CodeGen/AsmPrinter.cpp:1.155
--- llvm/lib/CodeGen/AsmPrinter.cpp:1.154 Tue Mar 6 13:25:02 2007
+++ llvm/lib/CodeGen/AsmPrinter.cpp Mon Apr 23 14:58:54 2007
@@ -579,8 +579,10 @@
//===----------------------------------------------------------------------===//
// EmitAlignment - Emit an alignment directive to the specified power of two.
+// Use the maximum of the specified alignment and the alignment from the
+// specified GlobalValue (if any).
void AsmPrinter::EmitAlignment(unsigned NumBits, const GlobalValue *GV) const {
- if (GV && GV->getAlignment())
+ if (GV && GV->getAlignment() && Log2_32(GV->getAlignment()) > NumBits)
NumBits = Log2_32(GV->getAlignment());
if (NumBits == 0) return; // No need to emit alignment.
if (TAI->getAlignmentIsInBytes()) NumBits = 1 << NumBits;
More information about the llvm-commits
mailing list