[llvm] r353134 - Fix narrowing issue from r353129
Richard Trieu via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 4 18:26:04 PST 2019
Author: rtrieu
Date: Mon Feb 4 18:26:03 2019
New Revision: 353134
URL: http://llvm.org/viewvc/llvm-project?rev=353134&view=rev
Log:
Fix narrowing issue from r353129
Modified:
llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp
Modified: llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp?rev=353134&r1=353133&r2=353134&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp Mon Feb 4 18:26:03 2019
@@ -1328,7 +1328,8 @@ void SampleProfileLoader::propagateWeigh
SortedCallTargets.size());
} else if (!dyn_cast<IntrinsicInst>(&I)) {
I.setMetadata(LLVMContext::MD_prof,
- MDB.createBranchWeights({BlockWeights[BB]}));
+ MDB.createBranchWeights(
+ {static_cast<uint32_t>(BlockWeights[BB])}));
}
}
}
More information about the llvm-commits
mailing list