aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-07-15 23:09:46 +0000
committerDevang Patel <dpatel@apple.com>2010-07-15 23:09:46 +0000
commit15a3d7df1ad667c6c09e34def34d546124c9efac (patch)
tree0db1bd53a2eb03e5dea81659324ab4fea110cdde /lib/CodeGen
parent1ce377ab2cf36d8d10b3d0672977dbc63833c745 (diff)
Set "optimization is ON" and supply other optional parameters. This helps codegenerator preserve info in case the symbol is deleted.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108471 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index d1de84fef7..33e299340d 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -601,7 +601,8 @@ CGDebugInfo::CreateCXXMemberFunction(const CXXMethodDecl *Method,
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 @@ void CGDebugInfo::EmitFunctionStart(GlobalDecl GD, QualType FnType,
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;