[cfe-commits] r115379 - in /cfe/trunk: lib/CodeGen/CGDebugInfo.cpp test/CodeGenCXX/debug-info-ctor2.cpp
Devang Patel
dpatel at apple.com
Fri Oct 1 16:32:17 PDT 2010
Author: dpatel
Date: Fri Oct 1 18:32:17 2010
New Revision: 115379
URL: http://llvm.org/viewvc/llvm-project?rev=115379&view=rev
Log:
Mark explict methods as explict in debug info.
Added:
cfe/trunk/test/CodeGenCXX/debug-info-ctor2.cpp
Modified:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=115379&r1=115378&r2=115379&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Fri Oct 1 18:32:17 2010
@@ -738,7 +738,15 @@
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,
MethodLinkageName,
Added: cfe/trunk/test/CodeGenCXX/debug-info-ctor2.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-ctor2.cpp?rev=115379&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-ctor2.cpp (added)
+++ cfe/trunk/test/CodeGenCXX/debug-info-ctor2.cpp Fri Oct 1 18:32:17 2010
@@ -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);
+
More information about the cfe-commits
mailing list