summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2007-04-23 23:33:31 +0000
committerDale Johannesen <dalej@apple.com>2007-04-23 23:33:31 +0000
commit8653d29b45635a6e9dda294299f71865910c351f (patch)
tree7cb20d34aa1462ed7e2fa977c2705e3436db8207
parent82202333be54ccd58a9d73aa6f54eddea1a14e14 (diff)
downloadbcm5719-llvm-8653d29b45635a6e9dda294299f71865910c351f.tar.gz
bcm5719-llvm-8653d29b45635a6e9dda294299f71865910c351f.zip
modify per review commentary
llvm-svn: 36383
-rw-r--r--llvm/lib/CodeGen/AsmPrinter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp
index 1266179a2cd..16c478dcdc1 100644
--- a/llvm/lib/CodeGen/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter.cpp
@@ -582,8 +582,8 @@ void AsmPrinter::EmitString(const std::string &String) const {
// 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() && Log2_32(GV->getAlignment()) > NumBits)
- NumBits = Log2_32(GV->getAlignment());
+ if (GV && GV->getAlignment())
+ NumBits = std::max(NumBits, Log2_32(GV->getAlignment()));
if (NumBits == 0) return; // No need to emit alignment.
if (TAI->getAlignmentIsInBytes()) NumBits = 1 << NumBits;
O << TAI->getAlignDirective() << NumBits << "\n";
OpenPOWER on IntegriCloud