Set "optimization is ON" and supply other optional parameters. This helps codegenerator preserve info in case the symbol is deleted.

llvm-svn: 108471
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index d1de84f..33e2993 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -601,7 +601,8 @@
                                   MethodTy, /*isLocalToUnit=*/false, 
                                   /* isDefintion=*/ false,
                                   Virtuality, VIndex, ContainingType,
-                                  Method->isImplicit());
+                                  Method->isImplicit(),
+                                  CGM.getLangOptions().Optimize);
   
   // Don't cache ctors or dtors since we have to emit multiple functions for
   // a single ctor or dtor.
@@ -1335,7 +1336,10 @@
   llvm::DISubprogram SP =
     DebugFactory.CreateSubprogram(Unit, Name, Name, LinkageName, Unit, LineNo,
                                   getOrCreateType(FnType, Unit),
-                                  Fn->hasInternalLinkage(), true/*definition*/);
+                                  Fn->hasInternalLinkage(), true/*definition*/,
+                                  0, 0, llvm::DIType(),
+                                  D->isImplicit(),
+                                  CGM.getLangOptions().Optimize, Fn);
 
   // Push function on region stack.
   llvm::MDNode *SPN = SP;