Skip to content
  1. 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
    • Ted Kremenek's avatar
      Added method "HandleTopLevelDeclaration" to ASTConsumer. This will eventually · bfcf8cdb
      Ted Kremenek authored
      be the new hook that ASTStreamer calls to feed top-level Decls to
      ASTConsumers.
      
      The difference between "HandleTopLevelDeclaration" and "HandleTopLevelDecl" is
      that "HandleTopLevelDecl" is currently called by ASTStreamer for every
      top-level declaration, including those that appear within a Decl chain. Using
      the new interface, ASTStreamer would only call HandleTopLevelDeclaration for
      Decls that appear that the beginning of a Decl chain (i.e., a group of related
      decls).
      
      To preserve the behavior that all subclasses of ASTConsumer currently expect,
      the default implementation of HandleTopLevelDeclaration simply calls
      HandleTopLevelDecl, and for decl chains it calls HandleTopLevelDecl for each
      Decl* in a chain of Decls.
      
      The advantage of this interface is that some subclasses of ASTConsumer only
      really want the Decl chain, and not each individual Decl passed to them. This
      extra level of indirection allows subclasses to override the default behavior
      if they so desire.
      
      llvm-svn: 44444
      bfcf8cdb
  2. Nov 29, 2007
  3. Nov 28, 2007
  4. Nov 27, 2007
Loading