diff options
author | Adrian McCarthy <amccarth@google.com> | 2017-09-13 20:53:55 +0000 |
---|---|---|
committer | Adrian McCarthy <amccarth@google.com> | 2017-09-13 20:53:55 +0000 |
commit | 4470536d89afb178d3f9d15362e9ed510eae2787 (patch) | |
tree | 1aec50c60d8b56fe59274b9564f42df5d6345ef6 /lib/CodeGen | |
parent | 065d2d58cc919a92c728550bf0463f1c7eeddeab (diff) | |
download | clang-4470536d89afb178d3f9d15362e9ed510eae2787.tar.gz |
Mark static member functions as static in CodeViewDebug
Summary:
To improve CodeView quality for static member functions, we need to make the
static explicit. In addition to a small change in LLVM's CodeViewDebug to
return the appropriate MethodKind, this requires a small change in Clang to
note the staticness in the debug info metadata.
Subscribers: aprantl, hiraditya
Differential Revision: https://reviews.llvm.org/D37715
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313192 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index a052ffb617..5581d76c20 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -1408,6 +1408,8 @@ llvm::DISubprogram *CGDebugInfo::CreateCXXMemberFunction( ContainingType = RecordTy; } + if (Method->isStatic()) + Flags |= llvm::DINode::FlagStaticMember; if (Method->isImplicit()) Flags |= llvm::DINode::FlagArtificial; Flags |= getAccessFlag(Method->getAccess(), Method->getParent()); |