Skip to content
  1. Nov 29, 2007
  2. 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
    • Ted Kremenek's avatar
      Converted AST Pretty-Printer to use iostreams instead of FILE*. This fixes · 5933768b
      Ted Kremenek authored
      a bug where the statement pretty-printer used iostreams but the AST printer
      did not.  This was an issue when dumping ASTs to something other than stderr.
      
      Updated SerializationTest to use the new iostreams interface for the AST printer.
      
      llvm-svn: 44417
      5933768b
    • Ted Kremenek's avatar
      Modified --test-pickling to perform an actual cross-check of serialized ASTs: · ac76a417
      Ted Kremenek authored
      (1) Parsed ASTs are pretty-printed to a text file.
      (2) The ASTs are serialized to disk.
      (3) The ASTs are deserialized from disk.
      (4) The deserialized ASTs are pretty-printed to a text file.
      (5) The two pretty-printed files are compared. If they are different, the test
          fails.
      
      llvm-svn: 44411
      ac76a417
    • Anders Carlsson's avatar
      Add correct types for the last remaining intrinsics. · 0e136ec1
      Anders Carlsson authored
      llvm-svn: 44396
      0e136ec1
    • Chris Lattner's avatar
      Implement support for -fwritable-strings and make the code generator · fb300094
      Chris Lattner authored
      merge string literals when it is not provided.
      
      llvm-svn: 44394
      fb300094
    • Anders Carlsson's avatar
      Add more intrinsics. We can now correctly parse both Carbon.h and Cocoa.h... · 299f2fc6
      Anders Carlsson authored
      Add more intrinsics. We can now correctly parse both Carbon.h and Cocoa.h without having to do -arch ppc.
      
      llvm-svn: 44392
      299f2fc6
  3. Nov 27, 2007
  4. Nov 26, 2007
  5. Nov 25, 2007
  6. Nov 17, 2007
    • Steve Naroff's avatar
      · c1e6d60b
      Steve Naroff authored
      Make sure Sema::ParsedFreeStandingDeclSpec() returns a decl representing the type.
      Adding basic printing to StmtPrinter::PrintRawDecl().
      
      llvm-svn: 44208
      c1e6d60b
  7. Nov 15, 2007
    • Steve Naroff's avatar
      · c8fcbe09
      Steve Naroff authored
      No need to forward declare definition of objc_super...
      
      llvm-svn: 44173
      c8fcbe09
    • Steve Naroff's avatar
      · d8ea1ac5
      Steve Naroff authored
      Implement support for variadic methods (work in progress).
      
      llvm-svn: 44171
      d8ea1ac5
    • Steve Naroff's avatar
      · 05caa48f
      Steve Naroff authored
      Extend RewriteTest::RewriteObjCIvarRefExpr() to cope with static typing (when using -> on a type which corresponds to the implementation type).
      
      llvm-svn: 44170
      05caa48f
    • Steve Naroff's avatar
      · 44864e48
      Steve Naroff authored
      Tweak funky cast to accommodate messaging 'super'. This removes any spurious warnings.
      
      llvm-svn: 44169
      44864e48
    • Steve Naroff's avatar
      · 7fa2f040
      Steve Naroff authored
      Rewrite for messaging 'super'.
      
      The code gen. results in some spurious warnings...a cast is forthcoming.
      
      llvm-svn: 44168
      7fa2f040
    • Nate Begeman's avatar
      Break out bool/true/false support into a LangOption · 847bfbca
      Nate Begeman authored
      llvm-svn: 44164
      847bfbca
    • Steve Naroff's avatar
      · f60782b8
      Steve Naroff authored
      - Implement ivar rewrite (patch by Fariborz).
      - RewriteMessageExpr()...make implicit casts explicit with synthesizing call (removing warnings when calling objc_msgSend()).
      
      llvm-svn: 44156
      f60782b8
    • Steve Naroff's avatar
      · 909d6666
      Steve Naroff authored
      Refinement to previous commit. Always cast the first argument to "id"...no need to special case self.
      
      llvm-svn: 44149
      909d6666
    • Steve Naroff's avatar
      · e7f18198
      Steve Naroff authored
      Cast implicit "self" argument to "id". This removes all warnings associated with implicit references to self. It doesn't yet deal withexplicit references to self...
      
      llvm-svn: 44148
      e7f18198
    • Steve Naroff's avatar
      · 03f27673
      Steve Naroff authored
      Always generate a typedef for @class. The typedef removal logic that I'm removing only made sense when we were operating on preprocess files without typedef guards. Now that we have guards, it is incorrect to ever remove one (since it may increase the likelihood that the rewritten header can't be included stand alone).
      
      llvm-svn: 44145
      03f27673
  8. Nov 14, 2007
    • Chris Lattner's avatar
      Fix a rewriter bug that steve noticed. Don't skip arbitrary things · 174a825f
      Chris Lattner authored
      between an @ and a p, just skip whitespace.
      
      llvm-svn: 44144
      174a825f
    • Fariborz Jahanian's avatar
      c6225532
    • Steve Naroff's avatar
      · dde78986
      Steve Naroff authored
      Fairly major surgery to RewriteTest::SynthesizeObjcInternalStruct().
      
      This allows us to handle funky stuff like...
      
      #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3
      @interface NSLayoutManager : NSObject <NSCoding, NSGlyphStorage> {
      #else /* MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3 */
      @interface NSLayoutManager : NSObject <NSCoding> {
      #endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3 */
      
      ...which now rewrites to...
      
      #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3
      #ifndef _REWRITER_typedef_NSLayoutManager
      #define _REWRITER_typedef_NSLayoutManager
      typedef struct objc_object NSLayoutManager;
      #endif
      
      struct NSLayoutManager {
          struct NSObject _NSObject;
      
      #else /* MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3 */
      // @interface NSLayoutManager : NSObject <NSCoding> {
      #endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3 */
      
      llvm-svn: 44129
      dde78986
    • Ted Kremenek's avatar
      SourceManager, IdentifierTable, Selectors are now serialized in their own · 31ae9737
      Ted Kremenek authored
      block separate from ASTContext. This block is serialized out AFTER writing out
      ASTContext, but deserialized BEFORE reading in ASTContext. This permits the
      optimization of the serialization of the IdentifierTable where we only write
      out identifiers that are used.
      
      This was needed because TagDecls are owned by Types, and TagDecls contain
      identifiers. Thus types need to be written out first to register with the
      serializer any identifiers they refer to (and hence need to be serialized out
      with IdentifierTable).
      
      llvm-svn: 44125
      31ae9737
    • Fariborz Jahanian's avatar
      Removed unused variabel. · 794793ec
      Fariborz Jahanian authored
      llvm-svn: 44123
      794793ec
    • Steve Naroff's avatar
      · a509f040
      Steve Naroff authored
      Fix yesterday's regression with rewriting @optional/@required.
      
      llvm-svn: 44119
      a509f040
    • Steve Naroff's avatar
      · 58ed6c04
      Steve Naroff authored
      Rewrite methods that span multiple lines.
      
      llvm-svn: 44118
      58ed6c04
    • Steve Naroff's avatar
      · c17b0564
      Steve Naroff authored
      Comment out recent regression r44096.
      
      llvm-svn: 44098
      c17b0564
    • Fariborz Jahanian's avatar
      fe38ba24
    • Fariborz Jahanian's avatar
      Rewrite of forward protocol declaration. · da6165c3
      Fariborz Jahanian authored
      llvm-svn: 44095
      da6165c3
    • Steve Naroff's avatar
      Fix regression with ObjC method definitions and -ast-print · 971d2f12
      Steve Naroff authored
      llvm-svn: 44088
      971d2f12
    • Steve Naroff's avatar
      · 7b8fa474
      Steve Naroff authored
      Rewrite method definition bodies. Also renamed a method to distinguish between method declarations and definitions.
      
      llvm-svn: 44080
      7b8fa474
  9. Nov 13, 2007
Loading