Skip to content

Commit

Permalink
fixup! clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
4vtomat committed Jul 24, 2024
1 parent f3dc9d3 commit b57b7fa
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion clang/lib/AST/Type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3509,8 +3509,8 @@ StringRef FunctionType::getNameForCallConv(CallingConv CC) {
case CC_PreserveNone: return "preserve_none";
// clang-format off
case CC_RISCVVectorCall: return "riscv_vector_cc";
// clang-format on
case CC_RISCVVLSCall: return "riscv_vls_cc";
// clang-format on
}

llvm_unreachable("Invalid calling convention.");
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/CodeGen/CGCall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ unsigned CodeGenTypes::ClangCallConvToLLVMCallConv(CallingConv CC) {
case CC_PreserveNone: return llvm::CallingConv::PreserveNone;
// clang-format off
case CC_RISCVVectorCall: return llvm::CallingConv::RISCV_VectorCall;
// clang-format on
case CC_RISCVVLSCall: return llvm::CallingConv::RISCV_VLSCall;
// clang-format on
}
}

Expand Down
13 changes: 7 additions & 6 deletions clang/lib/CodeGen/Targets/RISCV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ void RISCVABIInfo::computeInfo(CGFunctionInfo &FI) const {
int ArgNum = 0;
for (auto &ArgInfo : FI.arguments()) {
bool IsFixed = ArgNum < NumFixedArgs;
ArgInfo.info =
classifyArgumentType(ArgInfo.type, IsFixed, ArgGPRsLeft, ArgFPRsLeft, ABIVLen);
ArgInfo.info = classifyArgumentType(ArgInfo.type, IsFixed, ArgGPRsLeft,
ArgFPRsLeft, ABIVLen);
ArgNum++;
}
}
Expand Down Expand Up @@ -335,7 +335,7 @@ ABIArgInfo RISCVABIInfo::coerceVLSVector(QualType Ty, unsigned ABIVLen) const {

unsigned NumElts = VT->getNumElements();
llvm::ScalableVectorType *ResType;
llvm::Type *EltType = CGT.ConvertType(VT->getElementType());;
llvm::Type *EltType = CGT.ConvertType(VT->getElementType());

if (ABIVLen == 0) {
// RVV fixed-length vector
Expand Down Expand Up @@ -498,7 +498,8 @@ ABIArgInfo RISCVABIInfo::classifyArgumentType(QualType Ty, bool IsFixed,
return getNaturalAlignIndirect(Ty, /*ByVal=*/false);
}

ABIArgInfo RISCVABIInfo::classifyReturnType(QualType RetTy, unsigned ABIVLen) const {
ABIArgInfo RISCVABIInfo::classifyReturnType(QualType RetTy,
unsigned ABIVLen) const {
if (RetTy->isVoidType())
return ABIArgInfo::getIgnore();

Expand All @@ -507,8 +508,8 @@ ABIArgInfo RISCVABIInfo::classifyReturnType(QualType RetTy, unsigned ABIVLen) co

// The rules for return and argument types are the same, so defer to
// classifyArgumentType.
return classifyArgumentType(RetTy, /*IsFixed=*/true, ArgGPRsLeft,
ArgFPRsLeft, ABIVLen);
return classifyArgumentType(RetTy, /*IsFixed=*/true, ArgGPRsLeft, ArgFPRsLeft,
ABIVLen);
}

RValue RISCVABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr,
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Sema/SemaType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7482,7 +7482,7 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr &Attr) {
case ParsedAttr::AT_RISCVVectorCC:
return createSimpleAttr<RISCVVectorCCAttr>(Ctx, Attr);
case ParsedAttr::AT_RISCVVLSCC:
return ::new (Ctx) RISCVVLSCCAttr(Ctx, Attr, /*dummy*/0);
return ::new (Ctx) RISCVVLSCCAttr(Ctx, Attr, /*dummy*/ 0);
}
llvm_unreachable("unexpected attribute kind!");
}
Expand Down

0 comments on commit b57b7fa

Please sign in to comment.