diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2009-10-23 14:19:52 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2009-10-23 14:19:52 +0000 |
commit | 9643cca39fb9fb3b49a8912926de98acf882283c (patch) | |
tree | 22cc59e4b240d84c3a5a60531119c4eca914a256 /lib/VMCore/LLVMContext.cpp | |
parent | 1adacceba9c9ee0f16e54388e56c9a249b296f75 (diff) | |
download | FreeBSD-src-9643cca39fb9fb3b49a8912926de98acf882283c.zip FreeBSD-src-9643cca39fb9fb3b49a8912926de98acf882283c.tar.gz |
Update LLVM to r84949.
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 39ed7ed..3b4a1a3 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; } |