diff options
author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-10-23 14:19:52 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-10-23 14:19:52 +0000 |
commit | 4a142eb28942073eb27a112b5ca1cca3f01beb9c (patch) | |
tree | 22cc59e4b240d84c3a5a60531119c4eca914a256 /lib/VMCore/LLVMContext.cpp | |
parent | 5cd822fa9bbb9622241e3bf4d7674ed49ccde5b9 (diff) |
Diffstat (limited to 'lib/VMCore/LLVMContext.cpp')
-rw-r--r-- | lib/VMCore/LLVMContext.cpp | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/lib/VMCore/LLVMContext.cpp b/lib/VMCore/LLVMContext.cpp index 39ed7ed688282..3b4a1a3a15540 100644 --- a/lib/VMCore/LLVMContext.cpp +++ b/lib/VMCore/LLVMContext.cpp @@ -45,32 +45,6 @@ GetElementPtrConstantExpr::GetElementPtrConstantExpr OperandList[i+1] = IdxList[i]; } -bool LLVMContext::RemoveDeadMetadata() { - std::vector<WeakVH> DeadMDNodes; - bool Changed = false; - while (1) { - - for (FoldingSet<MDNode>::iterator - I = pImpl->MDNodeSet.begin(), - E = pImpl->MDNodeSet.end(); I != E; ++I) { - MDNode *N = &(*I); - if (N->use_empty()) - DeadMDNodes.push_back(WeakVH(N)); - } - - if (DeadMDNodes.empty()) - return Changed; - - while (!DeadMDNodes.empty()) { - Value *V = DeadMDNodes.back(); DeadMDNodes.pop_back(); - if (const MDNode *N = dyn_cast_or_null<MDNode>(V)) - if (N->use_empty()) - delete N; - } - } - return Changed; -} - MetadataContext &LLVMContext::getMetadata() { return pImpl->TheMetadata; } |