Revert 80839 for now. It causes test failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80841 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel
2009-09-02 21:49:26 +00:00
parent d9489cbb0c
commit 8fc5576413
8 changed files with 45 additions and 145 deletions
+4 -5
View File
@@ -13,7 +13,6 @@
//===----------------------------------------------------------------------===//
#include "llvm/LLVMContext.h"
#include "llvm/Metadata.h"
#include "llvm/Constants.h"
#include "llvm/Instruction.h"
#include "llvm/Support/ManagedStatic.h"
@@ -49,10 +48,10 @@ bool LLVMContext::RemoveDeadMetadata() {
bool Changed = false;
while (1) {
for (FoldingSet<MDNode>::iterator
I = pImpl->MDNodeSet.begin(),
E = pImpl->MDNodeSet.end(); I != E; ++I) {
const MDNode *N = &(*I);
for (SmallPtrSet<const MDNode *, 8>::iterator
I = pImpl->MDNodes.begin(),
E = pImpl->MDNodes.end(); I != E; ++I) {
const MDNode *N = cast<MDNode>(*I);
if (N->use_empty())
DeadMDNodes.push_back(N);
}