mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01: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. llvm-svn: 78830
This commit is contained in:
parent
9199f62b3d
commit
1da933d3e3
@ -1311,7 +1311,8 @@ void AsmPrinter::EmitGlobalConstant(const Constant *CV, unsigned AddrSpace) {
|
||||
if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
|
||||
SmallString<40> S;
|
||||
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';
|
||||
@ -1635,11 +1636,12 @@ void AsmPrinter::printBasicBlockLabel(const MachineBasicBlock *MBB,
|
||||
if (printColon)
|
||||
O << ':';
|
||||
if (printComment) {
|
||||
O.PadToColumn(TAI->getCommentColumn(), 1);
|
||||
|
||||
if (MBB->getBasicBlock())
|
||||
O << '\t' << TAI->getCommentString() << ' '
|
||||
<< MBB->getBasicBlock()->getNameStr();
|
||||
if (const BasicBlock *BB = MBB->getBasicBlock())
|
||||
if (BB->hasName()) {
|
||||
O.PadToColumn(TAI->getCommentColumn(), 1);
|
||||
O << TAI->getCommentString() << ' '
|
||||
<< MBB->getBasicBlock()->getName();
|
||||
}
|
||||
|
||||
if (printColon)
|
||||
EmitComments(*MBB);
|
||||
|
Loading…
Reference in New Issue
Block a user