[llvm-commits] [bug_122] CVS: llvm/lib/Transforms/Utils/CloneModule.cpp Linker.cpp
LLVM
llvm at cs.uiuc.edu
Wed May 12 11:33:34 PDT 2004
Changes in directory llvm/lib/Transforms/Utils:
CloneModule.cpp updated: 1.9 -> 1.9.6.1
Linker.cpp updated: 1.69 -> 1.69.2.1
---
Log message:
Change SymbolTable to not subclass from std::map but to embed one instead
and cleanup use of SymbolTable in rest of LLVM. Also, add some new methods
to SymbolTable for small/utility cases and substitute calls to them in
LLVM.
---
Diffs of the changes: (+8 -8)
Index: llvm/lib/Transforms/Utils/CloneModule.cpp
diff -u llvm/lib/Transforms/Utils/CloneModule.cpp:1.9 llvm/lib/Transforms/Utils/CloneModule.cpp:1.9.6.1
--- llvm/lib/Transforms/Utils/CloneModule.cpp:1.9 Fri Jan 9 00:12:15 2004
+++ llvm/lib/Transforms/Utils/CloneModule.cpp Wed May 12 11:33:43 2004
@@ -33,9 +33,9 @@
// Copy all of the type symbol table entries over...
const SymbolTable &SymTab = M->getSymbolTable();
- SymbolTable::const_iterator TypeI = SymTab.find(Type::TypeTy);
+ SymbolTable::type_const_iterator TypeI = SymTab.find(Type::TypeTy);
if (TypeI != SymTab.end())
- for (SymbolTable::VarMap::const_iterator I = TypeI->second.begin(),
+ for (SymbolTable::value_const_iterator I = TypeI->second.begin(),
E = TypeI->second.end(); I != E; ++I)
New->addTypeName(I->first, cast<Type>(I->second));
Index: llvm/lib/Transforms/Utils/Linker.cpp
diff -u llvm/lib/Transforms/Utils/Linker.cpp:1.69 llvm/lib/Transforms/Utils/Linker.cpp:1.69.2.1
--- llvm/lib/Transforms/Utils/Linker.cpp:1.69 Tue Mar 30 20:58:28 2004
+++ llvm/lib/Transforms/Utils/Linker.cpp Wed May 12 11:33:43 2004
@@ -172,7 +172,7 @@
const SymbolTable *SrcST = &Src->getSymbolTable();
// Look for a type plane for Type's...
- SymbolTable::const_iterator PI = SrcST->find(Type::TypeTy);
+ SymbolTable::type_const_iterator PI = SrcST->find(Type::TypeTy);
if (PI == SrcST->end()) return false; // No named types, do nothing.
// Some types cannot be resolved immediately because they depend on other
@@ -180,8 +180,8 @@
// are waiting to recheck.
std::vector<std::string> DelayedTypesToResolve;
- const SymbolTable::VarMap &VM = PI->second;
- for (SymbolTable::type_const_iterator I = VM.begin(), E = VM.end();
+ const SymbolTable::ValueMap &VM = PI->second;
+ for (SymbolTable::value_const_iterator I = VM.begin(), E = VM.end();
I != E; ++I) {
const std::string &Name = I->first;
Type *RHS = cast<Type>(I->second);
@@ -383,12 +383,12 @@
// It doesn't exist exactly, scan through all of the type planes in the symbol
// table, checking each of them for a type-compatible version.
//
- for (SymbolTable::iterator I = ST->begin(), E = ST->end(); I != E; ++I)
+ for (SymbolTable::type_iterator I = ST->begin(), E = ST->end(); I != E; ++I)
if (I->first != Type::TypeTy) {
- SymbolTable::VarMap &VM = I->second;
+ SymbolTable::ValueMap &VM = I->second;
// Does this type plane contain an entry with the specified name?
- SymbolTable::type_iterator TI = VM.find(Name);
+ SymbolTable::value_iterator TI = VM.find(Name);
if (TI != VM.end()) {
//
// Ensure that this type if placed correctly into the symbol table.
More information about the llvm-commits
mailing list