[llvm-commits] CVS: llvm/tools/lli/ExternalFunctions.cpp Support.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Nov 20 12:36:01 PST 2002


Changes in directory llvm/tools/lli:

ExternalFunctions.cpp updated: 1.38 -> 1.39
Support.cpp updated: 1.4 -> 1.5

---
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/tools/lli/ExternalFunctions.cpp
diff -u llvm/tools/lli/ExternalFunctions.cpp:1.38 llvm/tools/lli/ExternalFunctions.cpp:1.39
--- llvm/tools/lli/ExternalFunctions.cpp:1.38	Fri Nov  8 13:10:26 2002
+++ llvm/tools/lli/ExternalFunctions.cpp	Wed Nov 20 12:35:26 2002
@@ -437,16 +437,15 @@
 
     // Check to see if the currently loaded module contains an __iob symbol...
     GlobalVariable *IOB = 0;
-    if (SymbolTable *ST = M->getSymbolTable()) {
-      for (SymbolTable::iterator I = ST->begin(), E = ST->end(); I != E; ++I) {
-        SymbolTable::VarMap &M = I->second;
-        for (SymbolTable::VarMap::iterator J = M.begin(), E = M.end();
-             J != E; ++J)
-          if (J->first == "__iob")
-            if ((IOB = dyn_cast<GlobalVariable>(J->second)))
-              break;
-        if (IOB) break;
-      }
+    SymbolTable &ST = M->getSymbolTable();
+    for (SymbolTable::iterator I = ST.begin(), E = ST.end(); I != E; ++I) {
+      SymbolTable::VarMap &M = I->second;
+      for (SymbolTable::VarMap::iterator J = M.begin(), E = M.end();
+           J != E; ++J)
+        if (J->first == "__iob")
+          if ((IOB = dyn_cast<GlobalVariable>(J->second)))
+            break;
+      if (IOB) break;
     }
 
     // If we found an __iob symbol now, find out what the actual address it's


Index: llvm/tools/lli/Support.cpp
diff -u llvm/tools/lli/Support.cpp:1.4 llvm/tools/lli/Support.cpp:1.5
--- llvm/tools/lli/Support.cpp:1.4	Sat Apr 27 23:55:14 2002
+++ llvm/tools/lli/Support.cpp	Wed Nov 20 12:35:26 2002
@@ -15,13 +15,10 @@
 // LookupMatchingNames helper - Search a symbol table for values matching Name.
 //
 static inline void LookupMatchingNames(const std::string &Name,
-                                       SymbolTable *SymTab,
+                                       SymbolTable &SymTab,
 				       std::vector<Value*> &Results) {
-  if (SymTab == 0) return;                         // No symbolic values :(
-
   // Loop over all of the type planes in the symbol table...
-  for (SymbolTable::iterator I = SymTab->begin(), E = SymTab->end();
-       I != E; ++I) {
+  for (SymbolTable::iterator I = SymTab.begin(), E = SymTab.end(); I != E; ++I){
     SymbolTable::VarMap &Plane = I->second;
     
     // Search the symbol table plane for this name...





More information about the llvm-commits mailing list