diff options
author | Devang Patel <dpatel@apple.com> | 2011-03-01 22:59:40 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-03-01 22:59:40 +0000 |
commit | 8a04585eba8a87a660c9030c9cdef34c8c9f85c6 (patch) | |
tree | 5ad8554d033df6c6882c508a2c3420ea1078e5f6 /lib/CodeGen/CGDecl.cpp | |
parent | 86643b88a11582cfff2091a4815950d166269428 (diff) |
Encode argument numbering in debug info so that code generator can emit them in order.
This fixes few blocks.exp regressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126795 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDecl.cpp')
-rw-r--r-- | lib/CodeGen/CGDecl.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp index f4db01d257..ecc0a4c2d5 100644 --- a/lib/CodeGen/CGDecl.cpp +++ b/lib/CodeGen/CGDecl.cpp @@ -1000,7 +1000,8 @@ void CodeGenFunction::EmitAutoVarCleanups(const AutoVarEmission &emission) { /// Emit an alloca (or GlobalValue depending on target) /// for the specified parameter and set up LocalDeclMap. -void CodeGenFunction::EmitParmDecl(const VarDecl &D, llvm::Value *Arg) { +void CodeGenFunction::EmitParmDecl(const VarDecl &D, llvm::Value *Arg, + unsigned ArgNo) { // FIXME: Why isn't ImplicitParamDecl a ParmVarDecl? assert((isa<ParmVarDecl>(D) || isa<ImplicitParamDecl>(D)) && "Invalid argument to EmitParmDecl"); @@ -1046,6 +1047,6 @@ void CodeGenFunction::EmitParmDecl(const VarDecl &D, llvm::Value *Arg) { // Emit debug info for param declaration. if (CGDebugInfo *DI = getDebugInfo()) { DI->setLocation(D.getLocation()); - DI->EmitDeclareOfArgVariable(&D, DeclPtr, Builder); + DI->EmitDeclareOfArgVariable(&D, DeclPtr, ArgNo, Builder); } } |