mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
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:
parent
c9a1f0dcdd
commit
feaf10e571
@ -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 */ {
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user