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


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to