[cfe-commits] r125760 - /cfe/trunk/lib/Parse/ParseAST.cpp

Douglas Gregor dgregor at apple.com
Thu Feb 17 10:59:07 PST 2011


Author: dgregor
Date: Thu Feb 17 12:59:06 2011
New Revision: 125760

URL: http://llvm.org/viewvc/llvm-project?rev=125760&view=rev
Log:
The internal -fdump-record-layouts flag already dumps the layout when it was computed; no need to do so again at the end of the translation unit

Modified:
    cfe/trunk/lib/Parse/ParseAST.cpp

Modified: cfe/trunk/lib/Parse/ParseAST.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseAST.cpp?rev=125760&r1=125759&r2=125760&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseAST.cpp (original)
+++ cfe/trunk/lib/Parse/ParseAST.cpp Thu Feb 17 12:59:06 2011
@@ -25,26 +25,6 @@
 
 using namespace clang;
 
-static void DumpRecordLayouts(ASTContext &C) {
-  for (ASTContext::type_iterator I = C.types_begin(), E = C.types_end();
-       I != E; ++I) {
-    const RecordType *RT = dyn_cast<RecordType>(*I);
-    if (!RT)
-      continue;
-
-    const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(RT->getDecl());
-    if (!RD || RD->isImplicit() || RD->isDependentType() ||
-        RD->isInvalidDecl() || !RD->getDefinition())
-      continue;
-
-    // FIXME: Do we really need to hard code this?
-    if (RD->getQualifiedNameAsString() == "__va_list_tag")
-      continue;
-
-    C.DumpRecordLayout(RD, llvm::errs());
-  }
-}
-
 //===----------------------------------------------------------------------===//
 // Public interface to the file
 //===----------------------------------------------------------------------===//
@@ -97,10 +77,6 @@
        E = S.WeakTopLevelDecls().end(); I != E; ++I)
     Consumer->HandleTopLevelDecl(DeclGroupRef(*I));
   
-  // Dump record layouts, if requested.
-  if (S.getLangOptions().DumpRecordLayouts)
-    DumpRecordLayouts(S.getASTContext());
-  
   Consumer->HandleTranslationUnit(S.getASTContext());
   
   if (PrintStats) {





More information about the cfe-commits mailing list