]>
granicus.if.org Git - clang/log
Steve Naroff [Thu, 5 Mar 2009 15:45:01 +0000 (15:45 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66162
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Thu, 5 Mar 2009 15:22:01 +0000 (15:22 +0000)]
Fix <rdar://problem/
6144382 > [sema] gcc inconsistency w.r.t. forward protocol declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66161
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 5 Mar 2009 08:32:30 +0000 (08:32 +0000)]
prep work for copy/destroy helpers for block literals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66159
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 5 Mar 2009 08:04:57 +0000 (08:04 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66154
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 5 Mar 2009 08:00:35 +0000 (08:00 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66153
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 5 Mar 2009 07:55:15 +0000 (07:55 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66152
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 5 Mar 2009 07:54:06 +0000 (07:54 +0000)]
remove unneeded forward decl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66151
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 5 Mar 2009 07:32:12 +0000 (07:32 +0000)]
if we crash while parsing a block literal, include it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66150
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 5 Mar 2009 07:27:50 +0000 (07:27 +0000)]
fix eof check
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66149
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 5 Mar 2009 07:24:28 +0000 (07:24 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66148
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 5 Mar 2009 07:16:05 +0000 (07:16 +0000)]
finish comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66146
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 5 Mar 2009 06:38:47 +0000 (06:38 +0000)]
Driver: Basic argument parsing.
- Add Driver::ParseArgStrings.
- Store values directly in CommaJoinedArg to support simple access.
- Add FlagArg class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66142
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 5 Mar 2009 05:14:55 +0000 (05:14 +0000)]
Test case: When using RegionStore with the retain/release checker, stop tracking objects assigned to self's ivar.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66139
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 5 Mar 2009 04:55:08 +0000 (04:55 +0000)]
Add test case for RegionStore's tracking of the ivars of 'self'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66136
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 5 Mar 2009 04:50:08 +0000 (04:50 +0000)]
Add initial support for tracking ivars, with special handling for ivars of 'self'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66133
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 5 Mar 2009 04:18:07 +0000 (04:18 +0000)]
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.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66132
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 5 Mar 2009 03:44:53 +0000 (03:44 +0000)]
Add 'cast<>' to remove an extra function call and dynamic cast.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66131
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 5 Mar 2009 03:42:31 +0000 (03:42 +0000)]
More fixes in cast logic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66130
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 5 Mar 2009 03:16:41 +0000 (03:16 +0000)]
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.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66128
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 5 Mar 2009 02:42:32 +0000 (02:42 +0000)]
GRExprEngine: Polish up handling of casting integer constants to pointers and back.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66127
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 5 Mar 2009 02:34:38 +0000 (02:34 +0000)]
Avoid dispose calls when only doing gc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66126
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 5 Mar 2009 02:33:55 +0000 (02:33 +0000)]
Fix regression in transparent translation of nonloc::ConcreteInto to loc::ConcreteInt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66125
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 5 Mar 2009 02:25:03 +0000 (02:25 +0000)]
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>>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66124
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 5 Mar 2009 02:09:07 +0000 (02:09 +0000)]
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>>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66123
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 5 Mar 2009 02:03:49 +0000 (02:03 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66121
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 5 Mar 2009 01:55:07 +0000 (01:55 +0000)]
Set isMain bit for MainFile.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66120
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 5 Mar 2009 01:25:28 +0000 (01:25 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66118
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 5 Mar 2009 01:23:13 +0000 (01:23 +0000)]
Add codegen support for __block variables to call _Block_object_dispose as necessary.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66117
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 5 Mar 2009 00:56:34 +0000 (00:56 +0000)]
fix some 80 col violations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66114
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 5 Mar 2009 00:49:17 +0000 (00:49 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66113
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 5 Mar 2009 00:37:49 +0000 (00:37 +0000)]
Use LLVM type header rather than using stdint.h directly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66111
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 5 Mar 2009 00:12:45 +0000 (00:12 +0000)]
Fix message title
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66110
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 5 Mar 2009 00:03:30 +0000 (00:03 +0000)]
update xcode proj
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66109
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 5 Mar 2009 00:00:31 +0000 (00:00 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66108
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 4 Mar 2009 23:30:42 +0000 (23:30 +0000)]
For now, do not track NSWindow objects and it's subclasses.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66107
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Mar 2009 23:22:02 +0000 (23:22 +0000)]
Driver: Implement Option::accept methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66106
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Mar 2009 23:03:35 +0000 (23:03 +0000)]
Driver: Fix off by one in ParseOneArg; this code is ugly but will be
replaced anyway.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66101
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Mar 2009 23:02:50 +0000 (23:02 +0000)]
Driver: Add Arg::dump and SeparateArg stubs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66100
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 4 Mar 2009 23:00:40 +0000 (23:00 +0000)]
Removed an unfortunate cut and paste left-over.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66099
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 4 Mar 2009 22:56:43 +0000 (22:56 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66094
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 4 Mar 2009 22:55:18 +0000 (22:55 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66093
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 4 Mar 2009 22:53:46 +0000 (22:53 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66092
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 4 Mar 2009 22:48:06 +0000 (22:48 +0000)]
Fixup __block codegen in nested block literals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66091
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Mar 2009 22:41:37 +0000 (22:41 +0000)]
Driver: Add OptTable::ParseOneArg.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66090
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Mar 2009 22:40:08 +0000 (22:40 +0000)]
Driver: Add ArgList::{append, getArgString}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66089
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Mar 2009 22:37:52 +0000 (22:37 +0000)]
Driver: Stub out Arg implementations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66088
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 4 Mar 2009 22:30:12 +0000 (22:30 +0000)]
Implemented access check for ivars accessed inside
c-style functions declared inside objc @implementations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66087
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Mar 2009 21:53:04 +0000 (21:53 +0000)]
Driver: Option's need to know their ID.
- Also, add Input and Unknown opts to OptTable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66079
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Mar 2009 21:41:39 +0000 (21:41 +0000)]
Start making use of "pretty stack dumps" to get
better crash info when clang crashes. Step #2 of many.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66078
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Mar 2009 21:40:56 +0000 (21:40 +0000)]
minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66077
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Mar 2009 21:17:31 +0000 (21:17 +0000)]
Driver: Pull intrusive list out of Arg; this isn't going to suffice. I
will make this efficient later (if it even matters)...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66071
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Mar 2009 21:14:57 +0000 (21:14 +0000)]
Driver: Return reference for Arg::getOption().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66070
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Mar 2009 21:06:52 +0000 (21:06 +0000)]
Add a little utility for interposing between a command line program
and capturing its invocations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66068
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Mar 2009 21:05:23 +0000 (21:05 +0000)]
Driver: Add Option flags.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66067
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Mar 2009 20:53:00 +0000 (20:53 +0000)]
Driver: Tweak Option::accept interface.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66066
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Wed, 4 Mar 2009 20:49:43 +0000 (20:49 +0000)]
The basic representation of diagnostics information in tablegen format, plus (uncommented and incomplete) test conversions of the existing def files to this format.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66064
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Mar 2009 20:49:20 +0000 (20:49 +0000)]
Driver: Sink Driver/Compilation into clang::driver namespace.
- Add OptTable instance to Driver.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66063
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Wed, 4 Mar 2009 19:58:58 +0000 (19:58 +0000)]
Fix typo in diagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66059
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Mar 2009 19:17:10 +0000 (19:17 +0000)]
ccc: Fix passing of -nozero-initialized-in-bss.
- PR3722.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66052
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 4 Mar 2009 19:03:44 +0000 (19:03 +0000)]
Move more blocks CodeGenFunction code up and out.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66049
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 4 Mar 2009 18:57:26 +0000 (18:57 +0000)]
Move some of the CodeGenFunction blocks code up and out. No
functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66048
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 4 Mar 2009 18:47:42 +0000 (18:47 +0000)]
Move more of the blocks code up and out.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66046
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 4 Mar 2009 18:34:24 +0000 (18:34 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66045
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Mar 2009 18:24:58 +0000 (18:24 +0000)]
fixes suggested by Sebastian!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66044
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 4 Mar 2009 18:21:39 +0000 (18:21 +0000)]
Refactor code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66043
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 4 Mar 2009 18:17:45 +0000 (18:17 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66042
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 4 Mar 2009 18:15:57 +0000 (18:15 +0000)]
Some refactoring of recent code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66041
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 4 Mar 2009 17:50:39 +0000 (17:50 +0000)]
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!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66040
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Mar 2009 17:31:19 +0000 (17:31 +0000)]
Support "asm" renaming of external symbols.
- PR3698.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66038
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Mar 2009 17:10:42 +0000 (17:10 +0000)]
Driver: Add ArgList implementation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66037
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 4 Mar 2009 16:52:57 +0000 (16:52 +0000)]
GRExprEngine::VisitCast: Just pass through function and block pointers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66036
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 4 Mar 2009 15:35:22 +0000 (15:35 +0000)]
Start the migration of more of the blocks code out of sight for most
people. De-duplicates BLOCK_NEEDS_FREE and friends.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66035
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 4 Mar 2009 15:32:52 +0000 (15:32 +0000)]
Start the migration of more of the blocks code out of sight for most
people. De-duplicates BLOCK_NEEDS_FREE and friends.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66034
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 4 Mar 2009 15:11:40 +0000 (15:11 +0000)]
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'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66033
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 4 Mar 2009 13:17:22 +0000 (13:17 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66031
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Mar 2009 08:33:23 +0000 (08:33 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66028
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 4 Mar 2009 07:30:59 +0000 (07:30 +0000)]
Check that the return type for function definitions is complete.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66027
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Mar 2009 06:50:57 +0000 (06:50 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66025
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Mar 2009 06:34:08 +0000 (06:34 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66023
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 4 Mar 2009 06:33:38 +0000 (06:33 +0000)]
Adjust indentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66022
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Mar 2009 06:05:19 +0000 (06:05 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66020
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 4 Mar 2009 06:00:10 +0000 (06:00 +0000)]
Make this test a bit more specific about the target so that it passes on
Linux.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66019
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 4 Mar 2009 05:52:32 +0000 (05:52 +0000)]
Minor cleanup for choose expressions: add a helper that returns the
chosen sub-expression, rather than just evaluating the condition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66018
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Mar 2009 05:35:38 +0000 (05:35 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66017
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Mar 2009 05:16:45 +0000 (05:16 +0000)]
simplify Sema::AddInstanceMethodToGlobalPool, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66016
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Mar 2009 04:46:18 +0000 (04:46 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66015
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Mar 2009 04:30:02 +0000 (04:30 +0000)]
fix infinite recursion
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66014
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Mar 2009 04:26:45 +0000 (04:26 +0000)]
make CaseStmt::getSourceRange() iterative for deeply
nested cases instead of recursive.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66013
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 4 Mar 2009 04:25:14 +0000 (04:25 +0000)]
Continuation of PR3687: fix more places to use the right type for
booleans.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66012
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Mar 2009 04:23:07 +0000 (04:23 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66011
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 4 Mar 2009 04:22:58 +0000 (04:22 +0000)]
Comment fix: change a question to an answer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66010
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 4 Mar 2009 04:02:35 +0000 (04:02 +0000)]
Attempt to fix PR3709: when converting from an integer to a pointer,
first extend the integer to the correct width.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66009
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 4 Mar 2009 03:23:46 +0000 (03:23 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66007
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 4 Mar 2009 02:43:08 +0000 (02:43 +0000)]
Added the notion of a "boundable region", which is a region that can have a direct binding in the StoreManager.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66005
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Mar 2009 02:27:50 +0000 (02:27 +0000)]
Add some more FIXME's about bits we could pack better.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66003
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Mar 2009 02:26:41 +0000 (02:26 +0000)]
Woot, save 8 bytes in Decl on 64-bit by reordering fields. This
reduces allocated Decl size by ~8% on Cocoa.h (~700k).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66002
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 4 Mar 2009 00:23:28 +0000 (00:23 +0000)]
This test now passes using RegionStore.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65988
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 4 Mar 2009 00:23:05 +0000 (00:23 +0000)]
RegionStore: Handle implicit parameters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65987
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 4 Mar 2009 00:14:35 +0000 (00:14 +0000)]
Create "TypedViewRegions" that layer on top of SymbolicRegions when handling
pointer-to-pointer casts involving symbolic locations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65984
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 4 Mar 2009 00:13:50 +0000 (00:13 +0000)]
Use GetSValAsScalarOrLoc instead of GetSVal to prevent unintended structure or array "loads".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65983
91177308 -0d34-0410-b5e6-
96231b3b80d8