mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-09 01:38:03 +00:00
llvm::Function argument count is not a good indicator of how many arugments does the function have at source level. If we need more space, just resize vector conservatively. This vector is only used once per function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126957 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0f657b156f
commit
cb3a65755e
@ -2330,8 +2330,11 @@ bool DwarfDebug::addCurrentFnArgument(const MachineFunction *MF,
|
||||
if (ArgNo == 0)
|
||||
return false;
|
||||
|
||||
if (CurrentFnArguments.size() == 0)
|
||||
size_t Size = CurrentFnArguments.size();
|
||||
if (Size == 0)
|
||||
CurrentFnArguments.resize(MF->getFunction()->arg_size());
|
||||
else if (ArgNo > Size)
|
||||
CurrentFnArguments.resize(ArgNo * 2);
|
||||
CurrentFnArguments[ArgNo - 1] = Var;
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user