Daniel Dunbar
0c4eda5923
We must always mangle attribute overloadable functions; even if in a
...
system header.
- Prevents a codegen crash when anything used anything in tgmath! :)
llvm-svn: 65200
2009-02-20 23:09:27 +00:00
Steve Naroff
326064168a
Fix <rdar://problem/6500554> missing objc error message.
...
llvm-svn: 65198
2009-02-20 22:59:16 +00:00
Chris Lattner
70946da73a
switch the macroinfo argument lists from being allocated off the heap
...
to being allocated from the same bumpptr that the MacroInfo objects
themselves are.
This speeds up -Eonly cocoa.h pth by ~4%, fsyntax-only is barely measurable.
llvm-svn: 65195
2009-02-20 22:46:43 +00:00
Chris Lattner
f87c510cc9
detemplatify setArgumentList and some other cleanups.
...
llvm-svn: 65187
2009-02-20 22:31:31 +00:00
Chris Lattner
666f7a42d6
require the MAcroInfo objects are explcitly destroyed.
...
llvm-svn: 65179
2009-02-20 22:19:20 +00:00
Chris Lattner
7c981a79f7
allocate and dellocate objc decl list through AST Context instead of
...
with new/delete. With disable-free, this reduces the number of 4/8 byte
mallocs from 4793/1541 to 865/456 and also drops other sizes as well.
This is a very small perf win, nothing major.
llvm-svn: 65171
2009-02-20 21:44:01 +00:00
Chris Lattner
68d42c77b2
fix indentation
...
llvm-svn: 65170
2009-02-20 21:38:52 +00:00
Chris Lattner
696197cd30
silence some warnings in no asserts mode.
...
llvm-svn: 65169
2009-02-20 21:37:53 +00:00
Chris Lattner
2229872d2f
add plumbing to get ASTContext& down to allocation/deallocation points in ObjCList,
...
but don't start using it yet. Renamed some methods to be more consistent.
llvm-svn: 65168
2009-02-20 21:35:13 +00:00
Chris Lattner
4d1eb76ada
newly factored, we can now move the set and destroy methods out of line.
...
llvm-svn: 65166
2009-02-20 21:16:26 +00:00
Ted Kremenek
b087942765
Greatly simplify the logic in ExplodedGraphImpl::TrimGraph. Now we just do a
...
vanilla reverse-BFS followed by a forward-DFS instead of resulting to strange
histrionics (whose purpose I can no longer remember) in the reverse-BFS stage.
This fixes an assertion failure in BugReporter due to edge cases where no root
was being hit in the reverse-BFS phase.
llvm-svn: 65160
2009-02-20 21:10:26 +00:00
Chris Lattner
2e635f6102
rename ObjCList::clear() -> ObjCList::Destroy(). Require that destroy is called
...
before the dtor.
llvm-svn: 65156
2009-02-20 21:02:11 +00:00
Chris Lattner
f1ccb0cef0
rearrange the contents of DeclObjC to be by-class. Fix some 80 column issues
...
and other non-semantic changes.
llvm-svn: 65155
2009-02-20 20:59:54 +00:00
Chris Lattner
a4af543375
destroy should forward to base class.
...
llvm-svn: 65151
2009-02-20 20:42:28 +00:00
Chris Lattner
d7ba858314
move the @implementation ivar list to being an ObjCList, which prevents
...
it from being leaked, among other things.
llvm-svn: 65150
2009-02-20 20:41:34 +00:00
Daniel Dunbar
2f3a3d9f7a
Add some IRgen improvement notes.
...
llvm-svn: 65146
2009-02-20 19:34:45 +00:00
Daniel Dunbar
27032de34b
Shorten; no functionality change.
...
llvm-svn: 65145
2009-02-20 19:34:33 +00:00
Daniel Dunbar
5006f4a5f0
Take advantage of noreturn attribute to add unreachable instruction &
...
clear insertion point. The rest of IRgen should theoretically take
advantage of this to avoid emitting dead code. Theory != Practice.
llvm-svn: 65141
2009-02-20 18:54:31 +00:00
Anders Carlsson
c4c6031859
Always try to fold array sizes, and warn if we could fold something that isn't an ICE. This makes us compatible with GCC.
...
llvm-svn: 65140
2009-02-20 18:53:20 +00:00
Chris Lattner
a499715c83
remove some more methods from objc decls, using the iterator
...
interfaces more consistently.
llvm-svn: 65138
2009-02-20 18:43:26 +00:00
Daniel Dunbar
ce39954d5d
Handle constant int -> ptr casts of lvalue results.
...
- PR3463 (again).
llvm-svn: 65133
2009-02-20 18:22:23 +00:00
Chris Lattner
f5b77513b0
remove some slow O(n) methods.
...
llvm-svn: 65132
2009-02-20 18:18:36 +00:00
Chris Lattner
ed89b3ff2f
Change ObjCForwardProtocolDecl to use an ObjCList.
...
llvm-svn: 65131
2009-02-20 18:10:37 +00:00
Daniel Dunbar
cdbb5e336d
Set call attribute for direct calls (i.e. noreturn).
...
- Remove an unused variant of EmitCallExpr overload.
llvm-svn: 65130
2009-02-20 18:06:48 +00:00
Chris Lattner
9ee23b7f1a
move the interace list of @class to use ObjCList.
...
llvm-svn: 65129
2009-02-20 18:04:31 +00:00
Steve Naroff
17b2f5d728
Fix <rdar://problem/6586239> bitfield constraints not enforced (for ObjC)
...
llvm-svn: 65128
2009-02-20 17:57:11 +00:00
Chris Lattner
a11480defa
remove a dead list.
...
llvm-svn: 65127
2009-02-20 17:53:35 +00:00
Chris Lattner
d0b80c8c75
add support for amd64-*, patch by Brooks Davis!
...
llvm-svn: 65124
2009-02-20 17:04:14 +00:00
Chris Lattner
90669d0500
switch ObjCMethodDecl's parameter list from being explicitly managed to an ObjCList.
...
llvm-svn: 65114
2009-02-20 06:23:21 +00:00
Chris Lattner
fa62dc3483
switch the interface ivar list from being explicitly managed to using ObjCList.
...
llvm-svn: 65113
2009-02-20 06:10:45 +00:00
Chris Lattner
8d10c11606
move more objc destruction out of dtors into Destroy.
...
llvm-svn: 65112
2009-02-20 06:03:09 +00:00
Chris Lattner
55c8d39695
move some objc decl destruction out of dtors into Destroy method.
...
llvm-svn: 65111
2009-02-20 05:54:35 +00:00
Zhongxing Xu
617bc3d02e
Add an example in comments.
...
llvm-svn: 65110
2009-02-20 05:19:30 +00:00
Eli Friedman
cf7cbe7441
A few small tweaks to isConstantInitializer. (No test because this
...
isn't getting used by Sema or CodeGen at the moment...)
llvm-svn: 65107
2009-02-20 02:36:22 +00:00
Eli Friedman
0b8337c30b
Add support for * (unary dereference) operator to ExprConstant.
...
llvm-svn: 65105
2009-02-20 01:57:15 +00:00
Chris Lattner
caae716837
optimize the 'StoredDeclsMap' for the common case where there is
...
exactly one decl with a specific name in a specific context. This
avoids a bunch of malloc traffic and shrinks StoredDeclsMap to hold
one pointer instead of 3 words (for a std::vector).
This speeds up -fsyntax-only on cocoa.h with PTH by ~7.3%.
llvm-svn: 65103
2009-02-20 01:44:05 +00:00
Eli Friedman
ce98257691
Suppress constant initializer checking when the declaration isn't valid.
...
This prevents emitting diagnostics which are almost certainly useless.
(Note that the test is checking that we emit only one diagnostic.)
llvm-svn: 65101
2009-02-20 01:34:21 +00:00
Eli Friedman
719ed1a9ab
Initialize the Init variable to something reasonable when we emit an
...
error, so we don't crash.
llvm-svn: 65099
2009-02-20 01:18:21 +00:00
Eli Friedman
742421e2e7
ExprConstant handling for a couple more cases of pointer-to-int casts
...
from the testsuite.
llvm-svn: 65098
2009-02-20 01:15:07 +00:00
Fariborz Jahanian
c86fb5ecb4
More objc gc's ir-gen fixes.
...
llvm-svn: 65097
2009-02-20 01:14:43 +00:00
Chris Lattner
29578f3f41
make the redeclaration case faster for the common instance of a redeclaration
...
where there is exactly one existing declaration. This is common.
this speeds up clang about 3% on cocoa.h for me 0.165 -> 0.160s
llvm-svn: 65096
2009-02-20 01:10:07 +00:00
Chris Lattner
33f219d1a9
80 cols
...
llvm-svn: 65095
2009-02-20 00:56:18 +00:00
Chris Lattner
24e24d51a1
slight code simplifications.
...
llvm-svn: 65094
2009-02-20 00:55:03 +00:00
Mike Stump
2a9baebae1
Deox and Capitolize.
...
llvm-svn: 65093
2009-02-20 00:45:51 +00:00
Chris Lattner
464ceb4ec8
map source ranges through macro expansions. Before:
...
t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float'))
MAX(P, F);
^~~~~~~~~
t.m:1:78: note: instantiated from:
#define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
^
(no ranges on the second diagnostics)
After:
t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float'))
MAX(P, F);
^~~~~~~~~
t.m:1:78: note: instantiated from:
#define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
~~~ ^ ~~~
(ranges!)
llvm-svn: 65090
2009-02-20 00:25:28 +00:00
Mike Stump
f5a5c4fa11
Fix spacing.
...
llvm-svn: 65089
2009-02-20 00:19:45 +00:00
Chris Lattner
1973d84625
refactor, pass ranges down instead of the whole
...
DiagnosticInfo.
llvm-svn: 65088
2009-02-20 00:18:51 +00:00
Ted Kremenek
c537a6d3f1
Fix crash from <rdar://problem/6562655>: 'init' method only return a receiver alias if the return type is a location.
...
llvm-svn: 65084
2009-02-20 00:05:35 +00:00
Chris Lattner
cf868c458c
replace a dirty hack with a clean solution. Too bad we can't
...
use Blocks for our callbacks ;-)
llvm-svn: 65083
2009-02-19 23:53:20 +00:00
Ted Kremenek
68abaa984d
retain/release checker: Generate an intermediate simulation node for "leak"
...
transitions and then generate a subsequent node that removes the dead symbol
bindings. This should drastically improve caching in the simulation graph when
retain-counted objects are being tracked.
llvm-svn: 65082
2009-02-19 23:47:02 +00:00