diff options
| -rw-r--r-- | llvm/lib/Transforms/IPO/SampleProfile.cpp | 5 | 
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/SampleProfile.cpp b/llvm/lib/Transforms/IPO/SampleProfile.cpp index bc2ceec8ba4..74831846626 100644 --- a/llvm/lib/Transforms/IPO/SampleProfile.cpp +++ b/llvm/lib/Transforms/IPO/SampleProfile.cpp @@ -1327,9 +1327,8 @@ void SampleProfileLoader::propagateWeights(Function &F) {                              SortedCallTargets, Sum, IPVK_IndirectCallTarget,                              SortedCallTargets.size());          } else if (!dyn_cast<IntrinsicInst>(&I)) { -          SmallVector<uint32_t, 1> Weights; -          Weights.push_back(BlockWeights[BB]); -          I.setMetadata(LLVMContext::MD_prof, MDB.createBranchWeights(Weights)); +          I.setMetadata(LLVMContext::MD_prof, +                        MDB.createBranchWeights({BlockWeights[BB]}));          }        }      }  | 

