aboutsummaryrefslogtreecommitdiffstats
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
commit00d56b96e599acbc4f895e86e17029ae7c45f142 (patch)
tree5aadc406eb8cc23f5d17a321c44e006bac261c0c
parent2c783e46c3480c7fa8b91b10610a8e0d92e33ccd (diff)
downloadexternal_llvm-00d56b96e599acbc4f895e86e17029ae7c45f142.zip
external_llvm-00d56b96e599acbc4f895e86e17029ae7c45f142.tar.gz
external_llvm-00d56b96e599acbc4f895e86e17029ae7c45f142.tar.bz2
modify per review commentary
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36383 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/AsmPrinter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp
index 1266179..16c478d 100644
--- a/lib/CodeGen/AsmPrinter.cpp
+++ b/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";