From e302b6cb69e96b948101e1ab6c0476187c92ee84 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Sat, 5 Jan 2013 21:39:33 +0000 Subject: 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 --- lib/IR/DebugInfo.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/IR/DebugInfo.cpp') 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 << ']'; -- cgit v1.2.3-18-g5258