forked from OSchip/llvm-project
[TableGen] Indentation and whitespace fixes in generated code. NFC.
Some of these were found by running clang-format over the generated code, although that complains about far more issues than I have fixed here. Differential Revision: https://reviews.llvm.org/D90937
This commit is contained in:
parent
d61f2cfb9f
commit
d0b8810fe4
|
@ -238,11 +238,11 @@ void CallingConvEmitter::EmitAction(Record *Action,
|
|||
O << IndentStr << "LocInfo = CCValAssign::FPExt;\n";
|
||||
} else {
|
||||
O << IndentStr << "if (ArgFlags.isSExt())\n"
|
||||
<< IndentStr << IndentStr << "LocInfo = CCValAssign::SExt;\n"
|
||||
<< IndentStr << " LocInfo = CCValAssign::SExt;\n"
|
||||
<< IndentStr << "else if (ArgFlags.isZExt())\n"
|
||||
<< IndentStr << IndentStr << "LocInfo = CCValAssign::ZExt;\n"
|
||||
<< IndentStr << " LocInfo = CCValAssign::ZExt;\n"
|
||||
<< IndentStr << "else\n"
|
||||
<< IndentStr << IndentStr << "LocInfo = CCValAssign::AExt;\n";
|
||||
<< IndentStr << " LocInfo = CCValAssign::AExt;\n";
|
||||
}
|
||||
} else if (Action->isSubClassOf("CCPromoteToUpperBitsInType")) {
|
||||
Record *DestTy = Action->getValueAsDef("DestTy");
|
||||
|
@ -254,11 +254,11 @@ void CallingConvEmitter::EmitAction(Record *Action,
|
|||
"point");
|
||||
} else {
|
||||
O << IndentStr << "if (ArgFlags.isSExt())\n"
|
||||
<< IndentStr << IndentStr << "LocInfo = CCValAssign::SExtUpper;\n"
|
||||
<< IndentStr << " LocInfo = CCValAssign::SExtUpper;\n"
|
||||
<< IndentStr << "else if (ArgFlags.isZExt())\n"
|
||||
<< IndentStr << IndentStr << "LocInfo = CCValAssign::ZExtUpper;\n"
|
||||
<< IndentStr << " LocInfo = CCValAssign::ZExtUpper;\n"
|
||||
<< IndentStr << "else\n"
|
||||
<< IndentStr << IndentStr << "LocInfo = CCValAssign::AExtUpper;\n";
|
||||
<< IndentStr << " LocInfo = CCValAssign::AExtUpper;\n";
|
||||
}
|
||||
} else if (Action->isSubClassOf("CCBitConvertToType")) {
|
||||
Record *DestTy = Action->getValueAsDef("DestTy");
|
||||
|
@ -282,7 +282,7 @@ void CallingConvEmitter::EmitAction(Record *Action,
|
|||
O << IndentStr
|
||||
<< "if (" << Action->getValueAsString("FuncName") << "(ValNo, ValVT, "
|
||||
<< "LocVT, LocInfo, ArgFlags, State))\n";
|
||||
O << IndentStr << IndentStr << "return false;\n";
|
||||
O << IndentStr << " return false;\n";
|
||||
} else {
|
||||
errs() << *Action;
|
||||
PrintFatalError(Action->getLoc(), "Unknown CCAction!");
|
||||
|
|
|
@ -263,7 +263,7 @@ void DFAPacketizerEmitter::emitForItineraries(
|
|||
OS << " " << ProcModelStartIdx[Model] << ", // " << Model->ModelName
|
||||
<< "\n";
|
||||
}
|
||||
OS << ScheduleClasses.size() << "\n};\n\n";
|
||||
OS << " " << ScheduleClasses.size() << "\n};\n\n";
|
||||
|
||||
// The type of a state in the nondeterministic automaton we're defining.
|
||||
using NfaStateTy = uint64_t;
|
||||
|
|
|
@ -2392,8 +2392,8 @@ static void emitDecodeInstruction(formatted_raw_ostream &OS) {
|
|||
void FixedLenDecoderEmitter::run(raw_ostream &o) {
|
||||
formatted_raw_ostream OS(o);
|
||||
OS << "#include \"llvm/MC/MCInst.h\"\n";
|
||||
OS << "#include \"llvm/Support/Debug.h\"\n";
|
||||
OS << "#include \"llvm/Support/DataTypes.h\"\n";
|
||||
OS << "#include \"llvm/Support/Debug.h\"\n";
|
||||
OS << "#include \"llvm/Support/LEB128.h\"\n";
|
||||
OS << "#include \"llvm/Support/raw_ostream.h\"\n";
|
||||
OS << "#include <assert.h>\n";
|
||||
|
|
|
@ -906,7 +906,6 @@ void GICombinerEmitter::run(raw_ostream &OS) {
|
|||
<< " bool isRuleDisabled(unsigned ID) const;\n"
|
||||
<< " bool setRuleEnabled(StringRef RuleIdentifier);\n"
|
||||
<< " bool setRuleDisabled(StringRef RuleIdentifier);\n"
|
||||
<< "\n"
|
||||
<< "};\n"
|
||||
<< "\n"
|
||||
<< "class " << getClassName();
|
||||
|
|
|
@ -127,7 +127,7 @@ void RegisterInfoEmitter::runEnums(raw_ostream &OS,
|
|||
OS << " " << Reg.getName() << " = " << Reg.EnumValue << ",\n";
|
||||
assert(Registers.size() == Registers.back().EnumValue &&
|
||||
"Register enum value mismatch!");
|
||||
OS << " NUM_TARGET_REGS \t// " << Registers.size()+1 << "\n";
|
||||
OS << " NUM_TARGET_REGS // " << Registers.size()+1 << "\n";
|
||||
OS << "};\n";
|
||||
if (!Namespace.empty())
|
||||
OS << "} // end namespace " << Namespace << "\n";
|
||||
|
|
Loading…
Reference in New Issue