Daniel Dunbar
7aecee998c
(LLVM svn up) Generalize RuntimeFunctions to RuntimeGlobals and add
...
CodeGenModule::CreateRuntimeVariable.
- No real functionality change; although we now assert on silly
things like:
--
int objc_exception_throw;
void f0() { @throw(@"A"); }
--
instead of accepting it.
llvm-svn: 66292
2009-03-06 22:13:30 +00:00
Ted Kremenek
81bddcb61e
Start work on subclassing PathDiagnosticPiece to distinguish more between control-flow pieces, events, etc.
...
llvm-svn: 66291
2009-03-06 22:10:49 +00:00
Ted Kremenek
f4649f9f57
Add null-check assertion in the constructor of Selector.
...
llvm-svn: 66290
2009-03-06 22:09:31 +00:00
Daniel Dunbar
e03c6102cc
Handle #pragma pack(0). I left this out of diagnostic because users should
...
really use pack() instead.
- <rdar://problem/6650243> clang warns about '#pragma pack(0)'
llvm-svn: 66287
2009-03-06 20:45:54 +00:00
Douglas Gregor
c2fd626cac
Improve recovery from ill-formed scope specifiers. Fixes PR3670.
...
llvm-svn: 66286
2009-03-06 19:06:37 +00:00
Mike Stump
d6ef62f0bf
Pass the type of the block literal around to make required temporal ordering of code clearer.
...
llvm-svn: 66284
2009-03-06 18:42:23 +00:00
Daniel Dunbar
13e9eff3f2
Fix thinko. *cough* ofcourseItestedit *cough*
...
llvm-svn: 66283
2009-03-06 18:35:43 +00:00
Douglas Gregor
d45b93bdd6
Implement the GNU semantics for forward declarations of enum types in
...
C and C++. Fixes PR3688.
llvm-svn: 66282
2009-03-06 18:34:03 +00:00
Daniel Dunbar
3a45e4fffb
Tidy file removal cleanup & remove race condition on file existence.
...
llvm-svn: 66281
2009-03-06 18:32:01 +00:00
Daniel Dunbar
94911a91d5
x86_64 ABI: Handle long double in union when upper eightbyte results
...
in a lone X87 class.
- PR3735.
llvm-svn: 66277
2009-03-06 17:50:25 +00:00
Sebastian Redl
4835010a29
Implement the machinery that can process TableGenerated warning options.
...
Manually write a table and some ad-hoc code to provide feature parity with the current code.
llvm-svn: 66276
2009-03-06 17:41:35 +00:00
Ted Kremenek
704bc52bd9
Use list instead of vector for storing strings.
...
llvm-svn: 66271
2009-03-06 16:36:40 +00:00
Daniel Dunbar
8e79b8491f
IRgen support for weak_import.
...
- <rdar://problem/6652110> clang should support weak_import
llvm-svn: 66270
2009-03-06 16:20:49 +00:00
Ted Kremenek
55f46f6aab
Fix regression: initialize 'size' for PathDiagnostic to 0.
...
Add some assertions along the way...
llvm-svn: 66265
2009-03-06 07:53:30 +00:00
Ted Kremenek
5b9e7b833b
Like PathDiagnosticPieces, strip trailing periods at the end of PathDiagnostic descriptions
...
llvm-svn: 66263
2009-03-06 07:08:50 +00:00
Chris Lattner
e46de75dca
capitalize for consistency, a crash in regalloc now looks like this:
...
Stack dump:
0. Program arguments: clang pr3399.c -S -O3
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Linear Scan Register Allocator' on function '@foo'
Abort
llvm-svn: 66261
2009-03-06 06:46:31 +00:00
Daniel Dunbar
5cb85ebe94
Add Parse/Sema support for weak_import attribute.
...
- Also, diagnose weak applied to types.
llvm-svn: 66259
2009-03-06 06:39:57 +00:00
Mike Stump
cfc045e36c
Testcase for last fix.
...
llvm-svn: 66258
2009-03-06 06:35:21 +00:00
Mike Stump
f89230d93b
Complete __Block_byref_id_object_copy cogegen for block literals.
...
llvm-svn: 66257
2009-03-06 06:12:24 +00:00
Chris Lattner
855d149ec5
To the user, this is just a compiler of course, duh.
...
llvm-svn: 66251
2009-03-06 05:38:25 +00:00
Chris Lattner
d735e6f166
clean up the OVERVIEW line in clang --help.
...
llvm-svn: 66250
2009-03-06 05:38:04 +00:00
Mike Stump
fbe25dd1e4
Finish off __Block_byref_id_object_dispose codegen for block literals.
...
llvm-svn: 66247
2009-03-06 04:53:30 +00:00
Chris Lattner
d4a96730c1
#import is not considered an extension for ObjC.
...
llvm-svn: 66246
2009-03-06 04:28:03 +00:00
Mike Stump
846bf9a797
Remove extra arg.
...
llvm-svn: 66243
2009-03-06 02:45:21 +00:00
Mike Stump
ee2a5ee5f7
More codegen support for the copy/dispose helpers for block literals.
...
llvm-svn: 66241
2009-03-06 02:29:21 +00:00
Mike Stump
0c74327715
Framework for codegen for copy/dispose helpers.
...
llvm-svn: 66231
2009-03-06 01:33:24 +00:00
Ted Kremenek
62d9de7cae
Update checker build.
...
llvm-svn: 66226
2009-03-06 00:53:59 +00:00
Daniel Dunbar
9676015e86
Cleanup EH a bit given changes to ObjCCatchStmt.
...
- No functionality change.
llvm-svn: 66218
2009-03-06 00:01:21 +00:00
Chris Lattner
d7f164d956
add source range for type of super cast, giving something like:
...
SemaObjC/call-super-2.m:78:29: error: cannot cast 'super' (it isn't an expression)
return [(Object <Func> *)super instance_func0];
~~~~~~~~~~~~~~~~~^
llvm-svn: 66215
2009-03-05 23:09:00 +00:00
Chris Lattner
97e277e55e
more minor simplifications.
...
llvm-svn: 66214
2009-03-05 23:03:49 +00:00
Chris Lattner
d26760aecb
refactor C++ bitfield checking a bit (haha)
...
llvm-svn: 66213
2009-03-05 23:01:03 +00:00
Daniel Dunbar
f804897ee9
Don't mangle names of local variables.
...
- For one thing, this adds unneeded overhead; for another, this
routine can be used to emit unnamed decls which we shouldn't try to
mangle.
llvm-svn: 66212
2009-03-05 22:59:19 +00:00
Ted Kremenek
3add5e51ff
Fix another GRExprEngine::VisitCast regression: handle casts of void* to function pointers.
...
llvm-svn: 66211
2009-03-05 22:47:06 +00:00
Chris Lattner
73bf7b42b6
fix PR3607 and a fixme, by checking bitfield constraints
...
more consistently.
llvm-svn: 66210
2009-03-05 22:45:59 +00:00
Fariborz Jahanian
c559f3f175
More function stop for objc2's ivar layout bit map.
...
llvm-svn: 66209
2009-03-05 22:39:55 +00:00
Ted Kremenek
5f968930d7
Minor tweak: Recognize 'CGCF' prefix in addition to 'CF' and 'CG'.
...
llvm-svn: 66208
2009-03-05 22:11:14 +00:00
Ted Kremenek
a06a68fa9b
Fix regression in GRExprEngine::VisitCast: Do not wrap symbolic function pointers with TypedViewRegions.
...
llvm-svn: 66187
2009-03-05 20:22:13 +00:00
Steve Naroff
e29c4dd022
Partial fix <rdar://problem/6301205> [irgen] dot-syntax on super isn't supported.
...
Tweak Sema::ActOnMemberReferenceExpr() and Sema::ActOnDeclarationNameExpr() to handle "super." notation for Class methods.
llvm-svn: 66185
2009-03-05 20:12:00 +00:00
Fariborz Jahanian
631c5818ab
Moved CollectObjCIvars to more commonly available place
...
for future use.
llvm-svn: 66184
2009-03-05 20:08:48 +00:00
Fariborz Jahanian
01dff426c8
Adds a template for a function for objc2's gc's ivar layout
...
bitmap.
llvm-svn: 66175
2009-03-05 19:17:31 +00:00
Ted Kremenek
a7ec605dbd
Update test case: objects stored to self.ivar are not tracked.
...
llvm-svn: 66168
2009-03-05 18:15:02 +00:00
Ted Kremenek
fa3d77bc2c
Retrofit some basic tracking of ivars (for the current object) into BasicStore.
...
llvm-svn: 66166
2009-03-05 18:08:28 +00:00
Ted Kremenek
89f4781703
Minor code compaction. No functionality change.
...
llvm-svn: 66165
2009-03-05 16:41:21 +00:00
Ted Kremenek
1fe63ac93d
Rename VarBindings -> Bindings.
...
llvm-svn: 66164
2009-03-05 16:32:59 +00:00
Ted Kremenek
2f340d6cb6
BasicStore:
...
- Store bindings using a MemRegion -> SVal binding instead of VarDecl -> SVal
binding. This mirrors some of the idea of RegionStore, but is far simpler and
not nearly as functional. This leads to some code simplification and
some potential for some minor precision hacks.
Along the way...
- constify the use of MemRegion* in a few places
- add operator<<(llvm::raw_ostream, const MemRegion*)
llvm-svn: 66163
2009-03-05 16:31:07 +00:00
Steve Naroff
8f4528bc7c
Tweak diag for <rdar://problem/5982579> [clang on xcode] (using arch=x86_64): synthesized property 'sdkPath' must either be named the same as a compatible ivar or must explicitly name an ivar.
...
llvm-svn: 66162
2009-03-05 15:45:01 +00:00
Steve Naroff
41d09add4f
Fix <rdar://problem/6144382> [sema] gcc inconsistency w.r.t. forward protocol declarations.
...
llvm-svn: 66161
2009-03-05 15:22:01 +00:00
Mike Stump
4446dcf061
prep work for copy/destroy helpers for block literals.
...
llvm-svn: 66159
2009-03-05 08:32:30 +00:00
Chris Lattner
ff9fbcaa8a
if we die in IR generation of a compound statement, include
...
it in the stack trace, giving us stuff like:
Stack dump:
0. Program arguments: clang t.c -emit-llvm
1. <eof> parser at end of file
2. t.c:1:5: LLVM IR generation of declaration 'a'
3. t.c:1:9: LLVM IR generation of compound statement ('{}')
4. t.c:2:3: LLVM IR generation of compound statement ('{}')
Abort
llvm-svn: 66154
2009-03-05 08:04:57 +00:00
Chris Lattner
eae6cb6154
rename PrettyStackTraceDecl -> PrettyStackTraceActionsDecl.
...
Introduce a new PrettyStackTraceDecl.
Use it to add the top level LLVM IR generation stuff in
Backend.cpp to stack traces. We now get crashes like:
Stack dump:
0. Program arguments: clang t.c -emit-llvm
1. <eof> parser at end of file
2. t.c:1:5: LLVM IR generation of declaration 'a'
Abort
for IR generation crashes.
llvm-svn: 66153
2009-03-05 08:00:35 +00:00
Ted Kremenek
1d09f6a221
Update checker build.
...
llvm-svn: 66152
2009-03-05 07:55:15 +00:00
Chris Lattner
6acdec9332
remove unneeded forward decl.
...
llvm-svn: 66151
2009-03-05 07:54:06 +00:00
Chris Lattner
f68012072c
if we crash while parsing a block literal, include it.
...
llvm-svn: 66150
2009-03-05 07:32:12 +00:00
Chris Lattner
f02db35b05
fix eof check
...
llvm-svn: 66149
2009-03-05 07:27:50 +00:00
Chris Lattner
bcfe4f7b7b
When the parser is live, print out the location and spelling of its current token.
...
For example:
Stack dump:
0. Program arguments: clang t.cpp
1. t.cpp:4:8: current parser token: ';'
2. t.cpp:3:1: parsing struct/union/class body 'x'
Abort
It is weird that the parser is always "underneath" any parse context
actions, but the parser is created first.
llvm-svn: 66148
2009-03-05 07:24:28 +00:00
Chris Lattner
a2a1f27bd5
finish comment.
...
llvm-svn: 66146
2009-03-05 07:16:05 +00:00
Daniel Dunbar
d02cb1dc2b
Driver: Basic argument parsing.
...
- Add Driver::ParseArgStrings.
- Store values directly in CommaJoinedArg to support simple access.
- Add FlagArg class.
llvm-svn: 66142
2009-03-05 06:38:47 +00:00
Ted Kremenek
2b24f306df
Test case: When using RegionStore with the retain/release checker, stop tracking objects assigned to self's ivar.
...
llvm-svn: 66139
2009-03-05 05:14:55 +00:00
Ted Kremenek
77a3cb2dfa
Add test case for RegionStore's tracking of the ivars of 'self'.
...
llvm-svn: 66136
2009-03-05 04:55:08 +00:00
Ted Kremenek
d3c82768e4
Add initial support for tracking ivars, with special handling for ivars of 'self'.
...
llvm-svn: 66133
2009-03-05 04:50:08 +00:00
Eli Friedman
cecc21d2f6
Make IRGen compatible with declaring a function with incomplete
...
return/argument types. (The generated IR isn't ideal, but we can't
really do better in general.)
llvm-svn: 66132
2009-03-05 04:18:07 +00:00
Ted Kremenek
9ce427b21f
Add 'cast<>' to remove an extra function call and dynamic cast.
...
llvm-svn: 66131
2009-03-05 03:44:53 +00:00
Ted Kremenek
d982bd83ba
More fixes in cast logic.
...
llvm-svn: 66130
2009-03-05 03:42:31 +00:00
Eli Friedman
22fcc24b30
Initial implementation of CodeGen for incomplete function types; fixes
...
PR3688. (The FIXME is a rather big performance issue, but it only
affects code using this feature, which is relatively rare.)
llvm-svn: 66128
2009-03-05 03:16:41 +00:00
Ted Kremenek
eba836a457
GRExprEngine: Polish up handling of casting integer constants to pointers and back.
...
llvm-svn: 66127
2009-03-05 02:42:32 +00:00
Mike Stump
cd1280b405
Avoid dispose calls when only doing gc.
...
llvm-svn: 66126
2009-03-05 02:34:38 +00:00
Ted Kremenek
6c29a91c05
Fix regression in transparent translation of nonloc::ConcreteInto to loc::ConcreteInt.
...
llvm-svn: 66125
2009-03-05 02:33:55 +00:00
Chris Lattner
477f990ac5
Include struct context info for parser/sema crashes. This
...
gives us:
Stack dump:
0. using-directive.cpp:26:16: in compound statement ('{}')
1. using-directive.cpp:26:16: parsing function body 'A::K1::foo'
2. using-directive.cpp:25:3: parsing struct/union/class body 'A::K1'
3. using-directive.cpp:5:1: parsing namespace 'A'
4. clang using-directive.cpp
Abort
for code like:
namespace A {
...
class K1 {
void foo() { <<crash>>
llvm-svn: 66124
2009-03-05 02:25:03 +00:00
Chris Lattner
e332b82320
Include namespace contexts in the virtual stack trace, so we get stuff
...
like this:
Stack dump:
0. using-directive.cpp:9:14: in compound statement ('{}')
1. using-directive.cpp:9:14: parsing function body 'A::B::f'
2. using-directive.cpp:7:3: parsing namespace 'A::B'
3. using-directive.cpp:5:1: parsing namespace 'A'
4. clang using-directive.cpp
Abort
for testcase like like:
namespace A {
short i;
namespace B {
long i;
void f() { <<crash>>
llvm-svn: 66123
2009-03-05 02:09:07 +00:00
Chris Lattner
e268b406ba
include objc method decl contexts in stack trace of crash, e.g.:
...
Stack dump:
0. message.m:53:13: in compound statement ('{}')
1. message.m:53:13: parsing Objective-C method 'xx'
2. clang message.m
llvm-svn: 66121
2009-03-05 02:03:49 +00:00
Devang Patel
eed256da90
Set isMain bit for MainFile.
...
llvm-svn: 66120
2009-03-05 01:55:07 +00:00
Chris Lattner
03b5394da7
When parsing a function body, add it to the crash stack, giving us something
...
like:
Stack dump:
0. t.c:5:10: in compound statement ('{}')
1. t.c:3:12: in compound statement ('{}')
2. t.c:3:12: parsing function body 'foo'
3. clang t.c
Abort
llvm-svn: 66118
2009-03-05 01:25:28 +00:00
Mike Stump
626aecc4be
Add codegen support for __block variables to call _Block_object_dispose as necessary.
...
llvm-svn: 66117
2009-03-05 01:23:13 +00:00
Chris Lattner
f5d8ba86cc
fix some 80 col violations.
...
llvm-svn: 66114
2009-03-05 00:56:34 +00:00
Chris Lattner
12f2ea5015
Simplify the interface to ParseFunctionStatementBody to not take
...
locations that are the current tok loc. Note that inline C++ methods
have a big fixme that could cause a crash.
llvm-svn: 66113
2009-03-05 00:49:17 +00:00
Eli Friedman
85dfd74439
Use LLVM type header rather than using stdint.h directly.
...
llvm-svn: 66111
2009-03-05 00:37:49 +00:00
Ted Kremenek
8d9af4cb48
Fix message title
...
llvm-svn: 66110
2009-03-05 00:12:45 +00:00
Chris Lattner
735012c466
update xcode proj
...
llvm-svn: 66109
2009-03-05 00:03:30 +00:00
Chris Lattner
bd61a95481
Include information about compound statements when crashing in sema or the
...
parser. For example, we now print out:
0. t.c:5:10: in compound statement {}
1. t.c:3:12: in compound statement {}
2. clang t.c -fsyntax-only
llvm-svn: 66108
2009-03-05 00:00:31 +00:00
Ted Kremenek
00dfe30409
For now, do not track NSWindow objects and it's subclasses.
...
llvm-svn: 66107
2009-03-04 23:30:42 +00:00
Daniel Dunbar
458b6982d4
Driver: Implement Option::accept methods.
...
llvm-svn: 66106
2009-03-04 23:22:02 +00:00
Daniel Dunbar
b7396f10b9
Driver: Fix off by one in ParseOneArg; this code is ugly but will be
...
replaced anyway.
llvm-svn: 66101
2009-03-04 23:03:35 +00:00
Daniel Dunbar
135837e046
Driver: Add Arg::dump and SeparateArg stubs.
...
llvm-svn: 66100
2009-03-04 23:02:50 +00:00
Fariborz Jahanian
5e55d41cd7
Removed an unfortunate cut and paste left-over.
...
llvm-svn: 66099
2009-03-04 23:00:40 +00:00
Ted Kremenek
33129a26f7
Add prototype support for invalidating fields for structures passed-by-reference
...
to unknown functions. Most of this logic should be eventually moved to
RegionStore and be made lazy.
llvm-svn: 66094
2009-03-04 22:56:43 +00:00
Ted Kremenek
9a92b95092
MemRegion:
...
- Have 'TypedRegion::getRValueType()' return a null QualType for 'id<...>'
instead of aborting.
- Change 'TypedRegion::isBoundable()' to return true for all objects with a
non-null RValueType (this may not be the final behavior).
llvm-svn: 66093
2009-03-04 22:55:18 +00:00
Ted Kremenek
6ee8f8bcb5
Add an optional "tag" to conjured symbols that allows us to distinguish between
...
multiple symbols conjured at the same location. All that is required of the tag
is that it is a fixed void* value that points to an memory address that remains
valid throughout the remainder of the lifetime of the SymbolManager.
llvm-svn: 66092
2009-03-04 22:53:46 +00:00
Mike Stump
2d33d6300c
Fixup __block codegen in nested block literals.
...
llvm-svn: 66091
2009-03-04 22:48:06 +00:00
Daniel Dunbar
d9621da5ae
Driver: Add OptTable::ParseOneArg.
...
llvm-svn: 66090
2009-03-04 22:41:37 +00:00
Daniel Dunbar
16b9fd447a
Driver: Add ArgList::{append, getArgString}
...
llvm-svn: 66089
2009-03-04 22:40:08 +00:00
Daniel Dunbar
9333fc656d
Driver: Stub out Arg implementations.
...
llvm-svn: 66088
2009-03-04 22:37:52 +00:00
Fariborz Jahanian
b8d091c4eb
Implemented access check for ivars accessed inside
...
c-style functions declared inside objc @implementations.
llvm-svn: 66087
2009-03-04 22:30:12 +00:00
Daniel Dunbar
a59194cd10
Driver: Option's need to know their ID.
...
- Also, add Input and Unknown opts to OptTable.
llvm-svn: 66079
2009-03-04 21:53:04 +00:00
Chris Lattner
07e85f3fc5
Start making use of "pretty stack dumps" to get
...
better crash info when clang crashes. Step #2 of many.
llvm-svn: 66078
2009-03-04 21:41:39 +00:00
Chris Lattner
20fc207f52
minor cleanups
...
llvm-svn: 66077
2009-03-04 21:40:56 +00:00
Daniel Dunbar
3588c96c39
Driver: Pull intrusive list out of Arg; this isn't going to suffice. I
...
will make this efficient later (if it even matters)...
llvm-svn: 66071
2009-03-04 21:17:31 +00:00
Daniel Dunbar
b17eec5909
Driver: Return reference for Arg::getOption().
...
llvm-svn: 66070
2009-03-04 21:14:57 +00:00
Daniel Dunbar
7c5a8d2fa0
Add a little utility for interposing between a command line program
...
and capturing its invocations.
llvm-svn: 66068
2009-03-04 21:06:52 +00:00
Daniel Dunbar
f49bc318ed
Driver: Add Option flags.
...
llvm-svn: 66067
2009-03-04 21:05:23 +00:00
Daniel Dunbar
53bbc31ebd
Driver: Tweak Option::accept interface.
...
llvm-svn: 66066
2009-03-04 20:53:00 +00:00
Sebastian Redl
b1c4d5507f
The basic representation of diagnostics information in tablegen format, plus (uncommented and incomplete) test conversions of the existing def files to this format.
...
llvm-svn: 66064
2009-03-04 20:49:43 +00:00
Daniel Dunbar
b2cd66bf4d
Driver: Sink Driver/Compilation into clang::driver namespace.
...
- Add OptTable instance to Driver.
llvm-svn: 66063
2009-03-04 20:49:20 +00:00
Sebastian Redl
ec2d479b8b
Fix typo in diagnostic.
...
llvm-svn: 66059
2009-03-04 19:58:58 +00:00
Daniel Dunbar
03f32e7638
ccc: Fix passing of -nozero-initialized-in-bss.
...
- PR3722.
llvm-svn: 66052
2009-03-04 19:17:10 +00:00
Mike Stump
8473a12bfe
Move more blocks CodeGenFunction code up and out.
...
llvm-svn: 66049
2009-03-04 19:03:44 +00:00
Mike Stump
06acea8a69
Move some of the CodeGenFunction blocks code up and out. No
...
functionality change.
llvm-svn: 66048
2009-03-04 18:57:26 +00:00
Mike Stump
6c39666a77
Move more of the blocks code up and out.
...
llvm-svn: 66046
2009-03-04 18:47:42 +00:00
Steve Naroff
d1b64be776
Partial fix for <rdar://problem/6645157> [clang on Xcode; regression]: error: instance variable 'someField' is private.
...
A recent regression caused by http://llvm.org/viewvc/llvm-project?rev=65912&view=rev .
This commit isn't fully baked. Nevertheless, it should cause Xcode to compile again. Will speak with Fariborz offline.
llvm-svn: 66045
2009-03-04 18:34:24 +00:00
Chris Lattner
2b19a65864
fixes suggested by Sebastian!
...
llvm-svn: 66044
2009-03-04 18:24:58 +00:00
Devang Patel
4b6e4bb25d
Refactor code.
...
llvm-svn: 66043
2009-03-04 18:21:39 +00:00
Mike Stump
95435674f9
Move more of blocks codegen out of CodeGenModule and into the
...
BlockModule. No functionality change. This should help people that
don't want to know anything about blocks not be confused by the
overloaded use of the term block or nor want to see all the blocks
goop.
llvm-svn: 66042
2009-03-04 18:17:45 +00:00
Fariborz Jahanian
4f4de6c27f
Some refactoring of recent code. No functionality change.
...
llvm-svn: 66041
2009-03-04 18:15:57 +00:00
Fariborz Jahanian
c2371eadd6
Fix a corner case of message lookup looking for class methods.
...
If all else failed, find the message in class's root's
list of instacne methods!
llvm-svn: 66040
2009-03-04 17:50:39 +00:00
Daniel Dunbar
5b9e9682f1
Support "asm" renaming of external symbols.
...
- PR3698.
llvm-svn: 66038
2009-03-04 17:31:19 +00:00
Daniel Dunbar
3e2cbc3161
Driver: Add ArgList implementation.
...
llvm-svn: 66037
2009-03-04 17:10:42 +00:00
Ted Kremenek
79fa6a24b7
GRExprEngine::VisitCast: Just pass through function and block pointers.
...
llvm-svn: 66036
2009-03-04 16:52:57 +00:00
Mike Stump
376e3c0347
Start the migration of more of the blocks code out of sight for most
...
people. De-duplicates BLOCK_NEEDS_FREE and friends.
llvm-svn: 66035
2009-03-04 15:35:22 +00:00
Mike Stump
edb252aeba
Start the migration of more of the blocks code out of sight for most
...
people. De-duplicates BLOCK_NEEDS_FREE and friends.
llvm-svn: 66034
2009-03-04 15:32:52 +00:00
Steve Naroff
3f49feeed5
Finish up some fixes related to <rdar://problem/6497631> Message lookup is sometimes different than gcc's.
...
- Disallow casting 'super'. GCC allows this, however it doesn't make sense (super isn't an expression and the cast won't alter lookup/dispatch).
- Tighten up lookup when messaging 'self'.
llvm-svn: 66033
2009-03-04 15:11:40 +00:00
Mike Stump
0874160bd5
Add __block codegen testcase. We introduce a temporary flag to enable
...
codegen, until such time as codegen is complete enough to turn on with
-fblocks.
llvm-svn: 66031
2009-03-04 13:17:22 +00:00
Daniel Dunbar
5637208a88
Driver: More Option implementation.
...
- Add Options.def file, collects option information.
- Actual option instantiation is handled lazily by OptTable to allow
the driver to not need to instantiate all options.
- cast<> support for Option, other minor tweaks.
llvm-svn: 66028
2009-03-04 08:33:23 +00:00
Eli Friedman
9ad7244f5b
Check that the return type for function definitions is complete.
...
llvm-svn: 66027
2009-03-04 07:30:59 +00:00
Chris Lattner
8322dc809e
make the token lexer allocate its temporary token buffers for
...
preexpanded macro arguments from the preprocessor's bump pointer.
This reduces # mallocs from 12444 to 11792.
llvm-svn: 66025
2009-03-04 06:50:57 +00:00
Chris Lattner
9631e1871e
Switch attributes to be allocated from the declcontext bump pointer just like
...
decls. This reduces the number of calls to malloc on cocoa.h with pth and
-disable-free from 15958 to 12444 times (down ~3500).
llvm-svn: 66023
2009-03-04 06:34:08 +00:00
Zhongxing Xu
7d41c616f1
Adjust indentation.
...
llvm-svn: 66022
2009-03-04 06:33:38 +00:00
Chris Lattner
9a2d50e7fd
add an a Attr::Destroy method and force clients to go through it. As part of
...
this, make DeclBase::Destroy destroy attributes instead of the DeclBase dtor.
llvm-svn: 66020
2009-03-04 06:05:19 +00:00
Eli Friedman
f22fa28522
Make this test a bit more specific about the target so that it passes on
...
Linux.
llvm-svn: 66019
2009-03-04 06:00:10 +00:00
Eli Friedman
e0a5b8b11f
Minor cleanup for choose expressions: add a helper that returns the
...
chosen sub-expression, rather than just evaluating the condition.
llvm-svn: 66018
2009-03-04 05:52:32 +00:00
Chris Lattner
1a84994c46
allocate MultiKeywordSelector's out of a bump pointer allocator instead of malloc.
...
This has two advantages 1) no more leaking them, 2) fewer calls to malloc.
This changes us from calling malloc 3685/1390/883/2974/1185 times respectively on
16/20/24/28/32 byte objects when parsing cocoa.h with pth and -disable-free to
calling it 2816/1020/702/2903/1168 times each respectively.
llvm-svn: 66017
2009-03-04 05:35:38 +00:00
Chris Lattner
7b26b29351
simplify Sema::AddInstanceMethodToGlobalPool, no functionality change.
...
llvm-svn: 66016
2009-03-04 05:16:45 +00:00
Chris Lattner
4192bce91b
add a special case for codegen that improves the case where we have
...
multiple sequential cases to a) not create tons of fall-through basic blocks
and b) not recurse deeply. This fixes codegen on 100K deep cases, and improves
codegen on moderate cases from this:
switch i32 %tmp, label %sw.epilog [
i32 1000, label %sw.bb
i32 1001, label %sw.bb1
i32 1002, label %sw.bb2
i32 1003, label %sw.bb3
i32 1004, label %sw.bb4
...
sw.bb: ; preds = %entry
br label %sw.bb1
sw.bb1: ; preds = %entry, %sw.bb
br label %sw.bb2
sw.bb2: ; preds = %entry, %sw.bb1
br label %sw.bb3
sw.bb3: ; preds = %entry, %sw.bb2
br label %sw.bb4
to:
switch i32 %tmp, label %sw.epilog [
i32 1000, label %sw.bb
i32 1001, label %sw.bb
i32 1002, label %sw.bb
i32 1003, label %sw.bb
i32 1004, label %sw.bb
sw.bb: ;; many preds
llvm-svn: 66015
2009-03-04 04:46:18 +00:00
Chris Lattner
9bbf1ba1e6
fix infinite recursion
...
llvm-svn: 66014
2009-03-04 04:30:02 +00:00
Chris Lattner
e46f6e7d9c
make CaseStmt::getSourceRange() iterative for deeply
...
nested cases instead of recursive.
llvm-svn: 66013
2009-03-04 04:26:45 +00:00
Eli Friedman
3efa41a478
Continuation of PR3687: fix more places to use the right type for
...
booleans.
llvm-svn: 66012
2009-03-04 04:25:14 +00:00
Chris Lattner
34a2209177
Change Parser::ParseCaseStatement to use an iterative approach to parsing
...
multiple sequential case statements instead of doing it with recursion. This
fixes a problem where we run out of stack space parsing 100K directly nested
cases.
There are a couple other problems that prevent this from being useful in
practice (right now the example only parses correctly with -disable-free and
doesn't work with -emit-llvm), but this is a start.
I'm not including a testcase because it is large and uninteresting for
regtesting.
Sebastian, I would appreciate it if you could scrutinize the smart pointer
gymnastics I do.
llvm-svn: 66011
2009-03-04 04:23:07 +00:00
Eli Friedman
a1493b3b4d
Comment fix: change a question to an answer.
...
llvm-svn: 66010
2009-03-04 04:22:58 +00:00
Eli Friedman
42d2a3add6
Attempt to fix PR3709: when converting from an integer to a pointer,
...
first extend the integer to the correct width.
llvm-svn: 66009
2009-03-04 04:02:35 +00:00
Mike Stump
97d01d50d9
Improved ABI compliance for __block variables. No testcases yet as we
...
still give an unsupported error for them due to the fact this is a
work in progress.
llvm-svn: 66007
2009-03-04 03:23:46 +00:00
Ted Kremenek
d275bf3c54
Added the notion of a "boundable region", which is a region that can have a direct binding in the StoreManager.
...
llvm-svn: 66005
2009-03-04 02:43:08 +00:00
Daniel Dunbar
14a41c5e98
Add some more FIXME's about bits we could pack better.
...
llvm-svn: 66003
2009-03-04 02:27:50 +00:00
Daniel Dunbar
47076e7155
Woot, save 8 bytes in Decl on 64-bit by reordering fields. This
...
reduces allocated Decl size by ~8% on Cocoa.h (~700k).
llvm-svn: 66002
2009-03-04 02:26:41 +00:00
Ted Kremenek
d69e29e8c4
This test now passes using RegionStore.
...
llvm-svn: 65988
2009-03-04 00:23:28 +00:00
Ted Kremenek
52170722ec
RegionStore: Handle implicit parameters.
...
llvm-svn: 65987
2009-03-04 00:23:05 +00:00
Ted Kremenek
74a2d0f8ca
Create "TypedViewRegions" that layer on top of SymbolicRegions when handling
...
pointer-to-pointer casts involving symbolic locations.
llvm-svn: 65984
2009-03-04 00:14:35 +00:00
Ted Kremenek
804fc236a7
Use GetSValAsScalarOrLoc instead of GetSVal to prevent unintended structure or array "loads".
...
llvm-svn: 65983
2009-03-04 00:13:50 +00:00
Ted Kremenek
19df925f6b
Add "GetSValAsScalarOrLoc" methods to GRState/GRStateRef that only perform a
...
retrieval from the store/environment for locations or scalar types.
llvm-svn: 65982
2009-03-04 00:13:10 +00:00
Ted Kremenek
67c710e2c8
RegionStore::RemoveDeadBindings needs to check all the symbols of the super region of a scanned region as well.
...
llvm-svn: 65981
2009-03-04 00:11:38 +00:00
Daniel Dunbar
817b7692fb
Add new performance numbers; no discussion yet. Obvious two
...
conclusions are our PCH generation is way faster than gcc, and the
Python based driver kills compile times.
llvm-svn: 65980
2009-03-04 00:04:28 +00:00
Steve Naroff
013813dd5d
Change a warning to an error...
...
llvm-svn: 65978
2009-03-03 23:13:51 +00:00
Fariborz Jahanian
9a8e759b4f
Implement an important missing warning when a selector
...
is searched for in the global pool. It already uncovered
a clang bug in message selection.
llvm-svn: 65974
2009-03-03 22:19:15 +00:00