Commit Graph

311 Commits

Author SHA1 Message Date
Chris Lattner 893751970a Split objc decl implementation out into DeclObjC.cpp
llvm-svn: 48404
2008-03-16 00:19:01 +00:00
Chris Lattner ee1284a6e2 switch the rest of the C decl classes to do their
allocation through ASTContext.

llvm-svn: 48403
2008-03-16 00:16:02 +00:00
Chris Lattner 7a51313d8a Make a major restructuring of the clang tree: introduce a top-level
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
2008-03-15 23:59:48 +00:00
Chris Lattner e35109726c Add PPLexerChange.cpp to the project.
llvm-svn: 48081
2008-03-09 04:14:55 +00:00
Chris Lattner 8962015386 split macro expansion support out of Preprocessor.cpp into PPMacroExpansion.cpp
Rename Directives.cpp -> PPDirectives.cpp since it implements part of the
Preprocessor class.

llvm-svn: 48078
2008-03-09 03:13:06 +00:00
Chris Lattner 7ff66fb91e split the MacroArgs class out of TokenLexer.cpp/h into
MacroArgs.cpp/h

llvm-svn: 48075
2008-03-09 02:55:12 +00:00
Chris Lattner 5bb36002be Rename MacroExpander.cpp/h -> TokenLexer.cpp/h
llvm-svn: 48072
2008-03-09 02:22:57 +00:00
Nate Begeman 6127ae4cde fix clang xcode build
llvm-svn: 48069
2008-03-09 01:55:39 +00:00
Chris Lattner f64b352660 split preprocesor directive handling out of Preprocessor.cpp into Directives.cpp
llvm-svn: 48068
2008-03-09 01:54:53 +00:00
Ted Kremenek 910e9de131 Renamed ValueManager to BasicValueFactory.
llvm-svn: 48025
2008-03-07 20:13:31 +00:00
Chris Lattner ae3429f5f1 add analysis source files to project.
llvm-svn: 47953
2008-03-05 18:22:36 +00:00
Chris Lattner 0e26639bb4 Add the various pathsensitive headers to the project.
llvm-svn: 47952
2008-03-05 18:20:02 +00:00
Chris Lattner 4cb0b08be7 ProgramEdge.h doesn't exist anymore.
llvm-svn: 47951
2008-03-05 18:18:31 +00:00
Chris Lattner a087ff9a66 Add codegen support for ObjC message expressions with the GNU runtime.
Patch by David Chisnall!

llvm-svn: 47789
2008-03-01 08:45:05 +00:00
Anders Carlsson b853a1a049 Add Attr.h which is an AST-level class for GCC attributes.
llvm-svn: 47112
2008-02-14 07:14:34 +00:00
Chris Lattner fe0e0af434 pass the astconsumer into Sema's ctor, clean up some stuff in
Sema::ActOnTranslationUnitScope.  The various ObjC pieces at the top
of Sema.cpp should be moved into SemaObjC or something.

llvm-svn: 46787
2008-02-06 00:46:58 +00:00
Chris Lattner 8082d870bd rename ASTSTreamer.{h|cpp} -> ParseAST.{h|cpp}
llvm-svn: 46786
2008-02-06 00:23:21 +00:00
Chris Lattner 2e0d2600a2 Make rewriter::inserttext return a bool to indicate if it failed.
Add a RewriteTest::ReplaceStmt method to factor the 'checking for
rewrite failed + emitting diagnostic if so' code.

llvm-svn: 46619
2008-01-31 19:37:57 +00:00
Anders Carlsson 8a88c3815a Tweaks to EmitLValue in CGExprConstant. Patch by Eli Friedman.
llvm-svn: 46389
2008-01-26 04:30:23 +00:00
Steve Naroff 31c89f2bb0 Add Basic/Targets.cpp to the Xcode project...
llvm-svn: 46182
2008-01-18 23:34:17 +00:00
Fariborz Jahanian 965a8961c7 Patch to rewrite ObjC2's foreach-stmt.
llvm-svn: 45760
2008-01-08 22:06:28 +00:00
Chris Lattner a3fc41d616 move objc expr sema to its own file.
llvm-svn: 45597
2008-01-04 22:32:30 +00:00
Chris Lattner 20455f204f Fix a crash reported by Seo Sanghyeon.
llvm-svn: 45530
2008-01-03 06:36:51 +00:00
Chris Lattner 266a2ff3ac Compute the proper sourcerange for an CompoundLiteralExpr.
llvm-svn: 45504
2008-01-02 21:46:24 +00:00
Chris Lattner 6420345a34 move file to proper place in project.
llvm-svn: 45379
2007-12-28 05:27:01 +00:00
Chris Lattner 02ac5e87e0 From Lucas Newman:
"Here's a tiny patch that lets the clang Xcode project build in any 
location, so llvm doesn't have to be checked out in your home folder."

