]> granicus.if.org Git - clang/commitdiff
Add an explanatory comment and FIXME about the function declaration
authorEric Christopher <echristo@gmail.com>
Thu, 27 Mar 2014 18:50:35 +0000 (18:50 +0000)
committerEric Christopher <echristo@gmail.com>
Thu, 27 Mar 2014 18:50:35 +0000 (18:50 +0000)
for a subprogram DIE.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204949 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDebugInfo.cpp

index 1a3089a14b2dc2a7b2316d67f702246bf9c93289..4cabf3257b7977811d0d98755d9cdff0f7ebef7f 100644 (file)
@@ -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),