aboutsummaryrefslogtreecommitdiff
path: root/lib/IR/DebugInfo.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-01-05 21:39:33 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-01-05 21:39:33 +0000
commite302b6cb69e96b948101e1ab6c0476187c92ee84 (patch)
tree4ac4a0f132cabb70692f726022c6ed26f4503f8b /lib/IR/DebugInfo.cpp
parent8b2bcf4f753be8100fc712d6267f38b21085fc13 (diff)
Include access modifiers in subprogram metadata IR comment.
Based on code review feedback in r171604 from Chandler Carruth & Eric Christopher. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171636 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/DebugInfo.cpp')
-rw-r--r--lib/IR/DebugInfo.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp
index bec941afda..5dd9dd1c9d 100644
--- a/lib/IR/DebugInfo.cpp
+++ b/lib/IR/DebugInfo.cpp
@@ -1122,6 +1122,11 @@ void DISubprogram::printInternal(raw_ostream &OS) const {
if (getScopeLineNumber() != getLineNumber())
OS << " [scope " << getScopeLineNumber() << "]";
+ if (isPrivate())
+ OS << " [private]";
+ else if (isProtected())
+ OS << " [protected]";
+
StringRef Res = getName();
if (!Res.empty())
OS << " [" << Res << ']';