IR: MDNode => Value: Instruction::getMetadata()
Change `Instruction::getMetadata()` to return `Value` as part of
PR21433.
Update most callers to use `Instruction::getMDNode()`, which wraps the
result in a `cast_or_null<MDNode>`.
llvm-svn: 221024
diff --git a/llvm/lib/Analysis/BranchProbabilityInfo.cpp b/llvm/lib/Analysis/BranchProbabilityInfo.cpp
index bbd8750..4e083d2 100644
--- a/llvm/lib/Analysis/BranchProbabilityInfo.cpp
+++ b/llvm/lib/Analysis/BranchProbabilityInfo.cpp
@@ -180,7 +180,7 @@
if (!isa<BranchInst>(TI) && !isa<SwitchInst>(TI))
return false;
- MDNode *WeightsNode = TI->getMetadata(LLVMContext::MD_prof);
+ MDNode *WeightsNode = TI->getMDNode(LLVMContext::MD_prof);
if (!WeightsNode)
return false;