diff options
Diffstat (limited to 'lib/Transforms/Utils')
-rw-r--r-- | lib/Transforms/Utils/BasicBlockUtils.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Utils/Linker.cpp | 11 |
2 files changed, 5 insertions, 8 deletions
diff --git a/lib/Transforms/Utils/BasicBlockUtils.cpp b/lib/Transforms/Utils/BasicBlockUtils.cpp index 22377ba3ed..33834277b7 100644 --- a/lib/Transforms/Utils/BasicBlockUtils.cpp +++ b/lib/Transforms/Utils/BasicBlockUtils.cpp @@ -28,7 +28,7 @@ void ReplaceInstWithValue(BasicBlock::InstListType &BIL, // 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()); } diff --git a/lib/Transforms/Utils/Linker.cpp b/lib/Transforms/Utils/Linker.cpp index 8fe9113d82..0d3cc9bfa9 100644 --- a/lib/Transforms/Utils/Linker.cpp +++ b/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 |