Fix big bug introduced with symbol table changes
authorChris Lattner <sabre@nondot.org>
Tue, 3 Dec 2002 18:32:30 +0000 (18:32 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 3 Dec 2002 18:32:30 +0000 (18:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4885 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Linker/LinkModules.cpp
lib/Transforms/Utils/Linker.cpp
lib/VMCore/Linker.cpp

index 0d3cc9bfa9f5cb64762f91f9791b9b8e3b4e98fd..14e36cc012f17e9f20605e35eef00413b91568cb 100644 (file)
@@ -173,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 = (SymbolTable*)&Src->getSymbolTable();
+  SymbolTable *ST = (SymbolTable*)&Dest->getSymbolTable();
   
   // Loop over all of the globals in the src module, mapping them over as we go
   //
@@ -263,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 = (SymbolTable*)&Src->getSymbolTable();
+  SymbolTable *ST = (SymbolTable*)&Dest->getSymbolTable();
   
   // Loop over all of the functions in the src module, mapping them over as we
   // go
index 0d3cc9bfa9f5cb64762f91f9791b9b8e3b4e98fd..14e36cc012f17e9f20605e35eef00413b91568cb 100644 (file)
@@ -173,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 = (SymbolTable*)&Src->getSymbolTable();
+  SymbolTable *ST = (SymbolTable*)&Dest->getSymbolTable();
   
   // Loop over all of the globals in the src module, mapping them over as we go
   //
@@ -263,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 = (SymbolTable*)&Src->getSymbolTable();
+  SymbolTable *ST = (SymbolTable*)&Dest->getSymbolTable();
   
   // Loop over all of the functions in the src module, mapping them over as we
   // go
index 0d3cc9bfa9f5cb64762f91f9791b9b8e3b4e98fd..14e36cc012f17e9f20605e35eef00413b91568cb 100644 (file)
@@ -173,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 = (SymbolTable*)&Src->getSymbolTable();
+  SymbolTable *ST = (SymbolTable*)&Dest->getSymbolTable();
   
   // Loop over all of the globals in the src module, mapping them over as we go
   //
@@ -263,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 = (SymbolTable*)&Src->getSymbolTable();
+  SymbolTable *ST = (SymbolTable*)&Dest->getSymbolTable();
   
   // Loop over all of the functions in the src module, mapping them over as we
   // go