Skip to content

Commit 0f2a014

Browse files
authored
Fix -Wbraced-scalar-init warnings when building with Clang (JuliaLang#23007)
1 parent fc10c8b commit 0f2a014

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/llvm-alloc-opt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ bool AllocOpt::runOnFunction(Function &F)
636636
ptr = cast<Instruction>(prolog_builder.CreateConstGEP1_32(T_int8, ptr, align));
637637
auto casti = prolog_builder.CreateBitCast(ptr, T_pprjlvalue);
638638
auto tagaddr = prolog_builder.CreateGEP(T_prjlvalue, casti,
639-
{ConstantInt::get(T_size, -1)});
639+
ConstantInt::get(T_size, -1));
640640
// Store should be created at the callsite and not in the prolog
641641
auto store = new StoreInst(orig->getArgOperand(2), tagaddr, orig);
642642
store->setMetadata(LLVMContext::MD_tbaa, tbaa_tag);

src/llvm-late-gc-lowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@ bool LateLowerGCFrame::CleanupIR(Function &F) {
11701170
auto derived = builder.CreateAddrSpaceCast(newI, T_pjlvalue_der);
11711171
auto cast = builder.CreateBitCast(derived, T_ppjlvalue_der);
11721172
auto tagaddr = builder.CreateGEP(T_prjlvalue, cast,
1173-
{ConstantInt::get(T_size, -1)});
1173+
ConstantInt::get(T_size, -1));
11741174
auto store = builder.CreateStore(CI->getArgOperand(2), tagaddr);
11751175
store->setMetadata(LLVMContext::MD_tbaa, tbaa_tag);
11761176
CI->replaceAllUsesWith(newI);

0 commit comments

Comments
 (0)