Mark explict methods as explict in debug info.

llvm-svn: 115379
This commit is contained in:
Devang Patel 2010-10-01 23:32:17 +00:00
parent e1c714647c
commit d18c5aa20a
2 changed files with 24 additions and 1 deletions

View File

@ -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,

View File

@ -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);