Skip to content

Commit c4905e0

Browse files
committed
Fix initialization of a fallback variable
1 parent 3307ec1 commit c4905e0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/lib/CodeGen/CGOpenMPRuntime.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10003,7 +10003,7 @@ static llvm::Value *emitDeviceID(
1000310003
static std::pair<llvm::Value *, OMPDynGroupprivateFallbackType>
1000410004
emitDynCGroupMem(const OMPExecutableDirective &D, CodeGenFunction &CGF) {
1000510005
llvm::Value *DynGP = CGF.Builder.getInt32(0);
10006-
OMPDynGroupprivateFallbackType DynGPFallback;
10006+
auto DynGPFallback = OMPDynGroupprivateFallbackType::Abort;
1000710007

1000810008
if (auto *DynGPClause = D.getSingleClause<OMPDynGroupprivateClause>()) {
1000910009
CodeGenFunction::RunCleanupsScope DynGPScope(CGF);
@@ -10034,7 +10034,6 @@ emitDynCGroupMem(const OMPExecutableDirective &D, CodeGenFunction &CGF) {
1003410034
/*IgnoreResultAssign=*/true);
1003510035
DynGP = CGF.Builder.CreateIntCast(DynCGMemVal, CGF.Int32Ty,
1003610036
/*isSigned=*/false);
10037-
DynGPFallback = OMPDynGroupprivateFallbackType::Abort;
1003810037
}
1003910038
return {DynGP, DynGPFallback};
1004010039
}

0 commit comments

Comments
 (0)