IR: MDNode => Value: Instruction::getAllMetadataOtherThanDebugLoc()

Change `Instruction::getAllMetadataOtherThanDebugLoc()` from a vector of
`MDNode` to one of `Value`.  Part of PR21433.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221167 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2014-11-03 18:13:57 +00:00
parent c3606b6b2e
commit 5e84760dde
11 changed files with 23 additions and 24 deletions

View File

@@ -1308,13 +1308,13 @@ bool llvm::removeUnreachableBlocks(Function &F) {
}
void llvm::combineMetadata(Instruction *K, const Instruction *J, ArrayRef<unsigned> KnownIDs) {
SmallVector<std::pair<unsigned, MDNode*>, 4> Metadata;
SmallVector<std::pair<unsigned, Value *>, 4> Metadata;
K->dropUnknownMetadata(KnownIDs);
K->getAllMetadataOtherThanDebugLoc(Metadata);
for (unsigned i = 0, n = Metadata.size(); i < n; ++i) {
unsigned Kind = Metadata[i].first;
MDNode *JMD = J->getMDNode(Kind);
MDNode *KMD = Metadata[i].second;
MDNode *KMD = cast<MDNode>(Metadata[i].second);
switch (Kind) {
default: