Adjust to new Module.h interface for dependent libraries

Remove mem leaks resulting from not freeing parse strings.

llvm-svn: 15217
This commit is contained in:
Reid Spencer 2004-07-25 21:30:51 +00:00
parent 07e3e1c29b
commit 04819ff173

View File

@ -1445,20 +1445,19 @@ TargetDefinition : ENDIAN '=' BigOrLittle {
ThrowException("Invalid pointer size: '" + utostr($3) + "'!");
}
| TRIPLE '=' STRINGCONSTANT {
std::string triple($3);
CurModule.CurrentModule->setTargetTriple(triple);
CurModule.CurrentModule->setTargetTriple($3);
free($3);
};
LibrariesDefinition : '[' LibList ']'
;
LibrariesDefinition : '[' LibList ']';
LibList : LibList ',' STRINGCONSTANT {
std::string lib($3);
CurModule.CurrentModule->linsert(lib);
CurModule.CurrentModule->addLibrary($3);
free($3);
}
| STRINGCONSTANT {
std::string lib($1);
CurModule.CurrentModule->linsert(lib);
CurModule.CurrentModule->addLibrary($1);
free($1);
}
| /* empty: end of list */ {
}