Debug info bug fix, function start wasn't getting generated correctly
for Obj-C methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57769 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index f326be2..e188960 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -598,7 +598,8 @@
 
 /// EmitFunctionStart - Constructs the debug code for entering a function -
 /// "llvm.dbg.func.start.".
-void CGDebugInfo::EmitFunctionStart(const FunctionDecl *FnDecl,
+void CGDebugInfo::EmitFunctionStart(const char *Name,
+                                    QualType ReturnType,
                                     llvm::Function *Fn,
                                     llvm::IRBuilder<> &Builder)
 {
@@ -611,8 +612,8 @@
   }
 
   // Get name information.
-  Subprogram->setName(FnDecl->getName());
-  Subprogram->setFullName(FnDecl->getName());
+  Subprogram->setName(Name);
+  Subprogram->setFullName(Name);
 
   // Gather location information.
   llvm::CompileUnitDesc *Unit = getOrCreateCompileUnit(CurLoc);
@@ -620,8 +621,7 @@
   uint64_t Loc = SM.getLogicalLineNumber(CurLoc);
 
   // Get Function Type.
-  QualType type = FnDecl->getResultType();
-  llvm::TypeDesc *SPTy = getOrCreateType(type, Unit);
+  llvm::TypeDesc *SPTy = getOrCreateType(ReturnType, Unit);
 
   Subprogram->setAnchor(SubprogramAnchor);
   Subprogram->setContext(Unit);