Skip to content
  1. Mar 28, 2009
  2. Jan 28, 2009
  3. Jan 20, 2009
  4. Oct 27, 2008
  5. Oct 16, 2008
    • Daniel Dunbar's avatar
      Add --disable-free flag to clang. · 33d29b3e
      Daniel Dunbar authored
       - Disables the freeing of the ASTContext and the TranslationUnit
         after parsing & sema.
       - Primarily for timing the impact on -fsyntax-only timings.
      
      llvm-svn: 57643
      33d29b3e
  6. Aug 20, 2008
  7. Aug 11, 2008
    • Daniel Dunbar's avatar
      More #include cleaning · 56fdb6ae
      Daniel Dunbar authored
       - Kill unnecessary #includes in .cpp files. This is an automatic
         sweep so some things removed are actually used, but happen to be
         included by a previous header. I tried to get rid of the obvious
         examples and this was the easiest way to trim the #includes in one
         fell swoop.
       - We now return to regularly scheduled development.
      
      llvm-svn: 54632
      56fdb6ae
    • Daniel Dunbar's avatar
      More #include cleaning · 221fa94e
      Daniel Dunbar authored
       - Drop Expr.h,RecordLayout.h from ASTContext.h (for DeclBase.h and
         SourceLocation.h)
       - Move ASTContext constructor into implementation
      
      llvm-svn: 54627
      221fa94e
  8. Aug 08, 2008
  9. Aug 07, 2008
  10. Jul 02, 2008
  11. Jun 16, 2008
  12. Jun 04, 2008
  13. May 31, 2008
  14. May 27, 2008
  15. May 20, 2008
    • Ted Kremenek's avatar
      Try to plug some memory leaks... · ce20e8fe
      Ted Kremenek authored
      1) Sema::ParseAST now constructs a TranslationUnit object to own the top-level Decls, which releases the top-level Decls upon exiting ParseAST.
      
      2) Bug fix: TranslationUnit::~TranslationUnit handles the case where a Decl is added more than once as a top-level Decl.
      
      3) Decl::Destroy is now a virtual method, obviating the need for a special dispatch based on DeclKind.
      
      3) FunctionDecl::Destroy now releases its Body using its Destroy method.
      
      4) Added Stmt::Destroy and Stmt::DestroyChildren, which recursively delete the child ASTs of a Stmt and call their dstors.  We may need to special case dstor/Destroy methods for particular Stmt subclasses that own other dynamically allocated objects besides AST nodes.
      
      5) REGRESSION: We temporarily are not deallocating attributes; a FIXME is provided.
      
      llvm-svn: 51286
      ce20e8fe
  16. Mar 16, 2008
    • Chris Lattner's avatar
      Make a major restructuring of the clang tree: introduce a top-level · 7a51313d
      Chris Lattner authored
      lib dir and move all the libraries into it.  This follows the main
      llvm tree, and allows the libraries to be built in parallel.  The
      top level now enforces that all the libs are built before Driver,
      but we don't care what order the libs are built in.  This speeds
      up parallel builds, particularly incremental ones.
      
      llvm-svn: 48402
      7a51313d
  17. Feb 06, 2008
  18. Dec 29, 2007
  19. Dec 19, 2007
  20. Nov 30, 2007
    • Steve Naroff's avatar
      · 205ec3d0
      Steve Naroff authored
      Yesterday, I simplified how we stream top-level decls.
      
      After a discussion with Ted, we both came to the conclusion that adding a "HandleTopLevelDeclaration" hook to ASConsumer is far more elegant. The default implementation of HandleTopLevelDeclaration will be responsible for iterating over the ScopedDecl (which has a chain of the decls:-).
      
      TODO: Once Ted adds HandleTopLevelDeclaration, make sure TagDecls are chainged appropriately...
      llvm-svn: 44445
      205ec3d0
  21. Nov 28, 2007
    • Steve Naroff's avatar
      · 197616c3
      Steve Naroff authored
      Several fixes/simplifications surrounding how we stream top-level decl AST's.
      
      The following code...
      
      typedef struct cssm_data {} CSSM_DATA, *CSSM_DATA_PTR;
      
      struct Y { int A; };
      
      struct X { int A; } D; 
      
      struct X E, F;
      
      ...now produces the following output...
      
      > ../../Debug/bin/clang xx.c -ast-print
      Read top-level tag decl: 'cssm_data'
      typedef struct cssm_data CSSM_DATA;
      typedef struct cssm_data *CSSM_DATA_PTR;
      Read top-level tag decl: 'Y'
      Read top-level tag decl: 'X'
      Read top-level variable decl: 'D'
      Read top-level variable decl: 'E'
      Read top-level variable decl: 'F'
      
      ...which is much more accurate than the previous -ast-print output...
      
      typedef struct cssm_data CSSM_DATA;
      typedef struct cssm_data CSSM_DATA;
      Read top-level variable decl: 'D'
      Read top-level variable decl: 'E'
      Read top-level variable decl: 'E'
      
      llvm-svn: 44421
      197616c3
  22. Nov 03, 2007
  23. Oct 26, 2007
  24. Oct 14, 2007
    • Steve Naroff's avatar
      · 5811baf1
      Steve Naroff authored
      - Added Sema::AddFactoryMethodToGlobalPool and Sema::AddInstanceMethodToGlobalPool and DenseMaps. This will allow us to efficiently lookup a method from a selector given no type information (for the "id" data type).
      
      - Fixed some funky "}
                          else {" indentation in Sema::ActOnAddMethodsToObjcDecl(). I'd prefer we stay away from this style...it wastes space and isn't any easier to read (from my perspective, at least:-)
      
      - Changed Parser::ParseObjCInterfaceDeclList() to only call Action::ActOnAddMethodsToObjcDecl() when it actually has methods to add (since most interface have methods, this is a very minor cleanup).
      
      llvm-svn: 42957
      5811baf1
  25. Oct 10, 2007
    • Chris Lattner's avatar
      Make a significant change to invert the control flow handling · 1f1b0dbc
      Chris Lattner authored
      predefined macros.  Previously, these were handled by the driver,
      now they are handled by the preprocessor.
      
      Some fallout of this:
      
      1. Instead of preprocessing two buffers (the predefines, then the 
         main source file)  we now start preprocessing the main source 
         file and inject the predefines as a "psuedo #include" from the
         main source file.
      2. #1 allows us to nuke the Lexer::IsMainFile flag and simplify
         Preprocessor::isInPrimaryFile.
      3. The driver doesn't have to know about standard #defines, the
         preprocessor knows, which is nice for people wanting to define
         their own drivers.
      4. This allows us to put normal tokens in the predefine buffer,
         for example a definition for __builtin_va_list that is 
         target-specific, and a typedef for id in objc.
      
      llvm-svn: 42818
      1f1b0dbc
  26. Sep 27, 2007
    • Steve Naroff's avatar
      · f73590db
      Steve Naroff authored
      Add SelectorInfo (similar in spirit to IdentifierInfo). The key difference is SelectorInfo is not string-oriented, it is a unique aggregate of IdentifierInfo's (using a folding set).  SelectorInfo also has a richer API that simplifies the parser/action interface. 3 noteworthy benefits:
      
      #1: It is cleaner. I never "liked" storing keyword selectors (i.e. foo:bar:baz) in the IdentifierTable.
      
      #2: It is more space efficient. Since Cocoa keyword selectors can be quite long, this technique is space saving. For Cocoa.h, pulling the keyword selectors out saves ~180k. The cost of the SelectorInfo data is ~100k. Saves ~80k, or 43%.
      
      #3: It results in many API simplifications. Here are some highlights:
      
      - Removed 3 actions (ActOnKeywordMessage, ActOnUnaryMessage, & one flavor of ObjcBuildMethodDeclaration that was specific to unary messages).
      - Removed 3 funky structs from DeclSpec.h (ObjcKeywordMessage, ObjcKeywordDecl, and ObjcKeywordInfo).
      - Removed 2 ivars and 2 constructors from ObjCMessageExpr (fyi, this space savings has not been measured).
      
      I am happy with the way it turned out (though it took a bit more hacking than I expected). Given the central role of selectors in ObjC, making sure this is "right" will pay dividends later.
      
      Thanks to Chris for talking this through with me and suggesting this approach. 
      
      llvm-svn: 42395
      f73590db
  27. Sep 16, 2007
  28. Aug 30, 2007
  29. Jun 16, 2007
    • Chris Lattner's avatar
      Finally bite the bullet and make the major change: split the clang namespace · 23b7eb67
      Chris Lattner authored
      out of the llvm namespace.  This makes the clang namespace be a sibling of
      llvm instead of being a child.
      
      The good thing about this is that it makes many things unambiguous.  The
      bad things is that many things in the llvm namespace (notably data structures
      like smallvector) now require an llvm:: qualifier.  IMO, libsystem and libsupport
      should be split out of llvm into their own namespace in the future, which will fix
      this issue.
      
      llvm-svn: 39659
      23b7eb67
  30. May 21, 2007
  31. Feb 28, 2007
    • Steve Naroff's avatar
      · 2c055d2b
      Steve Naroff authored
      Go back to having the clang driver create ASTContext explicitly, passing
      it to Sema/ASTStreamer (separating the lifetime of ASTContext from
      the lifetime of Sema). One day it might be useful to consider creating
      a context object implicitly if one isn't provided (using default arguments in
      Sema's constructor). At this point, adding this convenience isn't necessary.
      
      llvm-svn: 39346
      2c055d2b
Loading