Enable debug info emission for objc methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65422 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp
index dd0292e..ec11edb 100644
--- a/lib/CodeGen/CGObjC.cpp
+++ b/lib/CodeGen/CGObjC.cpp
@@ -125,6 +125,9 @@
/// Generate an Objective-C method. An Objective-C method is a C function with
/// its pointer, name, and types registered in the class struture.
void CodeGenFunction::GenerateObjCMethod(const ObjCMethodDecl *OMD) {
+ // Check if we should generate debug info for this method.
+ if (CGM.getDebugInfo() && !OMD->getAttr<NodebugAttr>())
+ DebugInfo = CGM.getDebugInfo();
StartObjCMethod(OMD, OMD->getClassInterface());
EmitStmt(OMD->getBody());
FinishFunction(cast<CompoundStmt>(OMD->getBody())->getRBracLoc());