forked from OSchip/llvm-project
Mark explict methods as explict in debug info.
llvm-svn: 115379
This commit is contained in:
parent
e1c714647c
commit
d18c5aa20a
|
@ -738,6 +738,14 @@ CGDebugInfo::CreateCXXMemberFunction(const CXXMethodDecl *Method,
|
|||
Flags |= llvm::DIDescriptor::FlagPrivate;
|
||||
else if (Access == clang::AS_protected)
|
||||
Flags |= llvm::DIDescriptor::FlagProtected;
|
||||
if (const CXXConstructorDecl *CXXC = dyn_cast<CXXConstructorDecl>(Method)) {
|
||||
if (CXXC->isExplicit())
|
||||
Flags |= llvm::DIDescriptor::FlagExplicit;
|
||||
} else if (const CXXConversionDecl *CXXC =
|
||||
dyn_cast<CXXConversionDecl>(Method)) {
|
||||
if (CXXC->isExplicit())
|
||||
Flags |= llvm::DIDescriptor::FlagExplicit;
|
||||
}
|
||||
|
||||
llvm::DISubprogram SP =
|
||||
DebugFactory.CreateSubprogram(RecordTy , MethodName, MethodName,
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
// RUN: %clang -fverbose-asm -g -S %s -o - | grep AT_explicit
|
||||
|
||||
|
||||
class MyClass
|
||||
{
|
||||
public:
|
||||
explicit MyClass (int i) :
|
||||
m_i (i)
|
||||
{}
|
||||
private:
|
||||
int m_i;
|
||||
};
|
||||
|
||||
MyClass m(1);
|
||||
|
Loading…
Reference in New Issue