mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-19 02:25:01 +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:
@@ -1257,20 +1257,22 @@ 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) {
|
if (PrintType) {
|
||||||
TypePrinter.print(Operand->getType(), Out);
|
TypePrinter.print(Operand->getType(), Out);
|
||||||
Out << ' ';
|
Out << ' ';
|
||||||
}
|
}
|
||||||
WriteAsOperandInternal(Out, Operand, &TypePrinter, &Machine);
|
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
|
// Print the type
|
||||||
TypePrinter.print(Operand->getType(), Out);
|
TypePrinter.print(Operand->getType(), Out);
|
||||||
// Print parameter attributes list
|
// Print parameter attributes list
|
||||||
@@ -1280,7 +1282,6 @@ void AssemblyWriter::writeParamOperand(const Value *Operand,
|
|||||||
// Print the operand
|
// Print the operand
|
||||||
WriteAsOperandInternal(Out, Operand, &TypePrinter, &Machine);
|
WriteAsOperandInternal(Out, Operand, &TypePrinter, &Machine);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void AssemblyWriter::printModule(const Module *M) {
|
void AssemblyWriter::printModule(const Module *M) {
|
||||||
if (!M->getModuleIdentifier().empty() &&
|
if (!M->getModuleIdentifier().empty() &&
|
||||||
|
Reference in New Issue
Block a user