summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Verifier.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-11-01 00:10:31 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-11-01 00:10:31 +0000
commit3872d0084c4f479020ce01b4db5d1bd414c57fb8 (patch)
treefd1a9e83666fa84a3916b46a94cca32978b34794 /llvm/lib/IR/Verifier.cpp
parent7c4fc4e5ae4c8145974397da295587e77c770f62 (diff)
downloadbcm5719-llvm-3872d0084c4f479020ce01b4db5d1bd414c57fb8.tar.gz
bcm5719-llvm-3872d0084c4f479020ce01b4db5d1bd414c57fb8.zip
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
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r--llvm/lib/IR/Verifier.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index b7c2ee24111..e2fb62fdeef 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -2267,7 +2267,7 @@ void Verifier::visitInstruction(Instruction &I) {
}
}
- if (MDNode *MD = I.getMetadata(LLVMContext::MD_fpmath)) {
+ if (MDNode *MD = I.getMDNode(LLVMContext::MD_fpmath)) {
Assert1(I.getType()->isFPOrFPVectorTy(),
"fpmath requires a floating point result!", &I);
Assert1(MD->getNumOperands() == 1, "fpmath takes one operand!", &I);
@@ -2281,7 +2281,7 @@ void Verifier::visitInstruction(Instruction &I) {
}
}
- if (MDNode *Range = I.getMetadata(LLVMContext::MD_range)) {
+ if (MDNode *Range = I.getMDNode(LLVMContext::MD_range)) {
Assert1(isa<LoadInst>(I) || isa<CallInst>(I) || isa<InvokeInst>(I),
"Ranges are only for loads, calls and invokes!", &I);
visitRangeMetadata(I, Range, I.getType());
@@ -2587,7 +2587,7 @@ void DebugInfoVerifier::verifyDebugInfo() {
void DebugInfoVerifier::processInstructions(DebugInfoFinder &Finder) {
for (const Function &F : *M)
for (auto I = inst_begin(&F), E = inst_end(&F); I != E; ++I) {
- if (MDNode *MD = I->getMetadata(LLVMContext::MD_dbg))
+ if (MDNode *MD = I->getMDNode(LLVMContext::MD_dbg))
Finder.processLocation(*M, DILocation(MD));
if (const CallInst *CI = dyn_cast<CallInst>(&*I))
processCallInst(Finder, *CI);
OpenPOWER on IntegriCloud