Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
HerrCai0907 committed Sep 20, 2024
1 parent fdca172 commit 274ab37
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
7 changes: 4 additions & 3 deletions clang/lib/CodeGen/CGBuiltin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -587,9 +587,10 @@ static Value *emitCallMaybeConstrainedFPBuiltin(CodeGenFunction &CGF,
// matching the argument type. It is assumed that only the first argument is
// overloaded.
template <unsigned N>
static Value *emitBuiltinWithOneOverloadedType(CodeGenFunction &CGF, const CallExpr *E,
unsigned IntrinsicID,
llvm::StringRef Name = "") {
static Value *emitBuiltinWithOneOverloadedType(CodeGenFunction &CGF,
const CallExpr *E,
unsigned IntrinsicID,
llvm::StringRef Name = "") {
static_assert(N, "expect non-empty argument");
SmallVector<Value *, N> Args;
for (unsigned I = 0; I < N; ++I)
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/CodeGen/CGOpenMPRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9451,7 +9451,7 @@ static llvm::Value *emitDeviceID(
}

static llvm::Value *emitDynCGGroupMem(const OMPExecutableDirective &D,
CodeGenFunction &CGF) {
CodeGenFunction &CGF) {
llvm::Value *DynCGroupMem = CGF.Builder.getInt32(0);

if (auto *DynMemClause = D.getSingleClause<OMPXDynCGroupMemClause>()) {
Expand Down
11 changes: 6 additions & 5 deletions clang/lib/CodeGen/CGStmtOpenMP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2734,8 +2734,8 @@ GetAlignedMapping(const OMPLoopDirective &S, CodeGenFunction &CGF) {

// Pass OMPLoopDirective (instead of OMPSimdDirective) to make this function
// available for "loop bind(thread)", which maps to "simd".
static void emitOMPSimdDirective(const OMPLoopDirective &S, CodeGenFunction &CGF,
CodeGenModule &CGM) {
static void emitOMPSimdDirective(const OMPLoopDirective &S,
CodeGenFunction &CGF, CodeGenModule &CGM) {
bool UseOMPIRBuilder =
CGM.getLangOpts().OpenMPIRBuilder && isSimdSupportedByOpenMPIRBuilder(S);
if (UseOMPIRBuilder) {
Expand Down Expand Up @@ -3988,7 +3988,7 @@ convertClauseKindToSchedKind(OpenMPScheduleClauseKind ScheduleClauseKind) {
// Pass OMPLoopDirective (instead of OMPForDirective) to make this function
// available for "loop bind(parallel)", which maps to "for".
static void emitOMPForDirective(const OMPLoopDirective &S, CodeGenFunction &CGF,
CodeGenModule &CGM, bool HasCancel) {
CodeGenModule &CGM, bool HasCancel) {
bool HasLastprivates = false;
bool UseOMPIRBuilder = CGM.getLangOpts().OpenMPIRBuilder &&
isForSupportedByOpenMPIRBuilder(S, HasCancel);
Expand Down Expand Up @@ -5968,8 +5968,9 @@ void CodeGenFunction::EmitOMPDistributeLoop(const OMPLoopDirective &S,

// Pass OMPLoopDirective (instead of OMPDistributeDirective) to make this
// function available for "loop bind(teams)", which maps to "distribute".
static void emitOMPDistributeDirective(const OMPLoopDirective &S, CodeGenFunction &CGF,
CodeGenModule &CGM) {
static void emitOMPDistributeDirective(const OMPLoopDirective &S,
CodeGenFunction &CGF,
CodeGenModule &CGM) {
auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &) {
CGF.EmitOMPDistributeLoop(S, emitOMPLoopBodyWithStopPoint, S.getInc());
};
Expand Down
9 changes: 5 additions & 4 deletions clang/lib/CodeGen/CodeGenModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -784,8 +784,9 @@ getLLVMVisibility(clang::LangOptions::VisibilityFromDLLStorageClassKinds K) {
llvm_unreachable("unknown option value!");
}

static void setLLVMVisibility(llvm::GlobalValue &GV,
std::optional<llvm::GlobalValue::VisibilityTypes> V) {
static void
setLLVMVisibility(llvm::GlobalValue &GV,
std::optional<llvm::GlobalValue::VisibilityTypes> V) {
if (!V)
return;

Expand Down Expand Up @@ -4224,8 +4225,8 @@ TargetMVPriority(const TargetInfo &TI,
// in the cases of CPUDispatch, this causes issues. This also makes sure we
// work with internal linkage functions, so that the same function name can be
// used with internal linkage in multiple TUs.
static llvm::GlobalValue::LinkageTypes getMultiversionLinkage(CodeGenModule &CGM,
GlobalDecl GD) {
static llvm::GlobalValue::LinkageTypes
getMultiversionLinkage(CodeGenModule &CGM, GlobalDecl GD) {
const FunctionDecl *FD = cast<FunctionDecl>(GD.getDecl());
if (FD->getFormalLinkage() == Linkage::Internal)
return llvm::GlobalValue::InternalLinkage;
Expand Down

0 comments on commit 274ab37

Please sign in to comment.