From e76bda544bbf52d9ff3b55e6018b494a1e6bbc00 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Fri, 15 Apr 2016 15:55:45 +0000 Subject: Update to match LLVM changes for PR27284. (Reverse the ownership between DICompileUnit and DISubprogram.) http://reviews.llvm.org/D19034 llvm-svn: 266445 --- clang/lib/CodeGen/CGDebugInfo.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp') diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 4b7657bb352..54b5f2fc421 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -2793,11 +2793,11 @@ void CGDebugInfo::EmitFunctionDecl(GlobalDecl GD, SourceLocation Loc, unsigned LineNo = getLineNumber(Loc); unsigned ScopeLine = 0; - DBuilder.createFunction(FDContext, Name, LinkageName, Unit, LineNo, - getOrCreateFunctionType(D, FnType, Unit), - false /*internalLinkage*/, true /*definition*/, - ScopeLine, Flags, CGM.getLangOpts().Optimize, - TParamsArray.get(), getFunctionDeclaration(D)); + DBuilder.retainType(DBuilder.createFunction( + FDContext, Name, LinkageName, Unit, LineNo, + getOrCreateFunctionType(D, FnType, Unit), false /*internalLinkage*/, + false /*definition*/, ScopeLine, Flags, CGM.getLangOpts().Optimize, + TParamsArray.get(), getFunctionDeclaration(D))); } void CGDebugInfo::EmitLocation(CGBuilderTy &Builder, SourceLocation Loc) { -- cgit v1.2.3