summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/Linker.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-11-20 18:36:02 +0000
committerChris Lattner <sabre@nondot.org>2002-11-20 18:36:02 +0000
commit98cf1f5d64b0ed95e38842e89f42a11661e9ede7 (patch)
treee116821d17ad7bca39cd763e1705f69b7b405bc5 /llvm/lib/Transforms/Utils/Linker.cpp
parent7c6d9d9eaca381cdeba24640ffcdce297851feb1 (diff)
downloadbcm5719-llvm-98cf1f5d64b0ed95e38842e89f42a11661e9ede7.tar.gz
bcm5719-llvm-98cf1f5d64b0ed95e38842e89f42a11661e9ede7.zip
- Eliminated the deferred symbol table stuff in Module & Function, it really
wasn't an optimization and it was causing lots of bugs. llvm-svn: 4779
Diffstat (limited to 'llvm/lib/Transforms/Utils/Linker.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/Linker.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Utils/Linker.cpp b/llvm/lib/Transforms/Utils/Linker.cpp
index 8fe9113d821..0d3cc9bfa9f 100644
--- a/llvm/lib/Transforms/Utils/Linker.cpp
+++ b/llvm/lib/Transforms/Utils/Linker.cpp
@@ -32,11 +32,8 @@ static inline bool Error(string *E, string Message) {
// 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 @@ static bool LinkGlobals(Module *Dest, const Module *Src,
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 @@ static bool LinkFunctionProtos(Module *Dest, const Module *Src,
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
OpenPOWER on IntegriCloud