[llvm-commits] CVS: llvm/lib/Transforms/Utils/BasicBlockUtils.cpp Linker.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Nov 20 12:35:07 PST 2002


Changes in directory llvm/lib/Transforms/Utils:

BasicBlockUtils.cpp updated: 1.4 -> 1.5
Linker.cpp updated: 1.33 -> 1.34

---
Log message:

  - Eliminated the deferred symbol table stuff in Module & Function, it really
    wasn't an optimization and it was causing lots of bugs.


---
Diffs of the changes:

Index: llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
diff -u llvm/lib/Transforms/Utils/BasicBlockUtils.cpp:1.4 llvm/lib/Transforms/Utils/BasicBlockUtils.cpp:1.5
--- llvm/lib/Transforms/Utils/BasicBlockUtils.cpp:1.4	Tue Oct 29 17:04:01 2002
+++ llvm/lib/Transforms/Utils/BasicBlockUtils.cpp	Wed Nov 20 12:34:39 2002
@@ -28,7 +28,7 @@
 
   // Make sure to propagate a name if there is one already...
   if (OldName.size() && !V->hasName())
-    V->setName(OldName, BIL.getParent()->getSymbolTable());
+    V->setName(OldName, &BIL.getParent()->getSymbolTable());
 }
 
 


Index: llvm/lib/Transforms/Utils/Linker.cpp
diff -u llvm/lib/Transforms/Utils/Linker.cpp:1.33 llvm/lib/Transforms/Utils/Linker.cpp:1.34
--- llvm/lib/Transforms/Utils/Linker.cpp:1.33	Sun Oct 13 15:53:12 2002
+++ llvm/lib/Transforms/Utils/Linker.cpp	Wed Nov 20 12:34:39 2002
@@ -32,11 +32,8 @@
 // Make sure there are no type name conflicts.
 //
 static bool LinkTypes(Module *Dest, const Module *Src, string *Err = 0) {
-  // No symbol table?  Can't have named types.
-  if (!Src->hasSymbolTable()) return false;
-
-  SymbolTable       *DestST = Dest->getSymbolTableSure();
-  const SymbolTable *SrcST  = Src->getSymbolTable();
+  SymbolTable       *DestST = &Dest->getSymbolTable();
+  const SymbolTable *SrcST  = &Src->getSymbolTable();
 
   // Look for a type plane for Type's...
   SymbolTable::const_iterator PI = SrcST->find(Type::TypeTy);
@@ -176,7 +173,7 @@
                         map<const Value*, Value*> &ValueMap, string *Err = 0) {
   // We will need a module level symbol table if the src module has a module
   // level symbol table...
-  SymbolTable *ST = Src->getSymbolTable() ? Dest->getSymbolTableSure() : 0;
+  SymbolTable *ST = (SymbolTable*)&Src->getSymbolTable();
   
   // Loop over all of the globals in the src module, mapping them over as we go
   //
@@ -266,7 +263,7 @@
                                string *Err = 0) {
   // We will need a module level symbol table if the src module has a module
   // level symbol table...
-  SymbolTable *ST = Src->getSymbolTable() ? Dest->getSymbolTableSure() : 0;
+  SymbolTable *ST = (SymbolTable*)&Src->getSymbolTable();
   
   // Loop over all of the functions in the src module, mapping them over as we
   // go





More information about the llvm-commits mailing list