r204949 - Add an explanatory comment and FIXME about the function declaration

Eric Christopher echristo at gmail.com
Thu Mar 27 11:50:35 PDT 2014


Author: echristo
Date: Thu Mar 27 13:50:35 2014
New Revision: 204949

URL: http://llvm.org/viewvc/llvm-project?rev=204949&view=rev
Log:
Add an explanatory comment and FIXME about the function declaration
for a subprogram DIE.

Modified:
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=204949&r1=204948&r2=204949&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Thu Mar 27 13:50:35 2014
@@ -2567,6 +2567,11 @@ void CGDebugInfo::EmitFunctionStart(Glob
   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),





More information about the cfe-commits mailing list