Replace use of defunct Type::setName method with SymbolTable::insert.
authorReid Spencer <rspencer@reidspencer.com>
Sat, 10 Jul 2004 16:37:42 +0000 (16:37 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Sat, 10 Jul 2004 16:37:42 +0000 (16:37 +0000)
Patch found and provided by Vladimir Merzliakov. Thanks Vladimir!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14732 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Module.cpp

index 3f599958985ed0fb304d19faa209d3946d6e5f88..8331eacd69172abe0f94c589f4d3860c441910b8 100644 (file)
@@ -251,7 +251,7 @@ bool Module::addTypeName(const std::string &Name, const Type *Ty) {
   
   // Not in symbol table?  Set the name with the Symtab as an argument so the
   // type knows what to update...
-  ((Value*)Ty)->setName(Name, &ST);
+  ST.insert(Name, Ty);
 
   return false;
 }