@@ -1443,15 +1443,16 @@ namespace IGCMetrics
14431443 ArrayRef<Value*> Args,
14441444 llvm::Instruction* insertAfter)
14451445 {
1446- llvm::AttributeList atrr;
1447- atrr.addAttribute (pModule->getContext (), 0 , llvm::Attribute::AttrKind::OptimizeNone);
1448- atrr.addAttribute (pModule->getContext (), 1 , llvm::Attribute::AttrKind::NoInline);
1449- atrr.addAttribute (pModule->getContext (), 2 , llvm::Attribute::AttrKind::ReadNone);
1450- atrr.addAttribute (pModule->getContext (), 3 , llvm::Attribute::AttrKind::NoAlias);
1446+ auto & ctx = pModule->getContext ();
1447+ auto atrr = llvm::AttributeList::get (ctx, {
1448+ {0 , llvm::Attribute::get (ctx, llvm::Attribute::AttrKind::OptimizeNone)},
1449+ {1 , llvm::Attribute::get (ctx, llvm::Attribute::AttrKind::NoInline)},
1450+ {2 , llvm::Attribute::get (ctx, llvm::Attribute::AttrKind::ReadNone)},
1451+ {3 , llvm::Attribute::get (ctx, llvm::Attribute::AttrKind::NoAlias)} });
14511452
14521453 auto funcType = llvm::FunctionType::get (
1453- llvm::Type::getVoidTy (pModule-> getContext () ),
1454- { llvm::Type::getMetadataTy (pModule-> getContext ()) , llvm::Type::getMetadataTy (pModule-> getContext () ) }, false );
1454+ llvm::Type::getVoidTy (ctx ),
1455+ { llvm::Type::getMetadataTy (ctx) , llvm::Type::getMetadataTy (ctx ) }, false );
14551456
14561457 auto funcVal = pModule->getOrInsertFunction (trackCall, funcType, atrr);
14571458
0 commit comments