modify per review commentary

llvm-svn: 36383
This commit is contained in:
Dale Johannesen 2007-04-23 23:33:31 +00:00
parent 82202333be
commit 8653d29b45
1 changed files with 2 additions and 2 deletions

View File

@ -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";