]> granicus.if.org Git - clang/commitdiff
Simplify CGDebugInfo::CollectCXXMemberFunctions a little. More to come.
authorAnders Carlsson <andersca@mac.com>
Tue, 26 Jan 2010 04:40:11 +0000 (04:40 +0000)
committerAnders Carlsson <andersca@mac.com>
Tue, 26 Jan 2010 04:40:11 +0000 (04:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94511 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDebugInfo.cpp

index 412552be1c6288ed2ed79fb2c56c348abb971e33..5d3c2cd84d0cd1ab726bef3712372df94fd107a3 100644 (file)
@@ -530,22 +530,22 @@ CollectCXXMemberFunctions(const CXXRecordDecl *Decl,
   for(CXXRecordDecl::method_iterator I = Decl->method_begin(),
         E = Decl->method_end(); I != E; ++I) {
     CXXMethodDecl *Method = *I;
+    
+    if (Method->isImplicit())
+      continue;
+    
     llvm::StringRef MethodName;
     llvm::StringRef MethodLinkageName;
     llvm::DIType MethodTy = getOrCreateType(Method->getType(), Unit);
     if (CXXConstructorDecl *CDecl = dyn_cast<CXXConstructorDecl>(Method)) {
-      if (CDecl->isImplicit())
-        continue;
+      (void)CDecl;
       MethodName = Decl->getName();
       // FIXME : Find linkage name.
     } else if (CXXDestructorDecl *DDecl = dyn_cast<CXXDestructorDecl>(Method)) {
-      if (DDecl->isImplicit())
-        continue;
+      (void)DDecl;
       MethodName = getFunctionName(Method);
       // FIXME : Find linkage name.
     } else {
-      if (Method->isImplicit())
-        continue;
       // regular method
       MethodName = getFunctionName(Method);
       MethodLinkageName = CGM.getMangledName(Method);