aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/LLVMContext.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-10-21 23:57:35 +0000
committerDevang Patel <dpatel@apple.com>2009-10-21 23:57:35 +0000
commit49708ad993529611cedfbe49ae44bb10beb73abe (patch)
tree5b4e1e0eb704805d78a52af94bda4b15a441ca44 /lib/VMCore/LLVMContext.cpp
parent857eb5793e5d7fc239f75be3a39d9569914aebf0 (diff)
Derive metadata hierarchy from Value instead of User.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84801 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/LLVMContext.cpp')
-rw-r--r--lib/VMCore/LLVMContext.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/lib/VMCore/LLVMContext.cpp b/lib/VMCore/LLVMContext.cpp
index 39ed7ed688..3b4a1a3a15 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;
}