summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/SampleProfile.cpp
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2019-02-05 02:26:03 +0000
committerRichard Trieu <rtrieu@google.com>2019-02-05 02:26:03 +0000
commita9354b2f33730f4d4dddb0bdd0396c799f38ac7d (patch)
treef02b29174ba7425ca24601af3283280b8053f36c /llvm/lib/Transforms/IPO/SampleProfile.cpp
parente37ba2cb967def19d15ec9395b8ede7a0bb968a4 (diff)
downloadbcm5719-llvm-a9354b2f33730f4d4dddb0bdd0396c799f38ac7d.tar.gz
bcm5719-llvm-a9354b2f33730f4d4dddb0bdd0396c799f38ac7d.zip
Fix narrowing issue from r353129
llvm-svn: 353134
Diffstat (limited to 'llvm/lib/Transforms/IPO/SampleProfile.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/SampleProfile.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/SampleProfile.cpp b/llvm/lib/Transforms/IPO/SampleProfile.cpp
index 74831846626..0b880b1e431 100644
--- a/llvm/lib/Transforms/IPO/SampleProfile.cpp
+++ b/llvm/lib/Transforms/IPO/SampleProfile.cpp
@@ -1328,7 +1328,8 @@ void SampleProfileLoader::propagateWeights(Function &F) {
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])}));
}
}
}
OpenPOWER on IntegriCloud