From: Eric Christopher Date: Thu, 27 Mar 2014 18:50:35 +0000 (+0000) Subject: Add an explanatory comment and FIXME about the function declaration X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=af3ef97286615b7de754df7a305a3b591f889bfa;p=clang Add an explanatory comment and FIXME about the function declaration for a subprogram DIE. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204949 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 1a3089a14b..4cabf3257b 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -2567,6 +2567,11 @@ void CGDebugInfo::EmitFunctionStart(GlobalDecl GD, QualType FnType, if (!HasDecl || D->isImplicit()) Flags |= llvm::DIDescriptor::FlagArtificial; + // FIXME: The function declaration we're constructing here is mostly reusing + // declarations from CXXMethodDecl and not constructing new ones for arbitrary + // FunctionDecls. When/if we fix this we can have FDContext be TheCU/null for + // all subprograms instead of the actual context since subprogram definitions + // are emitted as CU level entities by the backend. llvm::DISubprogram SP = DBuilder.createFunction(FDContext, Name, LinkageName, Unit, LineNo, getOrCreateFunctionType(D, FnType, Unit),