[cfe-commits] r94756 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Devang Patel dpatel at apple.com
Thu Jan 28 13:43:50 PST 2010


Author: dpatel
Date: Thu Jan 28 15:43:50 2010
New Revision: 94756

URL: http://llvm.org/viewvc/llvm-project?rev=94756&view=rev
Log:
Static methods do not need "this" pointer argument.

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=94756&r1=94755&r2=94756&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Thu Jan 28 15:43:50 2010
@@ -525,6 +525,11 @@
 CGDebugInfo::getOrCreateMethodType(const CXXMethodDecl *Method,
                                    llvm::DICompileUnit Unit) {
   llvm::DIType FnTy = getOrCreateType(Method->getType(), Unit);
+  
+  // Static methods do not need "this" pointer argument.
+  if (Method->isStatic())
+    return FnTy;
+
   // Add "this" pointer.
 
   llvm::DIArray Args = llvm::DICompositeType(FnTy.getNode()).getTypeArray();





More information about the cfe-commits mailing list