diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-11-03 18:13:57 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-11-03 18:13:57 +0000 |
commit | 3d5a02f677262841d951257b928e49d18c460410 (patch) | |
tree | cb589318c6689855bdf6e45ce3cfd6e9932f4e91 /llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | |
parent | 1d8cc909cc1bd6cb2e78d179a2c33b30610215a9 (diff) | |
download | bcm5719-llvm-3d5a02f677262841d951257b928e49d18c460410.tar.gz bcm5719-llvm-3d5a02f677262841d951257b928e49d18c460410.zip |
IR: MDNode => Value: Instruction::getAllMetadataOtherThanDebugLoc()
Change `Instruction::getAllMetadataOtherThanDebugLoc()` from a vector of
`MDNode` to one of `Value`. Part of PR21433.
llvm-svn: 221167
Diffstat (limited to 'llvm/lib/Bitcode/Writer/ValueEnumerator.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp index c14591acc8a..902bb27c1e9 100644 --- a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp +++ b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp @@ -321,7 +321,7 @@ ValueEnumerator::ValueEnumerator(const Module *M) { EnumerateValueSymbolTable(M->getValueSymbolTable()); EnumerateNamedMetadata(M); - SmallVector<std::pair<unsigned, MDNode*>, 8> MDs; + SmallVector<std::pair<unsigned, Value *>, 8> MDs; // Enumerate types used by function bodies and argument lists. for (const Function &F : *M) { @@ -347,7 +347,7 @@ ValueEnumerator::ValueEnumerator(const Module *M) { MDs.clear(); I.getAllMetadataOtherThanDebugLoc(MDs); for (unsigned i = 0, e = MDs.size(); i != e; ++i) - EnumerateMetadata(MDs[i].second); + EnumerateMetadata(cast<MDNode>(MDs[i].second)); if (!I.getDebugLoc().isUnknown()) { MDNode *Scope, *IA; @@ -741,10 +741,10 @@ void ValueEnumerator::incorporateFunction(const Function &F) { FnLocalMDVector.push_back(MD); } - SmallVector<std::pair<unsigned, MDNode*>, 8> MDs; + SmallVector<std::pair<unsigned, Value *>, 8> MDs; I->getAllMetadataOtherThanDebugLoc(MDs); for (unsigned i = 0, e = MDs.size(); i != e; ++i) { - MDNode *N = MDs[i].second; + auto *N = cast<MDNode>(MDs[i].second); if (N->isFunctionLocal() && N->getFunction()) FnLocalMDVector.push_back(N); } |