From 6f676be5ffdf80543e6e6b4d3c9c6b8b8e838fa5 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Thu, 3 Mar 2011 20:08:10 +0000 Subject: [PATCH] Fix thinko in previous check-in. Add comment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126959 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 2feb1256ccf..6af81bb67ff 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2333,7 +2333,9 @@ bool DwarfDebug::addCurrentFnArgument(const MachineFunction *MF, size_t Size = CurrentFnArguments.size(); if (Size == 0) CurrentFnArguments.resize(MF->getFunction()->arg_size()); - else if (ArgNo > Size) + // llvm::Function arugment size is not good indicator of how many + // arguments does the function have at source level. + if (ArgNo > Size) CurrentFnArguments.resize(ArgNo * 2); CurrentFnArguments[ArgNo - 1] = Var; return true;