diff options
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 1a3089a14b2..4cabf3257b7 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/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), |