Emit method access specifier.

Radar 8490416.

llvm-svn: 115090
This commit is contained in:
Devang Patel 2010-09-29 21:46:16 +00:00
parent cb03b14089
commit 330b65e350
2 changed files with 12 additions and 0 deletions

View File

@ -701,6 +701,12 @@ CGDebugInfo::CreateCXXMemberFunction(const CXXMethodDecl *Method,
unsigned Flags = 0;
if (Method->isImplicit())
Flags |= llvm::DIDescriptor::FlagArtificial;
AccessSpecifier Access = Method->getAccess();
if (Access == clang::AS_private)
Flags |= llvm::DIDescriptor::FlagPrivate;
else if (Access == clang::AS_protected)
Flags |= llvm::DIDescriptor::FlagProtected;
llvm::DISubprogram SP =
DebugFactory.CreateSubprogram(RecordTy , MethodName, MethodName,
MethodLinkageName,

View File

@ -0,0 +1,6 @@
// RUN: %clang -fverbose-asm -cc1 -g -S %s -o - | grep DW_ACCESS_protected
class A {
protected:
int foo();
};
A a;