llvm-svn: 45376
2007-12-28 00:38:23 +00:00
Chris Lattner cc10d93dcf alphabetize in project.
llvm-svn: 45373
2007-12-27 20:59:50 +00:00
Ted Kremenek fda0aaf01b Updated Xcode project to be in sync with recent changes in file locations
introduced in r45292 (http://llvm.org/viewvc/llvm-project?rev=45292&view=rev)

llvm-svn: 45293
2007-12-21 21:48:31 +00:00
Ted Kremenek 0ec9a20bf0 Updated locations of TranslationUnit.[cpp,h] in XCode project.
Added AST/ASTConsumer.cpp to XCode project.

llvm-svn: 45206
2007-12-19 18:07:54 +00:00
Chris Lattner 2a70c95387 reenable this code, fix the testcase.
llvm-svn: 45205
2007-12-19 18:01:43 +00:00
Fariborz Jahanian 24cb52c9b0 Patch to implemented objective-c's dynamic object pointer qualified with
the protocol list (id<P,...> types).

llvm-svn: 45121
2007-12-17 21:03:50 +00:00
Chris Lattner a0943c36ed Targets.cpp is gone.
llvm-svn: 45119
2007-12-17 20:56:50 +00:00
Chris Lattner 8d720d083a Sink getName into DirectoryLookup to simplify the client in clang.
llvm-svn: 45106
2007-12-17 17:57:27 +00:00
Chris Lattner 1587e6db01 add headermap.cpp
llvm-svn: 45095
2007-12-17 08:22:46 +00:00
Chris Lattner c4ba38ed1e Step #1 in adding headermap support to clang.
llvm-svn: 45089
2007-12-17 06:36:45 +00:00
Steve Naroff f44cb63859 Encode enumeral types.
llvm-svn: 44956
2007-12-12 22:30:11 +00:00
Chris Lattner 061227aa59 unbreak the build. I'm still working on test failures.
llvm-svn: 44938
2007-12-12 17:58:05 +00:00
Chris Lattner da463fe7c1 split objc pieces of SemaDecl.cpp out into SemaDeclObjC.cpp
llvm-svn: 44925
2007-12-12 07:09:47 +00:00
Chris Lattner c6208a72f7 Fix a codegen crash on test/CodeGen/cast.c, reported by Keith.
llvm-svn: 44908
2007-12-12 04:13:20 +00:00
Chris Lattner e002fbea56 Add ObjC parser support for concatenated ObjC strings. Note that
this is passed to sema and ignored there, so the second part of the
string will not make it into the AST.  Passing to Fariborz to finish
Sema + AST construction.

llvm-svn: 44898
2007-12-12 01:04:12 +00:00
Anders Carlsson 895af08562 Move target specific builtin IDs to TargetBuiltins.h so that they can be used by CGBuiltin.cpp
llvm-svn: 44748
2007-12-09 23:17:02 +00:00
Ted Kremenek 68d232b477 Added Driver/TranslationUnit.h and Driver/TranslationUnit.cpp to the
XCode project.

llvm-svn: 44632
2007-12-05 21:36:57 +00:00
Ted Kremenek 2968476c2d Added Basic/LangOptions.cpp to XCode project.
llvm-svn: 44625
2007-12-05 19:07:32 +00:00
Chris Lattner 9e137aad78 fix a couple switch codegen problems Oliver reported.
llvm-svn: 44484
2007-12-01 05:27:33 +00:00
Chris Lattner e9c810c87c pass diagnostics into the rewrite test client.
llvm-svn: 44468
2007-11-30 22:25:36 +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
Chris Lattner db2a6ef881 Fix a bug checking for 'int foo(void)' that didn't look through typedefs of void.
Bug pointed out by Michael Zolda, thanks!

llvm-svn: 44408
2007-11-28 18:51:29 +00:00
Ted Kremenek 43fb8b0799 Moved logic for -Wfloat-equal to SemaChecking.cpp.
Moved utility functions IgnoreParen and friends to be static inline functions
defined in SemaUtil.h.

Added SemaUtil.h to Xcode project.

llvm-svn: 44312
2007-11-25 00:58:00 +00:00
Steve Naroff 257b4a2467 Fix a basic bug (having to do with typedefs) in Sema::UsualArithmeticConversions().
This resuled in the following crash below.

Also modified the usual-float.c test case to capture this case.

[steve-naroffs-imac:clang/test/Sema] snaroff% ../../../../Debug/bin/clang usual-float.c
Assertion failed: (0 && "Sema::UsualArithmeticConversions(): illegal float comparison"), function UsualArithmeticConversions, file SemaExpr.cpp, line 960.
0   clang                               0x001ef9b9 _ZN40_GLOBAL__N_Signals.cpp_00000000_4E6DAF8315PrintStackTraceEv + 45
1   clang                               0x001efd5f _ZN40_GLOBAL__N_Signals.cpp_00000000_4E6DAF8313SignalHandlerEi + 323
2   libSystem.B.dylib                   0x90c6297b _sigtramp + 43
3   ???                                 0xffffffff 0x0 + 4294967295
4   libSystem.B.dylib                   0x90cdb782 raise + 26
5   libSystem.B.dylib                   0x90cead3f abort + 73
6   libSystem.B.dylib                   0x90cdc923 __assert_rtn + 101
7   clang                               0x00077316 _ZN5clang4Sema26UsualArithmeticConversionsERPNS_4ExprES3_b + 1004
8   clang                               0x000803cf _ZN5clang4Sema27CheckMultiplyDivideOperandsERPNS_4ExprES3_NS_14SourceLocationEb + 181
9   clang                               0x0007a8e8 _ZN5clang4Sema10ActOnBinOpENS_14SourceLocationENS_3tok9TokenKindEPvS4_ + 472
10  clang                               0x000cf058 _ZN5clang6Parser26ParseRHSOfBinaryExpressionENS_6Action12ActionResultILj0EEEj + 1286
11  clang                               0x000cf2de _ZN5clang6Parser25ParseAssignmentExpressionEv + 86

llvm-svn: 43985
2007-11-10 19:45:54 +00:00
Chris Lattner 198b3e085d change source location to have two bits for macros, tracking
whether the location is the start and/or end of an expansion.
These are currently not set or used by anything.

llvm-svn: 43968
2007-11-09 23:52:16 +00:00