Commit Graph

55572 Commits

Author SHA1 Message Date
Gabor Greif 1bf3f5a662 ignore build dirs
llvm-svn: 66176
2009-03-05 19:22:57 +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
Chris Lattner bbbbbf30bd move some code to gracefully handle the case when a handler crashes.
llvm-svn: 66171
2009-03-05 18:22:14 +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
Devang Patel 709d6ac46d GlobalOpt only process non constant local GVs while optimizing global vars.
If non constant local GV named A is used by a constant local GV named B (e.g. llvm.dbg.variable) and B is not used by anyone else then eliminate A as well as B.

In other words, debug info should not interfere in removal of unused GV.
--This life, and those below, will be ignored--

M    test/Transforms/GlobalOpt/2009-03-03-dbg.ll
M    lib/Transforms/IPO/GlobalOpt.cpp

llvm-svn: 66167
2009-03-05 18:12: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
Duncan Sands 96f52eb13f Add missing file.
llvm-svn: 66160
2009-03-05 09:19:13 +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
Owen Anderson 380b3838f6 (Hopefully) silence a warning.
llvm-svn: 66158
2009-03-05 08:23:20 +00:00
Nick Lewycky c540cc6591 Regenerate.
llvm-svn: 66157
2009-03-05 08:20:44 +00:00
Nick Lewycky 16aac9994b Autodetect the availability of -export-dynamic in the linker.
llvm-svn: 66156
2009-03-05 08:20:21 +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
Owen Anderson ad503987a8 Be more careful about choosing restore points when doing restore folding. This fixes some subtle miscompilations.
llvm-svn: 66147
2009-03-05 07:19:18 +00:00
Chris Lattner a2a1f27bd5 finish comment.
llvm-svn: 66146
2009-03-05 07:16:05 +00:00
Chris Lattner 8d0fe8cd90 Daniel wanted the stack printed upside down. Perhaps he
feels a kinship to machine stacks that grow down.  Now we get
stuff like this:

Stack dump:
0.	Program arguments: clang clang_crash_Iw2Osj.mi 
1.	/Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/xmmintrin.h:624:1: parsing function body '_mm_cvtpi16_ps'
2.	/Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/xmmintrin.h:624:1: in compound statement ('{}')
Abort

llvm-svn: 66145
2009-03-05 07:03:49 +00:00
Chris Lattner 2674eb4bd1 indicate what the program args line is.
llvm-svn: 66144
2009-03-05 06:51:42 +00:00
Chris Lattner 0c33d436b3 switch this message back to only being in -debug mode.
llvm-svn: 66143
2009-03-05 06:48:16 +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
Nate Begeman 359df7420f When allocating stubs, keep track of which Functions are referencing the stub.
This invalidates the stubs in the resolver map when they are no longer referenced,
and should the JIT memory manager ever pick up a deallocateStub interface, the
JIT could reclaim the memory for unused stubs as well.

llvm-svn: 66141
2009-03-05 06:34:37 +00:00
Evan Cheng b7922dee15 Do not split edges to EH landing pads. It will cause code size explosion.
llvm-svn: 66140
2009-03-05 06:31:26 +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
Evan Cheng f0bfc6a675 Fix how livein live intervals are handled. Previously it could end at MBB start. Sorry, no small test case possible.
llvm-svn: 66129
2009-03-05 03:34:26 +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
Dale Johannesen 78ab338024 Fix another case where debug info was affecting
codegen.  I convinced myself it was OK to skip all
pointer bitcasts here too.

llvm-svn: 66122
2009-03-05 02:06:48 +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
Zhou Sheng abe4192442 Ignore the debug info intrinsics when looking for dependency through basic block.
llvm-svn: 66119
2009-03-05 01:45:43 +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