mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-25 00:33:15 +00:00
Fix a few more places to use PadToColumn instead of tabs. And fix
the basic block label printing to check whether a block has a name before printing a comment character and whitespace for it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78830 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3aaccffbce
commit
e45da0dce0
@ -1311,7 +1311,8 @@ void AsmPrinter::EmitGlobalConstant(const Constant *CV, unsigned AddrSpace) {
|
|||||||
if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
|
if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
|
||||||
SmallString<40> S;
|
SmallString<40> S;
|
||||||
CI->getValue().toStringUnsigned(S, 16);
|
CI->getValue().toStringUnsigned(S, 16);
|
||||||
O << "\t\t\t" << TAI->getCommentString() << " 0x" << S.c_str();
|
O.PadToColumn(TAI->getCommentColumn(), 1);
|
||||||
|
O << TAI->getCommentString() << " 0x" << S.c_str();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
O << '\n';
|
O << '\n';
|
||||||
@ -1635,11 +1636,12 @@ void AsmPrinter::printBasicBlockLabel(const MachineBasicBlock *MBB,
|
|||||||
if (printColon)
|
if (printColon)
|
||||||
O << ':';
|
O << ':';
|
||||||
if (printComment) {
|
if (printComment) {
|
||||||
O.PadToColumn(TAI->getCommentColumn(), 1);
|
if (const BasicBlock *BB = MBB->getBasicBlock())
|
||||||
|
if (BB->hasName()) {
|
||||||
if (MBB->getBasicBlock())
|
O.PadToColumn(TAI->getCommentColumn(), 1);
|
||||||
O << '\t' << TAI->getCommentString() << ' '
|
O << TAI->getCommentString() << ' '
|
||||||
<< MBB->getBasicBlock()->getNameStr();
|
<< MBB->getBasicBlock()->getName();
|
||||||
|
}
|
||||||
|
|
||||||
if (printColon)
|
if (printColon)
|
||||||
EmitComments(*MBB);
|
EmitComments(*MBB);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user