forked from OSchip/llvm-project
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.
llvm-svn: 126957
This commit is contained in:
parent
7e200664f6
commit
4ab660b077
|
@ -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…
Reference in New Issue