Types and constants are wierd things in symbol tables now

llvm-svn: 457
diff --git a/llvm/lib/Transforms/Scalar/SymbolStripping.cpp b/llvm/lib/Transforms/Scalar/SymbolStripping.cpp
index bafcee6..2f40f58 100644
--- a/llvm/lib/Transforms/Scalar/SymbolStripping.cpp
+++ b/llvm/lib/Transforms/Scalar/SymbolStripping.cpp
@@ -26,11 +26,15 @@
   for (SymbolTable::iterator I = SymTab->begin(); I != SymTab->end(); ++I) {
     map<const string, Value *> &Plane = I->second;
     
-    map<const string, Value *>::iterator B;
+    SymbolTable::type_iterator B;
     while ((B = Plane.begin()) != Plane.end()) {   // Found nonempty type plane!
-      B->second->setName("");     // Set name to "", removing from symbol table!
+      Value *V = B->second;
+      if (V->isConstant() || V->isType())
+	SymTab->type_remove(B);
+      else 
+	V->setName("", SymTab);   // Set name to "", removing from symbol table!
       RemovedSymbol = true;
-      assert(Plane.begin() != B);
+      assert(Plane.begin() != B && "Symbol not removed from table!");
     }
   }