@@ -1166,17 +1166,17 @@ static llvm::Function *createComputeDepFunction(CodeGenFunction &CGF,
11661166 SmallVector<llvm::Type *, 4 > ArgsTypeList;
11671167 SmallVector<llvm::Value *, 4 > ArgsValueList;
11681168
1169- for (const auto p : ExprInvolvedVarList) {
1169+ for (const auto & p : ExprInvolvedVarList) {
11701170 llvm::Value *V = p.second .getPointer (CGF);
11711171 ArgsTypeList.push_back (V->getType ());
11721172 ArgsValueList.push_back (V);
11731173 }
1174- for (const auto p : VLASizeInvolvedMap) {
1174+ for (const auto & p : VLASizeInvolvedMap) {
11751175 llvm::Value *V = p.second ;
11761176 ArgsTypeList.push_back (V->getType ());
11771177 ArgsValueList.push_back (V);
11781178 }
1179- for (const auto p : CaptureInvolvedMap) {
1179+ for (const auto & p : CaptureInvolvedMap) {
11801180 Address Addr = p.second ;
11811181 llvm::Value *V = Addr.getPointer ();
11821182 ArgsTypeList.push_back (V->getType ());
@@ -1260,7 +1260,7 @@ void CGOmpSsRuntime::EmitDependencyList(
12601260 {
12611261 CodeGenFunction::OSSPrivateScope InitScope (NewCGF);
12621262 auto ArgI = ComputeDepFun->arg_begin ();
1263- for (const auto p : DependInfoGathering.getInvolvedVarList ()) {
1263+ for (const auto & p : DependInfoGathering.getInvolvedVarList ()) {
12641264 const VarDecl *VD = p.first ;
12651265 LValue LV = p.second ;
12661266 InitScope.addPrivate (VD, [&ArgI, &LV]() -> Address {
@@ -1269,7 +1269,7 @@ void CGOmpSsRuntime::EmitDependencyList(
12691269
12701270 ++ArgI;
12711271 }
1272- for (const auto p : DependInfoGathering.getVLASizeInvolvedMap ()) {
1272+ for (const auto & p : DependInfoGathering.getVLASizeInvolvedMap ()) {
12731273 const Expr *VLASizeExpr = p.first ;
12741274 InitScope.addPrivateVLA (VLASizeExpr, [ArgI]() -> llvm::Value * {
12751275 return ArgI;
@@ -1278,7 +1278,7 @@ void CGOmpSsRuntime::EmitDependencyList(
12781278 ++ArgI;
12791279 }
12801280 CaptureMapTy CaptureReplacedMap;
1281- for (const auto p : DependInfoGathering.getCaptureInvolvedMap ()) {
1281+ for (const auto & p : DependInfoGathering.getCaptureInvolvedMap ()) {
12821282 const VarDecl *VD = p.first ;
12831283 Address Addr = p.second ;
12841284 Address NewAddr = Address (ArgI, Addr.getAlignment ());
@@ -1405,15 +1405,15 @@ void CGOmpSsRuntime::EmitDependencyList(
14051405 List.push_back (DependInfoGathering.getBaseValue ());
14061406 List.push_back (ComputeDepFun);
14071407
1408- for (const auto p : DependInfoGathering.getInvolvedVarList ()) {
1408+ for (const auto & p : DependInfoGathering.getInvolvedVarList ()) {
14091409 LValue LV = p.second ;
14101410 List.push_back (LV.getPointer (CGF));
14111411 }
1412- for (const auto p : DependInfoGathering.getVLASizeInvolvedMap ()) {
1412+ for (const auto & p : DependInfoGathering.getVLASizeInvolvedMap ()) {
14131413 llvm::Value *VLASizeValue = p.second ;
14141414 List.push_back (VLASizeValue);
14151415 }
1416- for (const auto p : DependInfoGathering.getCaptureInvolvedMap ()) {
1416+ for (const auto & p : DependInfoGathering.getCaptureInvolvedMap ()) {
14171417 Address Addr = p.second ;
14181418 llvm::Value *V = Addr.getPointer ();
14191419 List.push_back (V);
0 commit comments