mirror of
https://github.com/intel/llvm.git
synced 2026-01-27 06:06:34 +08:00
Emit method access specifier.
Radar 8490416. llvm-svn: 115090
This commit is contained in:
@@ -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,
|
||||
|
||||
6
clang/test/CodeGenCXX/debug-info-method.cpp
Normal file
6
clang/test/CodeGenCXX/debug-info-method.cpp
Normal 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;
|
||||
Reference in New Issue
Block a user