Chris Lattner
60af5f3b82
Set target data layout info in module.
...
llvm-svn: 45003
2007-12-13 17:34:31 +00:00
Ted Kremenek
ce8d55b087
Implemented -serialize-ast option for the driver. This is not really tested
...
and is a work in progress.
llvm-svn: 44967
2007-12-13 00:37:31 +00:00
Chris Lattner
30d23e8289
more cleanups changing things like getInstanceVariables to iterators.
...
llvm-svn: 44930
2007-12-12 07:56:42 +00:00
Chris Lattner
31bc07e6cf
resolve some fixmes and clean up some code by eliminating the get*Vars apis to some classes and use iterators instead.
...
llvm-svn: 44927
2007-12-12 07:46:12 +00:00
Ted Kremenek
d4e5fbacab
Mega-patch: ripped SourceManager out of Diagnostic/DiagnosticClient. Now
...
SourceManager is passed by reference, allowing the SourceManager to be
associated with a specific translation unit, and not the entire execution
of the driver.
Modified all users of Diagnostics to comply with this new interface.
Integrated SourceManager as a member variable of TargetInfo. TargetInfo will
eventually be associated with a single translation unit (just like
SourceManager).
Made the SourceManager reference in ASTContext private. Provided accessor
getSourceManager() for clients to use instead. Modified clients to comply with
new interface.
llvm-svn: 44878
2007-12-11 21:27:55 +00:00
Chris Lattner
e5a91b4924
Fix an ast-print/ast-dump bug.
...
llvm-svn: 44550
2007-12-03 21:43:25 +00:00
Chris Lattner
c8dbe1e5d6
Warn about unsupported codegen with the diags machinery, giving us:
...
t.c:3322:5: warning: cannot codegen this yet
__asm__ ("bswap %0" : "+r" (_data));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
instead of:
Unimplemented stmt!
(AsmStmt 0x80eaa0 <t.c:3331:5, line:3334:28>)
llvm-svn: 44501
2007-12-02 01:40:18 +00:00
Steve Naroff
197616c3a8
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
2007-11-28 22:54:11 +00:00
Ted Kremenek
5933768bec
Converted AST Pretty-Printer to use iostreams instead of FILE*. This fixes
...
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
2007-11-28 21:32:21 +00:00
Chris Lattner
fb30009465
Implement support for -fwritable-strings and make the code generator
...
merge string literals when it is not provided.
llvm-svn: 44394
2007-11-28 05:34:05 +00:00
Ted Kremenek
7c81bdd4e7
Migrated static functions that print decls into a DeclPrinter class,
...
which is now used (or subclasssed) by the ASTConsumers. This new class
stores a FILE* that is used for writing, instead of just hardwiring output
to stderr (it defaults to stderr if no FILE* is provided).
Modified CreateASTPrinter() to accept a FILE* for printing.
llvm-svn: 44377
2007-11-27 21:46:50 +00:00
Steve Naroff
c1e6d60b14
Make sure Sema::ParsedFreeStandingDeclSpec() returns a decl representing the type.
...
Adding basic printing to StmtPrinter::PrintRawDecl().
llvm-svn: 44208
2007-11-17 21:21:01 +00:00
Steve Naroff
971d2f1242
Fix regression with ObjC method definitions and -ast-print
...
llvm-svn: 44088
2007-11-13 23:48:03 +00:00
Chris Lattner
034b49dca0
Clean up types, removing some casts. Patch contributed by
...
Cedric Venet.
llvm-svn: 44050
2007-11-13 18:16:41 +00:00
Steve Naroff
e3d1ab29da
- Minor cleanup to yesterday's changes to Sema::ObjcActOnStartOfMethodDef();
...
- Add Sema::CurMethodDecl, in preparation for adding ObjcIvarRefExpr.
- Add ObjcInterfaceDecl::lookupInstanceVariable(), in prep for adding ivars.
- A couple renames in ObjcInterfaceDecl, while I was in the vicinity:-)
llvm-svn: 44015
2007-11-12 13:56:41 +00:00
Fariborz Jahanian
16e3123071
pretty priting for method definitions.
...
llvm-svn: 43986
2007-11-10 20:59:13 +00:00
Fariborz Jahanian
f76f2b0c1c
Patch for objc2's property ASTs, as well as pretty-priting the ASTs.
...
llvm-svn: 43778
2007-11-06 22:01:00 +00:00
Devang Patel
75ef2f0b45
Take 2.
...
Make target info available to clang code generator. This is far from complete but this helps clang codegen module make progress.
At the moment target triplet and target description strings are hard coded in clang::TargetInfo
llvm-svn: 43572
2007-10-31 20:01:01 +00:00
Chris Lattner
5087e267c2
temporarily revert devang's patch to link in the llvm codegen etc.
...
llvm-svn: 43544
2007-10-31 04:53:03 +00:00
Devang Patel
46c7003052
Make target info available to clang code generator.
...
This is far from complete but this helps clang codegen module
make progress.
llvm-svn: 43536
2007-10-31 00:59:29 +00:00
Fariborz Jahanian
22c6a22d76
Pretty printing for ivar list of an interface block.
...
llvm-svn: 43382
2007-10-26 16:29:12 +00:00
Steve Naroff
e7ed06e6fc
Fix -ast-dump for ObjC.
...
llvm-svn: 42967
2007-10-14 17:03:01 +00:00
Fariborz Jahanian
49c6425ee6
This patch implementa objective-c's @compatibilty-alias declaration.
...
llvm-svn: 42883
2007-10-11 23:42:27 +00:00
Fariborz Jahanian
da6c012ee7
Added a new class for Interfaces qualified by protocol list.
...
Protocols are now sorted and made unique in the list.
Enhanced pretty printer for @interface (So, I can see the protocol list).
llvm-svn: 42776
2007-10-08 23:06:41 +00:00
Fariborz Jahanian
e90597f593
Several small patches to do pretty printing for objective-c top-level decls
...
(minimal printing), Derive ObjcClassDecl from Decl. Ted may want to
take note of the change I made to CFGRecStmtDeclVisitor.h
llvm-svn: 42764
2007-10-08 18:53:38 +00:00
Chris Lattner
d1cdee7d1f
Rename ASTStreamers.* -> ASTConsumers.*
...
llvm-svn: 42718
2007-10-07 06:04:32 +00:00