]> granicus.if.org Git - clang/commitdiff
Do not emit stoppoint before emitting debug info for parameters.
authorDevang Patel <dpatel@apple.com>
Wed, 15 Jun 2011 17:57:08 +0000 (17:57 +0000)
committerDevang Patel <dpatel@apple.com>
Wed, 15 Jun 2011 17:57:08 +0000 (17:57 +0000)
- 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

index 8a1a8536dab1056f8b8cf4fa2c985eb1adb05d06..33c4ada68f84815844cf19d5479693a646d0c04a 100644 (file)
@@ -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);
-  }
 }