Ted Kremenek
c4488441da
Update Xcode project.
...
llvm-svn: 56109
2008-09-11 18:14:22 +00:00
Anders Carlsson
35ba57dad7
Fix indentation on files in CodeGen and Sema.
...
llvm-svn: 55568
2008-08-30 16:18:10 +00:00
Ted Kremenek
f011e10d6a
Remove BasicStore.h from Xcode project.
...
llvm-svn: 55520
2008-08-28 23:40:08 +00:00
Ted Kremenek
85a401ea15
Removed Regions.[h,cpp] from the Xcode project.
...
llvm-svn: 55516
2008-08-28 23:33:36 +00:00
Ted Kremenek
3a01c1eb8e
Update Xcode project.
...
llvm-svn: 55449
2008-08-27 23:13:22 +00:00
Ted Kremenek
5cc989dad1
Update Xcode project.
...
llvm-svn: 55441
2008-08-27 22:31:20 +00:00
Ted Kremenek
a968d42be0
Update Xcode project.
...
llvm-svn: 55322
2008-08-25 19:33:19 +00:00
Anders Carlsson
6305c5f437
Add support for parsing the objc_gc attribute. Tests will come shortly.
...
llvm-svn: 55269
2008-08-23 23:22:21 +00:00
Anders Carlsson
cabf493d77
Tweak the indentation for a couple of files
...
llvm-svn: 55240
2008-08-23 16:36:06 +00:00
Ted Kremenek
30b963e4ed
Update Xcode project.
...
llvm-svn: 55188
2008-08-22 18:03:50 +00:00
Anders Carlsson
87fc5a5e6b
Add preliminary (and probably broken) codegen support for C++ static initializers.
...
llvm-svn: 55180
2008-08-22 16:00:37 +00:00
Ted Kremenek
caefa24c76
Update Xcode project.
...
llvm-svn: 54759
2008-08-13 20:59:32 +00:00
Ted Kremenek
1cac74bf0f
Update Xcode project.
...
llvm-svn: 54755
2008-08-13 20:43:54 +00:00
Ted Kremenek
b49bb5a050
Update Xcode project.
...
llvm-svn: 54693
2008-08-12 18:29:20 +00:00
Chris Lattner
572100b648
Fix PR2400 by more graceful handling of invalid decls. Don't try to layout
...
an invalid struct decl. Thanks to Martin Doucha for the
isIncompleteArrayType part of this patch.
llvm-svn: 54592
2008-08-09 21:35:13 +00:00
Ted Kremenek
be160966cd
Update xcode project to new libDriver layout.
...
llvm-svn: 54393
2008-08-06 02:55:08 +00:00
Chris Lattner
b4ec8de163
improve order
...
llvm-svn: 54244
2008-07-31 06:48:13 +00:00
Chris Lattner
6fc6614c0d
alphabeticalize a bit better.
...
llvm-svn: 54104
2008-07-26 22:09:09 +00:00
Chris Lattner
3e3ff3e538
alphabeticalize
...
llvm-svn: 54018
2008-07-25 16:06:51 +00:00
Ted Kremenek
19f4e16f3e
Update Xcode project.
...
llvm-svn: 53952
2008-07-23 17:13:09 +00:00
Ted Kremenek
a8efcf58a2
Update Xcode project.
...
llvm-svn: 53910
2008-07-22 16:22:19 +00:00
Ted Kremenek
70fe0ca126
Update Xcode project.
...
llvm-svn: 53577
2008-07-14 23:42:26 +00:00
Chris Lattner
6d1a3c2e2b
remove CGObjCEtoile until it compiles.
...
llvm-svn: 53552
2008-07-14 16:54:05 +00:00
Ted Kremenek
dfc7b3d329
Update Xcode project.
...
llvm-svn: 53488
2008-07-11 22:48:58 +00:00
Ted Kremenek
c78ce1840a
Updated Xcode project.
...
llvm-svn: 53424
2008-07-10 22:04:37 +00:00
Ted Kremenek
263054b5e1
Update Xcode project.
...
llvm-svn: 53257
2008-07-08 23:29:24 +00:00
Ted Kremenek
ff7f2e76bf
Update Xcode project.
...
llvm-svn: 53076
2008-07-03 04:30:48 +00:00
Anders Carlsson
7a241baf2f
Shuffle things around in preparation for integrating Eli's constant evaluator.
...
llvm-svn: 53074
2008-07-03 04:20:39 +00:00
Ted Kremenek
e6cc6bb5b3
Updated Xcode project with new files in the Driver: AnalysisConsumer.[h,cpp]
...
llvm-svn: 52997
2008-07-02 00:03:52 +00:00
Chris Lattner
2c6fcf5abb
move decl attribute processing to a new SemaDeclAttr.cpp.
...
llvm-svn: 52792
2008-06-26 18:38:35 +00:00
Ted Kremenek
a4c52a3366
Update Xcode project so that the clang target depends on LLVMAnalysis.a
...
llvm-svn: 52790
2008-06-26 17:53:57 +00:00
Ted Kremenek
c9d1f45210
Update Xcode project.
...
llvm-svn: 52720
2008-06-25 15:15:35 +00:00
Ted Kremenek
ea736c5d02
Rename summary methods for "instance methods" to "class methods" (the names got screwed up). No functionality change.
...
llvm-svn: 52650
2008-06-23 22:21:20 +00:00
Chris Lattner
8a6274d745
add a new clang::APValue class at Eli's request. It is a discriminated
...
union between [potentially complex] APInt/APFloat.
llvm-svn: 52609
2008-06-22 05:45:53 +00:00
Ted Kremenek
b0ead8520c
Updated Xcode project.
...
llvm-svn: 52556
2008-06-20 21:46:17 +00:00
Ted Kremenek
af44b83296
Updated Xcode project.
...
llvm-svn: 52065
2008-06-06 21:48:51 +00:00
Ted Kremenek
1cb246ef20
Update Xcode project.
...
llvm-svn: 51941
2008-06-04 15:38:06 +00:00
Ted Kremenek
3b965e1d01
Updated Xcode project.
...
llvm-svn: 51281
2008-05-19 23:19:04 +00:00
Chris Lattner
ba7a6c14ed
set long/pointers to 64-bits on ppc64/x86-64
...
llvm-svn: 50891
2008-05-09 06:17:04 +00:00
Ted Kremenek
27a4ba66fd
Updated Xcode project.
...
llvm-svn: 50864
2008-05-08 19:20:24 +00:00
Chris Lattner
3c04ff00c2
start implementation of a macro rewriter, this is currently just stubbed out.
...
llvm-svn: 50845
2008-05-08 06:52:13 +00:00
Ted Kremenek
7d28c2c681
Update XCode project (added GRTransferFuncs.cpp).
...
llvm-svn: 49806
2008-04-16 18:39:47 +00:00
Chris Lattner
dffe0f7db5
Add -o support for -emit-html, make it not produce a file on an error.
...
llvm-svn: 49777
2008-04-16 05:21:09 +00:00
Steve Naroff
a8f0d12e81
Rename a file and update the Xcode project.
...
llvm-svn: 49693
2008-04-14 22:05:54 +00:00
Chris Lattner
d80edddccd
move a ton of code out of line, from RewriteRope.h -> RewriteRope.cpp
...
llvm-svn: 49664
2008-04-14 17:54:23 +00:00
Chris Lattner
cbb6bad435
move the DeltaTree implementation out of line, remove debugging printfs etc.
...
llvm-svn: 49591
2008-04-12 22:00:40 +00:00
Chris Lattner
d154731131
Do an initial hack at replacing one of the incredibly inefficient
...
(but simple!) datastructures in the rewriter with a more complex but
more efficient one.
This replaces the Deltas vector with a specialized BTree that makes
delta lookups much more efficient. This speeds up -emit-html on a 500K
.i file from 157.154 to 27.127 seconds on my machine (5.8x).
While this code is functional, it isn't very pretty, I have much
refactoring planned for it, and will remove the USE_VECTOR ifdef.
Stay tuned.
llvm-svn: 49586
2008-04-12 20:28:24 +00:00
Ted Kremenek
2cf508c880
Update Xcode project with missing files.
...
llvm-svn: 49550
2008-04-11 18:30:21 +00:00
Ted Kremenek
1d511d3bae
Add SemaDeclCXX.cpp to Xcode project.
...
llvm-svn: 49428
2008-04-09 15:50:11 +00:00
Ted Kremenek
5d1647daf9
Add HTMLRewrite.h to Xcode project.
...
llvm-svn: 49405
2008-04-08 22:31:28 +00:00
Chris Lattner
ddfdaf9a69
Simplify some objc compatibility testing, make interfaceTypesAreCompatible
...
a static function named isCompatibleInterfaceAssign.
llvm-svn: 49305
2008-04-07 04:07:56 +00:00
Steve Naroff
8164ca61b1
Add DeclBase.h to Xcode project.
...
llvm-svn: 49223
2008-04-04 18:04:30 +00:00
Chris Lattner
15c6b7c948
various bug fixes, add to xcode project.
...
llvm-svn: 49216
2008-04-04 15:47:22 +00:00
Ted Kremenek
572875c43f
Updated Xcode project to include BugReporter.[cpp,h].
...
llvm-svn: 49128
2008-04-03 04:43:40 +00:00
Ted Kremenek
296b4c1bc6
Update Xcode project: add BasicObjCFoundationChecks.h
...
llvm-svn: 48887
2008-03-27 17:17:51 +00:00
Ted Kremenek
9b7843124e
Added AnnotatedPath.h, GRAuditor.h, GRSimpleAPICheck.h and BasicObjCFoundationChecks.cpp to Xcode project.
...
llvm-svn: 48868
2008-03-27 07:26:42 +00:00
Ted Kremenek
f6d2919a3e
Updated Xcode project with HTMLDiagnostics.[h,cpp]
...
llvm-svn: 48866
2008-03-27 06:18:34 +00:00
Ted Kremenek
9c27b057da
Added PathDiagnostic.[h,cpp] to Xcode project.
...
llvm-svn: 48862
2008-03-27 03:50:10 +00:00
Nate Begeman
03851eb91f
Add missing files
...
llvm-svn: 48783
2008-03-25 18:31:12 +00:00
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
Steve Naroff
2011338446
Rewrite global variable initializers.
...
llvm-svn: 43947
2007-11-09 15:20:18 +00:00
Chris Lattner
b74f6e82e4
add a getAtOffset() member to simplify some code.
...
llvm-svn: 43905
2007-11-08 20:51:02 +00:00
Chris Lattner
e90ce8def3
Add a new RewriteRope data structure which is a smarter way to represent the text
...
backing a rewrite buffer than using an std::vector<char>. This class was hacked
together very quickly and needs to be cleaned up, but it seems to work. It speeds
up rewriting a a 7M file from 6.43s to 0.24s on my machine. The impl could also
be made to be a lot more algorithmically sound.
This produces identical output to using vector on this testcase, if it causes a
problems or bugs are encountered, it can be disabled by changing the
RewriteBuffer::Buffer typedef back.
llvm-svn: 43884
2007-11-08 07:35:14 +00:00
Ted Kremenek
31b789c0d8
Added TypeSerialization.cpp and DeclSerialization.cpp to the XCode project.
...
llvm-svn: 43710
2007-11-05 17:04:40 +00:00
Chris Lattner
b338a6b9f3
add support for vector type compatibility checking. Patch by Nate Begeman.
...
llvm-svn: 43604
2007-11-01 05:03:41 +00:00
Steve Naroff
2f55b98725
Tweak RewriteInterfaceDecl() to generate a typedef (if one hasn't already been generated).
...
llvm-svn: 43600
2007-11-01 03:35:41 +00:00
Fariborz Jahanian
d822d68b74
More infrastructure to recognize objective-c's type qualifiers (in,inout, etc.)
...
llvm-svn: 43580
2007-10-31 21:59:43 +00:00
Steve Naroff
6d40db0dde
Implement a more sensible strategy for ObjC built-in types (addressing a long standing FIXME in Sema::GetObjcIdType()).
...
This removes several gross hacks to work around the previous "lazy" behavior.
Two notes:
- MinimalActions still needs to be taught about the built-in types (This breaks one of the -noop test cases). I started this, then added a FIXME.
- I didn't convert Sema::GetObjcProtoType() yet.
llvm-svn: 43567
2007-10-31 18:42:27 +00:00
Fariborz Jahanian
d728e949bb
After Anders check-in, we can now encode 'Class' type.
...
llvm-svn: 43556
2007-10-31 16:00:13 +00:00
Steve Naroff
37e011ce43
Add some plumbing to help cope with rewriting "id<p>", "Class<p>*".
...
llvm-svn: 43543
2007-10-31 04:38:33 +00:00
Fariborz Jahanian
ca5338196f
Added new type and bitfield fields in some decl types in preparation for objective-c's type qualifiers.
...
Added initialization of Class/SEMA types.
llvm-svn: 43534
2007-10-31 00:12:35 +00:00
Steve Naroff
5cdcd9b61c
Stop pre-defining objc_msgSend/objc_getClass in the preprocessor. Instead, I generate these declaration on the fly when rewriting a message expression.
...
llvm-svn: 43529
2007-10-30 23:14:51 +00:00
Fariborz Jahanian
509d8d6fc6
Added type encoding for 'id' type.
...
llvm-svn: 43504
2007-10-30 17:06:23 +00:00
Steve Naroff
4cd61acc33
Remove a couple FIXME's for rewriting ObjC interfaces (which are now being rewritten properly).
...
llvm-svn: 43494
2007-10-30 03:43:13 +00:00
Fariborz Jahanian
797f24cd7e
Encoding for objectiive-c methods.
...
llvm-svn: 43481
2007-10-29 22:57:28 +00:00
Steve Naroff
33a1e80dd1
This commit contains lot's of small tweaks to how we pass around and store SourceLocation's for interfaces/protocols/categories/implementations.
...
llvm-svn: 43475
2007-10-29 21:38:07 +00:00
Anders Carlsson
18acd44514
Address Chris's comments.
...
llvm-svn: 43445
2007-10-29 06:33:42 +00:00
Chris Lattner
73c56c0735
Implement *skeletal* support for representing GNU inline asm stmts in the AST,
...
resolving a crash on a .i file in PR1750. We now generate 49 errors on the
.i file in that bug.
llvm-svn: 43433
2007-10-29 04:04:16 +00:00
Fariborz Jahanian
801b63525d
Path to synthesize 'instance' size field of _objc_class metadata.
...
llvm-svn: 43409
2007-10-26 23:09:28 +00:00
Steve Naroff
161a92b976
Start rewriting ObjC interfaces. As a start, we comment out all the methods. This involved refining how the parser/AST passes/manages SourceLocations for ObjcMethodDecl's.
...
llvm-svn: 43404
2007-10-26 20:53:56 +00:00
Ted Kremenek
5749aaedd9
Added DeclSerialization.cpp to XCode project.
...
llvm-svn: 43362
2007-10-25 21:39:10 +00:00
Fariborz Jahanian
51f2182338
Refactored several meta data for reusability.
...
Changed the entire rewrite of metadata to write to std::string
object instead of stdout.
llvm-svn: 43360
2007-10-25 20:55:25 +00:00
Chris Lattner
211f8b8352
Convert one type of metadata to use std::string instead of
...
printf as an example.
llvm-svn: 43346
2007-10-25 17:07:24 +00:00
Ted Kremenek
bd8497b011
Added SourceLocation.cpp to XCode project.
...
llvm-svn: 43344
2007-10-25 16:03:53 +00:00
Chris Lattner
35e564ed09
Add a new ChooseExpr::isConditionTrue method to unify
...
some code.
llvm-svn: 43322
2007-10-25 00:29:32 +00:00
Fariborz Jahanian
b2f525dabc
Refactord instance and class metadata emission. Refactored protocols metadata emission.
...
Implemented emission of category metadata,
llvm-svn: 43308
2007-10-24 19:23:36 +00:00
Steve Naroff
db1ab1c2b0
Add some plumbing to rewrite message expressions (still under construction).
...
llvm-svn: 43274
2007-10-23 23:50:29 +00:00
Steve Naroff
e670dbb9e6
- Add rewrite rule for @class .
...
- Add setter/getter to ObjcClassDecl.
- Predefined key runtime functions.
llvm-svn: 43257
2007-10-23 20:20:08 +00:00
Fariborz Jahanian
6eafb030f0
This patch generates protocol metadata and all its sub-metadata.
...
llvm-svn: 43233
2007-10-22 21:41:37 +00:00
Steve Naroff
684dc4107f
Fix the previous (short lived:-) FIXME.
...
I didn't realize that GCC considers this a hard error (I thought it was built-in).
Since it's not, we should simply emit an error.
[dylan:~/llvm/tools/clang] admin% cc -c trivial.m
trivial.m:6: error: cannot find interface declaration for 'NSConstantString'
[administrators-powerbook59:~/llvm/tools/clang] admin% ../../Debug/bin/clang trivial.m
trivial.m:6:16: error: cannot find interface declaration for 'NSConstantString'
NSString *s = @"123";
^
1 diagnostic generated.
llvm-svn: 43157
2007-10-18 23:53:51 +00:00
Ted Kremenek
0f39de13a0
Added StmtIterator.cpp and StmtIterator.h to the XCode project.
...
llvm-svn: 43139
2007-10-18 18:22:01 +00:00
Steve Naroff
8569d77349
Fix the following bug...
...
unsigned char asso_values[] = { 34 };
int legal2() {
return asso_values[0];
}
The code that creates the new constant array type was operating on the original type.
As a result, the constant type being generated was "unsigned char [1][]" (which is wrong).
The fix is to operate on the element type - in this case, the correct type is "unsigned char [1]"
I added this case to array-init.c, which clearly didn't catch this bogosity...
llvm-svn: 43112
2007-10-18 03:27:23 +00:00
Ted Kremenek
970217fae9
Added Driver/SerializationTest.cpp to the XCode project.
...
llvm-svn: 43054
2007-10-16 23:40:12 +00:00
Fariborz Jahanian
6bd1d612ac
Fix location processing of @selector: the range should include the @ sign.
...
llvm-svn: 43051
2007-10-16 23:21:02 +00:00
Chris Lattner
a7c19feca2
Add a new Rewriter::getRangeSize method.
...
Rename SourceRange::Begin()/End() to getBegin()/getEnd() for
consistency with other code.
Start building the rewriter towards handling @encode.
llvm-svn: 43047
2007-10-16 22:36:42 +00:00
Fariborz Jahanian
ebac2cb235
Patch to diagnose duplicate method implementations.
...
llvm-svn: 43046
2007-10-16 21:52:23 +00:00
Chris Lattner
0bd1c97293
Push the rewriter forward a bit more. Now it rewrites
...
#import to #include's as a test.
llvm-svn: 43041
2007-10-16 21:07:07 +00:00
Fariborz Jahanian
4bef462a3e
Patch to implement AST generation for objective-c's @selector expression.
...
llvm-svn: 43038
2007-10-16 20:40:23 +00:00
Steve Naroff
698495522d
Bad cast...need to use dyn_cast_or_null. Also changed Sema::InitBuiltinVaListType (which had the same bug).
...
llvm-svn: 43023
2007-10-16 00:00:18 +00:00
Fariborz Jahanian
76a9427783
Patch to parse @selector expressions.
...
llvm-svn: 43022
2007-10-15 23:39:13 +00:00
Steve Naroff
32e44c0032
Move type compatibility predicates from Type to ASTContext. In addition, the predicates are now instance methods (they were previously static class methods on Type).
...
This allowed me to fix the following hack from this weekend...
// FIXME: Devise a way to do this without using strcmp.
// Would like to say..."return getAsStructureType() == IdStructType;", but
// we don't have a pointer to ASTContext.
bool Type::isObjcIdType() const {
if (const RecordType *RT = getAsStructureType())
return !strcmp(RT->getDecl()->getName(), "objc_object");
return false;
}
...which is now...
bool isObjcIdType(QualType T) const {
return T->getAsStructureType() == IdStructType;
}
Side notes:
- I had to remove a convenience function from the TypesCompatibleExpr class.
int typesAreCompatible() const {return Type::typesAreCompatible(Type1,Type2);}
Which required a couple clients get a little more verbose...
- Result = TCE->typesAreCompatible();
+ Result = Ctx.typesAreCompatible(TCE->getArgType1(), TCE->getArgType2());
Overall, I think this change also makes sense for a couple reasons...
1) Since ASTContext vends types, it makes sense for the type compatibility API to be there.
2) This allows the type compatibility predeciates to refer to data not strictly present in the AST (which I have found problematic on several occasions).
llvm-svn: 43009
2007-10-15 20:41:53 +00:00