mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
use early exits to reduce indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92335 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
85b1912dba
commit
c65b72ca26
@ -1257,29 +1257,30 @@ private:
|
|||||||
void AssemblyWriter::writeOperand(const Value *Operand, bool PrintType) {
|
void AssemblyWriter::writeOperand(const Value *Operand, bool PrintType) {
|
||||||
if (Operand == 0) {
|
if (Operand == 0) {
|
||||||
Out << "<null operand!>";
|
Out << "<null operand!>";
|
||||||
} else {
|
return;
|
||||||
if (PrintType) {
|
|
||||||
TypePrinter.print(Operand->getType(), Out);
|
|
||||||
Out << ' ';
|
|
||||||
}
|
|
||||||
WriteAsOperandInternal(Out, Operand, &TypePrinter, &Machine);
|
|
||||||
}
|
}
|
||||||
|
if (PrintType) {
|
||||||
|
TypePrinter.print(Operand->getType(), Out);
|
||||||
|
Out << ' ';
|
||||||
|
}
|
||||||
|
WriteAsOperandInternal(Out, Operand, &TypePrinter, &Machine);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AssemblyWriter::writeParamOperand(const Value *Operand,
|
void AssemblyWriter::writeParamOperand(const Value *Operand,
|
||||||
Attributes Attrs) {
|
Attributes Attrs) {
|
||||||
if (Operand == 0) {
|
if (Operand == 0) {
|
||||||
Out << "<null operand!>";
|
Out << "<null operand!>";
|
||||||
} else {
|
return;
|
||||||
// Print the type
|
|
||||||
TypePrinter.print(Operand->getType(), Out);
|
|
||||||
// Print parameter attributes list
|
|
||||||
if (Attrs != Attribute::None)
|
|
||||||
Out << ' ' << Attribute::getAsString(Attrs);
|
|
||||||
Out << ' ';
|
|
||||||
// Print the operand
|
|
||||||
WriteAsOperandInternal(Out, Operand, &TypePrinter, &Machine);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Print the type
|
||||||
|
TypePrinter.print(Operand->getType(), Out);
|
||||||
|
// Print parameter attributes list
|
||||||
|
if (Attrs != Attribute::None)
|
||||||
|
Out << ' ' << Attribute::getAsString(Attrs);
|
||||||
|
Out << ' ';
|
||||||
|
// Print the operand
|
||||||
|
WriteAsOperandInternal(Out, Operand, &TypePrinter, &Machine);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AssemblyWriter::printModule(const Module *M) {
|
void AssemblyWriter::printModule(const Module *M) {
|
||||||
|
Loading…
Reference in New Issue
Block a user