IR: MDNode => Value: Add Instruction::getMDNode()
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 31 Oct 2014 23:58:04 +0000 (23:58 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 31 Oct 2014 23:58:04 +0000 (23:58 +0000)
commit9ed44978efe98a42df1cbf9c3737e29c556b9885
tree3085d87ff0739c7f7f333f21381bbc9a74af11e3
parent8d2e511d3b97b4ad79b4f86bae5acb0a255ba38b
IR: MDNode => Value: Add Instruction::getMDNode()

Add `Instruction::getMDNode()` that casts to `MDNode` before changing
`Instruction::getMetadata()` to return `Value`.  This avoids adding
`cast_or_null<MDNode>` boiler-plate throughout the code.

Part of PR21433.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221023 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/Instruction.h
lib/IR/Metadata.cpp