@@ -438,7 +438,7 @@ TEST_F(IRBuilderTest, ConstrainedFPFunctionCall) {
438438 // Now call the empty constrained FP function.
439439 Builder.setIsFPConstrained (true );
440440 Builder.setConstrainedFPFunctionAttr ();
441- CallInst *FCall = Builder.CreateCall (Callee, std:: nullopt );
441+ CallInst *FCall = Builder.CreateCall (Callee, {} );
442442
443443 // Check the attributes to verify the strictfp attribute is on the call.
444444 EXPECT_TRUE (
@@ -697,24 +697,24 @@ TEST_F(IRBuilderTest, FastMathFlags) {
697697 auto Callee =
698698 Function::Create (CalleeTy, Function::ExternalLinkage, " " , M.get ());
699699
700- FCall = Builder.CreateCall (Callee, std:: nullopt );
700+ FCall = Builder.CreateCall (Callee, {} );
701701 EXPECT_FALSE (FCall->hasNoNaNs ());
702702
703703 Function *V =
704704 Function::Create (CalleeTy, Function::ExternalLinkage, " " , M.get ());
705- FCall = Builder.CreateCall (V, std:: nullopt );
705+ FCall = Builder.CreateCall (V, {} );
706706 EXPECT_FALSE (FCall->hasNoNaNs ());
707707
708708 FMF.clear ();
709709 FMF.setNoNaNs ();
710710 Builder.setFastMathFlags (FMF);
711711
712- FCall = Builder.CreateCall (Callee, std:: nullopt );
712+ FCall = Builder.CreateCall (Callee, {} );
713713 EXPECT_TRUE (Builder.getFastMathFlags ().any ());
714714 EXPECT_TRUE (Builder.getFastMathFlags ().NoNaNs );
715715 EXPECT_TRUE (FCall->hasNoNaNs ());
716716
717- FCall = Builder.CreateCall (V, std:: nullopt );
717+ FCall = Builder.CreateCall (V, {} );
718718 EXPECT_TRUE (Builder.getFastMathFlags ().any ());
719719 EXPECT_TRUE (Builder.getFastMathFlags ().NoNaNs );
720720 EXPECT_TRUE (FCall->hasNoNaNs ());
@@ -856,7 +856,7 @@ TEST_F(IRBuilderTest, createFunction) {
856856 auto File = DIB.createFile (" error.swift" , " /" );
857857 auto CU =
858858 DIB.createCompileUnit (dwarf::DW_LANG_Swift, File, " swiftc" , true , " " , 0 );
859- auto Type = DIB.createSubroutineType (DIB.getOrCreateTypeArray (std:: nullopt ));
859+ auto Type = DIB.createSubroutineType (DIB.getOrCreateTypeArray ({} ));
860860 auto NoErr = DIB.createFunction (
861861 CU, " noerr" , " " , File, 1 , Type, 1 , DINode::FlagZero,
862862 DISubprogram::SPFlagDefinition | DISubprogram::SPFlagOptimized);
@@ -896,8 +896,7 @@ TEST_F(IRBuilderTest, DIBuilder) {
896896 auto CU = DIB.createCompileUnit (dwarf::DW_LANG_Cobol74,
897897 DIB.createFile (" F.CBL" , " /" ),
898898 " llvm-cobol74" , true , " " , 0 );
899- auto Type =
900- DIB.createSubroutineType (DIB.getOrCreateTypeArray (std::nullopt ));
899+ auto Type = DIB.createSubroutineType (DIB.getOrCreateTypeArray ({}));
901900 auto SP = DIB.createFunction (
902901 CU, " foo" , " " , File, 1 , Type, 1 , DINode::FlagZero,
903902 DISubprogram::SPFlagDefinition | DISubprogram::SPFlagOptimized);
@@ -1014,7 +1013,7 @@ TEST_F(IRBuilderTest, createArtificialSubprogram) {
10141013 auto CU = DIB.createCompileUnit (dwarf::DW_LANG_C, File, " clang" ,
10151014 /* isOptimized=*/ true , /* Flags=*/ " " ,
10161015 /* Runtime Version=*/ 0 );
1017- auto Type = DIB.createSubroutineType (DIB.getOrCreateTypeArray (std:: nullopt ));
1016+ auto Type = DIB.createSubroutineType (DIB.getOrCreateTypeArray ({} ));
10181017 auto SP = DIB.createFunction (
10191018 CU, " foo" , /* LinkageName=*/ " " , File,
10201019 /* LineNo=*/ 1 , Type, /* ScopeLine=*/ 2 , DINode::FlagZero,
@@ -1168,8 +1167,7 @@ TEST_F(IRBuilderTest, DebugLoc) {
11681167 auto CU = DIB.createCompileUnit (dwarf::DW_LANG_C_plus_plus_11,
11691168 DIB.createFile (" tmp.cpp" , " /" ), " " , true , " " ,
11701169 0 );
1171- auto SPType =
1172- DIB.createSubroutineType (DIB.getOrCreateTypeArray (std::nullopt ));
1170+ auto SPType = DIB.createSubroutineType (DIB.getOrCreateTypeArray ({}));
11731171 auto SP =
11741172 DIB.createFunction (CU, " foo" , " foo" , File, 1 , SPType, 1 , DINode::FlagZero,
11751173 DISubprogram::SPFlagDefinition);
@@ -1183,13 +1181,13 @@ TEST_F(IRBuilderTest, DebugLoc) {
11831181 IRBuilder<> Builder (Ctx);
11841182 Builder.SetInsertPoint (Br);
11851183 EXPECT_EQ (DL1, Builder.getCurrentDebugLocation ());
1186- auto Call1 = Builder.CreateCall (Callee, std:: nullopt );
1184+ auto Call1 = Builder.CreateCall (Callee, {} );
11871185 EXPECT_EQ (DL1, Call1->getDebugLoc ());
11881186
11891187 Call1->setDebugLoc (DL2);
11901188 Builder.SetInsertPoint (Call1->getParent (), Call1->getIterator ());
11911189 EXPECT_EQ (DL2, Builder.getCurrentDebugLocation ());
1192- auto Call2 = Builder.CreateCall (Callee, std:: nullopt );
1190+ auto Call2 = Builder.CreateCall (Callee, {} );
11931191 EXPECT_EQ (DL2, Call2->getDebugLoc ());
11941192
11951193 DIB.finalize ();
@@ -1202,7 +1200,7 @@ TEST_F(IRBuilderTest, DIImportedEntity) {
12021200 auto CU = DIB.createCompileUnit (dwarf::DW_LANG_Cobol74,
12031201 F, " llvm-cobol74" ,
12041202 true , " " , 0 );
1205- MDTuple *Elements = MDTuple::getDistinct (Ctx, std:: nullopt );
1203+ MDTuple *Elements = MDTuple::getDistinct (Ctx, {} );
12061204
12071205 DIB.createImportedDeclaration (CU, nullptr , F, 1 );
12081206 DIB.createImportedDeclaration (CU, nullptr , F, 1 );
0 commit comments