forked from OSchip/llvm-project
Emit method access specifier.
Radar 8490416. llvm-svn: 115090
This commit is contained in:
parent
cb03b14089
commit
330b65e350
|
@ -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,
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
// RUN: %clang -fverbose-asm -cc1 -g -S %s -o - | grep DW_ACCESS_protected
|
||||
class A {
|
||||
protected:
|
||||
int foo();
|
||||
};
|
||||
A a;
|
Loading…
Reference in New Issue