Adjust to new Module.h interface for dependent libraries

Remove mem leaks resulting from not freeing parse strings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15217 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2004-07-25 21:30:51 +00:00
parent c9a1f0dcdd
commit feaf10e571

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 */ {
}