[llvm] 2d570ba - CodeGenTarget.cpp: Reformat.
NAKAMURA Takumi via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 12 03:50:25 PST 2023
Author: NAKAMURA Takumi
Date: 2023-02-12T20:49:07+09:00
New Revision: 2d570bab4f996393ad060443afd71d25b9582c13
URL: https://github.com/llvm/llvm-project/commit/2d570bab4f996393ad060443afd71d25b9582c13
DIFF: https://github.com/llvm/llvm-project/commit/2d570bab4f996393ad060443afd71d25b9582c13.diff
LOG: CodeGenTarget.cpp: Reformat.
Added:
Modified:
llvm/utils/TableGen/CodeGenTarget.cpp
Removed:
################################################################################
diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp
index b7240f01300c..b5fb830e15f6 100644
--- a/llvm/utils/TableGen/CodeGenTarget.cpp
+++ b/llvm/utils/TableGen/CodeGenTarget.cpp
@@ -696,9 +696,10 @@ CodeGenIntrinsic::CodeGenIntrinsic(Record *R,
EnumName = DefName.substr(4);
- if (R->getValue("ClangBuiltinName")) // Ignore a missing ClangBuiltinName field.
+ if (R->getValue(
+ "ClangBuiltinName")) // Ignore a missing ClangBuiltinName field.
ClangBuiltinName = std::string(R->getValueAsString("ClangBuiltinName"));
- if (R->getValue("MSBuiltinName")) // Ignore a missing MSBuiltinName field.
+ if (R->getValue("MSBuiltinName")) // Ignore a missing MSBuiltinName field.
MSBuiltinName = std::string(R->getValueAsString("MSBuiltinName"));
TargetPrefix = std::string(R->getValueAsString("TargetPrefix"));
@@ -720,7 +721,7 @@ CodeGenIntrinsic::CodeGenIntrinsic(Record *R,
// If TargetPrefix is specified, make sure that Name starts with
// "llvm.<targetprefix>.".
if (!TargetPrefix.empty()) {
- if (Name.size() < 6+TargetPrefix.size() ||
+ if (Name.size() < 6 + TargetPrefix.size() ||
Name.substr(5, 1 + TargetPrefix.size()) != (TargetPrefix + "."))
PrintFatalError(DefLoc, "Intrinsic '" + DefName +
"' does not start with 'llvm." +
@@ -756,8 +757,7 @@ CodeGenIntrinsic::CodeGenIntrinsic(Record *R,
MVT::SimpleValueType VT;
if (TyEl->isSubClassOf("LLVMMatchType")) {
unsigned MatchTy = TyEl->getValueAsInt("Number");
- assert(MatchTy < OverloadedVTs.size() &&
- "Invalid matching number!");
+ assert(MatchTy < OverloadedVTs.size() && "Invalid matching number!");
VT = OverloadedVTs[MatchTy];
// It only makes sense to use the extended and truncated vector element
// variants with iAny types; otherwise, if the intrinsic is not
@@ -788,9 +788,10 @@ CodeGenIntrinsic::CodeGenIntrinsic(Record *R,
if (TyEl->isSubClassOf("LLVMMatchType")) {
unsigned MatchTy = TyEl->getValueAsInt("Number");
if (MatchTy >= OverloadedVTs.size()) {
- PrintError(R->getLoc(),
- "Parameter #" + Twine(i) + " has out of bounds matching "
- "number " + Twine(MatchTy));
+ PrintError(R->getLoc(), "Parameter #" + Twine(i) +
+ " has out of bounds matching "
+ "number " +
+ Twine(MatchTy));
PrintFatalError(DefLoc,
Twine("ParamTypes is ") + TypeList->getAsString());
}
@@ -806,7 +807,7 @@ CodeGenIntrinsic::CodeGenIntrinsic(Record *R,
VT = getValueType(TyEl->getValueAsDef("VT"));
// Reject invalid types.
- if (VT == MVT::isVoid && i != e-1 /*void at end means varargs*/)
+ if (VT == MVT::isVoid && i != e - 1 /*void at end means varargs*/)
PrintFatalError(DefLoc, "Intrinsic '" + DefName +
" has void in result type list!");
More information about the llvm-commits
mailing list