From 98703d32ff37fbfbcfd844241d2be44b8f80cf9f Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Wed, 15 Jun 2011 17:57:08 +0000 Subject: [PATCH] Do not emit stoppoint before emitting debug info for parameters. - llvm.dbg.declare already receives line number information from ParmDecl - Additional extra stoppoint messes up gdb's understanding of where function body starts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133065 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGDecl.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp index 8a1a8536da..33c4ada68f 100644 --- a/lib/CodeGen/CGDecl.cpp +++ b/lib/CodeGen/CGDecl.cpp @@ -894,8 +894,6 @@ void CodeGenFunction::EmitParmDecl(const VarDecl &D, llvm::Value *Arg, DMEntry = DeclPtr; // Emit debug info for param declaration. - if (CGDebugInfo *DI = getDebugInfo()) { - DI->setLocation(D.getLocation()); + if (CGDebugInfo *DI = getDebugInfo()) DI->EmitDeclareOfArgVariable(&D, DeclPtr, ArgNo, Builder); - } } -- 2.50.1