mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 00:20:25 +00:00
- Change Function's so that their argument list is populated when they are
constructed. Before, external functions would have an empty argument list,
now a Function ALWAYS has a populated argument list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4149 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -270,14 +270,13 @@ bool BytecodeParser::ParseMethod(const uchar *&Buf, const uchar *EndBuf,
|
||||
BCR_TRACE(2, "METHOD TYPE: " << MTy << "\n");
|
||||
|
||||
const FunctionType::ParamTypes &Params = MTy->getParamTypes();
|
||||
Function::aiterator AI = M->abegin();
|
||||
for (FunctionType::ParamTypes::const_iterator It = Params.begin();
|
||||
It != Params.end(); ++It) {
|
||||
Argument *FA = new Argument(*It);
|
||||
if (insertValue(FA, Values) == -1) {
|
||||
It != Params.end(); ++It, ++AI) {
|
||||
if (insertValue(AI, Values) == -1) {
|
||||
Error = "Error reading method arguments!\n";
|
||||
delete M; return true;
|
||||
}
|
||||
M->getArgumentList().push_back(FA);
|
||||
}
|
||||
|
||||
while (Buf < EndBuf) {
|
||||
@@ -358,10 +357,6 @@ bool BytecodeParser::ParseMethod(const uchar *&Buf, const uchar *EndBuf,
|
||||
// We don't need the placeholder anymore!
|
||||
delete FunctionPHolder;
|
||||
|
||||
// If the method is empty, we don't need the method argument entries...
|
||||
if (M->isExternal())
|
||||
M->getArgumentList().clear();
|
||||
|
||||
ResolveReferencesToValue(M, MethSlot);
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user