Skip to content

Commit c9c46ca

Browse files
committed
clang-format
1 parent 4c6d517 commit c9c46ca

13 files changed

+45
-36
lines changed

clang/include/clang/CIR/CIRGenerator.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ class CIRGenTypes;
4141
} // namespace CIRGen
4242
} // namespace clang
4343

44-
4544
namespace cir {
4645
class CIRGenerator : public clang::ASTConsumer {
4746
virtual void anchor();

clang/lib/CIR/CodeGen/CIRGenBuilder.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -705,8 +705,8 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
705705
}
706706

707707
Address createBaseClassAddr(mlir::Location loc, Address addr,
708-
mlir::Type destType, unsigned offset,
709-
bool assumeNotNull) {
708+
mlir::Type destType, unsigned offset,
709+
bool assumeNotNull) {
710710
if (destType == addr.getElementType())
711711
return addr;
712712

@@ -717,8 +717,8 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
717717
}
718718

719719
Address createDerivedClassAddr(mlir::Location loc, Address addr,
720-
mlir::Type destType, unsigned offset,
721-
bool assumeNotNull) {
720+
mlir::Type destType, unsigned offset,
721+
bool assumeNotNull) {
722722
if (destType == addr.getElementType())
723723
return addr;
724724

@@ -834,7 +834,7 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
834834
/// Cast the element type of the given address to a different type,
835835
/// preserving information like the alignment.
836836
Address createElementBitCast(mlir::Location loc, Address addr,
837-
mlir::Type destType) {
837+
mlir::Type destType) {
838838
if (destType == addr.getElementType())
839839
return addr;
840840

clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2313,8 +2313,8 @@ buildCommonNeonCallPattern0(CIRGenFunction &cgf, llvm::StringRef intrincsName,
23132313
mlir::Value CIRGenFunction::buildCommonNeonBuiltinExpr(
23142314
unsigned builtinID, unsigned llvmIntrinsic, unsigned altLLVMIntrinsic,
23152315
const char *nameHint, unsigned modifier, const CallExpr *e,
2316-
llvm::SmallVectorImpl<mlir::Value> &ops, Address ptrOp0,
2317-
Address ptrOp1, llvm::Triple::ArchType arch) {
2316+
llvm::SmallVectorImpl<mlir::Value> &ops, Address ptrOp0, Address ptrOp1,
2317+
llvm::Triple::ArchType arch) {
23182318
// Get the last argument, which specifies the vector type.
23192319
const clang::Expr *arg = e->getArg(e->getNumArgs() - 1);
23202320
std::optional<llvm::APSInt> neonTypeConst =

clang/lib/CIR/CodeGen/CIRGenCall.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,8 +1465,8 @@ const CIRGenFunctionInfo &CIRGenTypes::arrangeCXXMethodCall(
14651465

14661466
auto info = proto->getExtInfo();
14671467
return arrangeCIRFunctionInfo(GetReturnType(proto->getReturnType()),
1468-
cir::FnInfoOpts::IsInstanceMethod, argTypes, info,
1469-
paramInfos, required);
1468+
cir::FnInfoOpts::IsInstanceMethod, argTypes,
1469+
info, paramInfos, required);
14701470
}
14711471

14721472
/// Figure out the rules for calling a function with the given formal type using
@@ -1544,9 +1544,9 @@ CIRGenTypes::arrangeFunctionDeclaration(const FunctionDecl *FD) {
15441544
// When declaring a function without a prototype, always use a non-variadic
15451545
// type.
15461546
if (CanQual<FunctionNoProtoType> noProto = FTy.getAs<FunctionNoProtoType>()) {
1547-
return arrangeCIRFunctionInfo(noProto->getReturnType(), cir::FnInfoOpts::None,
1548-
std::nullopt, noProto->getExtInfo(), {},
1549-
RequiredArgs::All);
1547+
return arrangeCIRFunctionInfo(noProto->getReturnType(),
1548+
cir::FnInfoOpts::None, std::nullopt,
1549+
noProto->getExtInfo(), {}, RequiredArgs::All);
15501550
}
15511551

15521552
return arrangeFreeFunctionType(FTy.castAs<FunctionProtoType>());

clang/lib/CIR/CodeGen/CIRGenExpr.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2455,7 +2455,8 @@ CIRGenFunction::buildConditionalBlocks(const AbstractConditionalOperator *E,
24552455
*this, loc, b.getInsertionBlock()};
24562456
CGF.currLexScope->setAsTernary();
24572457

2458-
assert(!cir::MissingFeatures::incrementProfileCounter());
2458+
assert(
2459+
!cir::MissingFeatures::incrementProfileCounter());
24592460
eval.begin(CGF);
24602461
Info.LHS = BranchGenFunc(CGF, trueExpr);
24612462
auto lhs = Info.LHS->getPointer();
@@ -2476,7 +2477,8 @@ CIRGenFunction::buildConditionalBlocks(const AbstractConditionalOperator *E,
24762477
*this, loc, b.getInsertionBlock()};
24772478
CGF.currLexScope->setAsTernary();
24782479

2479-
assert(!cir::MissingFeatures::incrementProfileCounter());
2480+
assert(
2481+
!cir::MissingFeatures::incrementProfileCounter());
24802482
eval.begin(CGF);
24812483
Info.RHS = BranchGenFunc(CGF, falseExpr);
24822484
auto rhs = Info.RHS->getPointer();

clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1971,7 +1971,8 @@ mlir::Value ScalarExprEmitter::VisitInitListExpr(InitListExpr *E) {
19711971
llvm_unreachable("NYI");
19721972

19731973
if (E->getType()->isVectorType()) {
1974-
assert(!cir::MissingFeatures::scalableVectors() && "NYI: scalable vector init");
1974+
assert(!cir::MissingFeatures::scalableVectors() &&
1975+
"NYI: scalable vector init");
19751976
assert(!cir::MissingFeatures::vectorConstants() && "NYI: vector constants");
19761977
auto VectorType =
19771978
mlir::dyn_cast<mlir::cir::VectorType>(CGF.getCIRType(E->getType()));

clang/lib/CIR/CodeGen/CIRGenFunction.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,11 +281,13 @@ void CIRGenFunction::buildAndUpdateRetAlloca(QualType ty, mlir::Location loc,
281281
// Count the implicit return.
282282
if (!endsWithReturn(CurFuncDecl))
283283
++NumReturnExprs;
284-
} else if (CurFnInfo->getReturnInfo().getKind() == cir::ABIArgInfo::Indirect) {
284+
} else if (CurFnInfo->getReturnInfo().getKind() ==
285+
cir::ABIArgInfo::Indirect) {
285286
// TODO(CIR): Consider this implementation in CIRtoLLVM
286287
llvm_unreachable("NYI");
287288
// TODO(CIR): Consider this implementation in CIRtoLLVM
288-
} else if (CurFnInfo->getReturnInfo().getKind() == cir::ABIArgInfo::InAlloca) {
289+
} else if (CurFnInfo->getReturnInfo().getKind() ==
290+
cir::ABIArgInfo::InAlloca) {
289291
llvm_unreachable("NYI");
290292
} else {
291293
auto addr = buildAlloca("__retval", ty, loc, alignment);

clang/lib/CIR/CodeGen/CIRGenFunction.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,8 +1008,8 @@ class CIRGenFunction : public CIRGenTypeCache {
10081008
mlir::Value buildCommonNeonBuiltinExpr(
10091009
unsigned builtinID, unsigned llvmIntrinsic, unsigned altLLVMIntrinsic,
10101010
const char *nameHint, unsigned modifier, const CallExpr *e,
1011-
llvm::SmallVectorImpl<mlir::Value> &ops, Address ptrOp0,
1012-
Address ptrOp1, llvm::Triple::ArchType arch);
1011+
llvm::SmallVectorImpl<mlir::Value> &ops, Address ptrOp0, Address ptrOp1,
1012+
llvm::Triple::ArchType arch);
10131013

10141014
mlir::Value buildAlignmentAssumption(mlir::Value ptrValue, QualType ty,
10151015
SourceLocation loc,

clang/lib/CIR/CodeGen/CIRGenFunctionInfo.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,9 @@ class CIRGenFunctionInfo final
265265
clang::CanQualType getReturnType() const { return getArgsBuffer()[0].type; }
266266

267267
cir::ABIArgInfo &getReturnInfo() { return getArgsBuffer()[0].info; }
268-
const cir::ABIArgInfo &getReturnInfo() const { return getArgsBuffer()[0].info; }
268+
const cir::ABIArgInfo &getReturnInfo() const {
269+
return getArgsBuffer()[0].info;
270+
}
269271

270272
bool isChainCall() const { return ChainCall; }
271273

clang/lib/CIR/CodeGen/CIRGenOpenCLRuntime.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ class CIRGenOpenCLRuntime {
4141
const clang::VarDecl &D);
4242
};
4343

44-
} // clang::CIRGen cir
44+
} // namespace clang::CIRGen
4545

4646
#endif // LLVM_CLANG_LIB_CIR_CIRGENOPENCLRUNTIME_H

0 commit comments

Comments
 (0)