]>
granicus.if.org Git - clang/log
Daniel Dunbar [Wed, 4 Feb 2009 08:01:01 +0000 (08:01 +0000)]
ccc: -ObjC and -ObjC++ change default language, but only for "source
files".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63727
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Feb 2009 07:22:24 +0000 (07:22 +0000)]
Handle demotion of coerced arguments (as in void a(x) short x; { ... }).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63726
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Feb 2009 06:25:26 +0000 (06:25 +0000)]
Implement handling of file entry/exit notifications from GNU
line markers, including maintenance of the virtual include stack.
For something like this:
# 42 "bar.c" 1
# 142 "bar2.c" 1
#warning zappa
# 92 "bar.c" 2
#warning gonzo
# 102 "foo.c" 2
#warning bonkta
we now produce these three warnings:
#1:
In file included from foo.c:3:
In file included from bar.c:42:
bar2.c:143:2: warning: #warning zappa
#warning zappa
^
#2:
In file included from foo.c:3:
bar.c:92:2: warning: #warning gonzo
#warning gonzo
^
#3:
foo.c:102:2: warning: #warning bonkta
#warning bonkta
^
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63722
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Feb 2009 05:36:14 +0000 (05:36 +0000)]
# 42 doesn't change system header state either, add test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63721
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Feb 2009 05:33:01 +0000 (05:33 +0000)]
make getFileCharacteristic linetable aware. line markers that
play around with the 'is system header' bit now function correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63720
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Feb 2009 05:21:58 +0000 (05:21 +0000)]
propagate linemarker flags down into the the line table, currently
ignoring include stack push/pop info though.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63719
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Feb 2009 04:46:59 +0000 (04:46 +0000)]
replace gimpy linear search with svelte binary search ;-)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63717
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 4 Feb 2009 02:30:11 +0000 (02:30 +0000)]
Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63715
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Feb 2009 02:29:52 +0000 (02:29 +0000)]
make my atrocious linear search at least search in the order that is
more likely to hit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63714
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Feb 2009 02:17:09 +0000 (02:17 +0000)]
Add simple #line directive test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63713
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Feb 2009 02:15:40 +0000 (02:15 +0000)]
add comment
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63712
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Feb 2009 02:15:34 +0000 (02:15 +0000)]
spelling change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63711
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Feb 2009 02:00:59 +0000 (02:00 +0000)]
add the difference in the line marker phys line number and the
query point to the returned presumed location. We now produce:
foo.h:92:2: warning: #warning blarg!
#warning blarg!
^
foo.h:93:2: warning: #warning blarg!
#warning blarg!
^
foo.h:94:2: warning: #warning blarg!
#warning blarg!
^
for:
#line 92 "foo.h"
#warning blarg!
#warning blarg!
#warning blarg!
blarg indeed!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63710
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Feb 2009 01:55:42 +0000 (01:55 +0000)]
add really really trivial #line support, where #line now makes every
location below it report as coming from the #line location. For example,
with:
#line 92 "foo.h"
#warning blarg!
#warning blarg!
we now emit:
foo.h:92:2: warning: #warning blarg!
#warning blarg!
^
foo.h:92:2: warning: #warning blarg!
#warning blarg!
^
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63709
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Feb 2009 01:54:28 +0000 (01:54 +0000)]
simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63708
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Feb 2009 01:06:56 +0000 (01:06 +0000)]
lower the interface to getLineNumber like we did for
getColumnNumber. This fixes a FIXME in
SourceManager::getPresumedLoc because we now just decompose
the sloc once.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63701
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Feb 2009 00:58:28 +0000 (00:58 +0000)]
Force triple for this test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63699
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Feb 2009 00:55:58 +0000 (00:55 +0000)]
make SM::getColumnNumber take a predecomposed FileID/offset, which
makes it clear to clients that they have to pick an instantiation
or spelling location before calling it and allows optimization based
on that.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63698
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Feb 2009 00:55:44 +0000 (00:55 +0000)]
Update passing of _Bool values to match what function was declared to take.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63697
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Feb 2009 00:44:42 +0000 (00:44 +0000)]
Change construction of common ObjC functions to use CGCall
infrastructure to construct function type.
- For consistencty, we should probably always use this to construct
function types, but these are absolutely necessary to ensure that
we can emit calls to these functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63695
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 4 Feb 2009 00:40:31 +0000 (00:40 +0000)]
build per-fid linetable entries.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63694
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 4 Feb 2009 00:32:51 +0000 (00:32 +0000)]
Initial implementation of argument dependent lookup (a.k.a. ADL,
a.k.a. Koenig lookup) in C++. Most of the pieces are in place, but for
two:
- In an unqualified call g(x), even if the name does not refer to
anything in the current scope, we can still find functions named
"g" based on ADL. We don't yet have this ability.
- ADL will need updating for friend functions and templates.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63692
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 4 Feb 2009 00:22:57 +0000 (00:22 +0000)]
Some function stub added for new abi messaging.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63691
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 4 Feb 2009 00:03:15 +0000 (00:03 +0000)]
Use -fnext-runtime for this test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63688
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 3 Feb 2009 23:59:32 +0000 (23:59 +0000)]
-x language fix.
Patch by David Chisnall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63686
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 3 Feb 2009 23:55:40 +0000 (23:55 +0000)]
Use CGCall infrastructure to call enumeration mutation function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63685
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 3 Feb 2009 23:49:23 +0000 (23:49 +0000)]
Several new declarations for objc2 nonfragile
abi messaging.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63684
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 3 Feb 2009 23:43:59 +0000 (23:43 +0000)]
Fix return type for calls to objc_setProperty.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63683
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 3 Feb 2009 23:04:57 +0000 (23:04 +0000)]
Use ConvertTypeForMem when creating alloca for scalar argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63681
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 3 Feb 2009 23:04:31 +0000 (23:04 +0000)]
Force -triple/-fnext-runtime for a few more test cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63679
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 3 Feb 2009 23:03:55 +0000 (23:03 +0000)]
Add CodeGenFunction::ConvertTypeForMem forwarding function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63678
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 3 Feb 2009 22:13:05 +0000 (22:13 +0000)]
more plumbing for #line propagation. Use happy bit #3
out of FileInfo :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63672
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 3 Feb 2009 21:54:49 +0000 (21:54 +0000)]
Force triple for codegen tests which have expectations on output
types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63669
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 3 Feb 2009 21:54:08 +0000 (21:54 +0000)]
codegen is much farther along than when this was first written.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63668
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 3 Feb 2009 21:52:55 +0000 (21:52 +0000)]
stub out basic #line handling calls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63667
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 3 Feb 2009 21:52:35 +0000 (21:52 +0000)]
GNUStep fast enumeration.
Patch by David Chisnall.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63666
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 3 Feb 2009 21:51:37 +0000 (21:51 +0000)]
update a couple entries, add a new idea
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63665
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 3 Feb 2009 21:29:32 +0000 (21:29 +0000)]
silence some warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63662
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 3 Feb 2009 21:25:26 +0000 (21:25 +0000)]
Use /usr/bin/env to run Python for increased portability. Patch by
David Chisnall.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63661
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 3 Feb 2009 20:39:18 +0000 (20:39 +0000)]
Fix <rdar://problem/
6521757 > clang ObjC rewriter: Mixed Mac and Windows line endings after rewrite.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63657
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Tue, 3 Feb 2009 20:19:35 +0000 (20:19 +0000)]
Allow taking the address of data members, resulting in a member pointer.
Pointers to functions don't work yet, and pointers to overloaded functions even less. Also, far too much illegal code is accepted.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63655
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 3 Feb 2009 20:00:13 +0000 (20:00 +0000)]
x86_64 ABI: Initial implementation of ABI compliant parameter passing.
- Now only 27/500 failures on ABITest single argument tests; from
350/500. :)
- As with return types, a large percentage of these are likely to be
gcc bugs, not yet reviewed.
Also, fix bug in handling of Ignore ABI type in argument lists.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63654
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 3 Feb 2009 19:26:44 +0000 (19:26 +0000)]
Remove a fixed FIXME
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63648
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 3 Feb 2009 19:26:08 +0000 (19:26 +0000)]
When looking for a tag name via unqualified name lookup, only look in
scopes where the name would be considered a redeclaration if we know
that we're declaring or defining that tag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63647
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 3 Feb 2009 19:21:40 +0000 (19:21 +0000)]
Semantic analysis, ASTs, and unqualified name lookup support for C++
using directives, from Piotr Rak!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63646
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 3 Feb 2009 19:12:28 +0000 (19:12 +0000)]
ABI handling: Implement coercion for argument types (in addition to
return types).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63645
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 3 Feb 2009 19:03:09 +0000 (19:03 +0000)]
ir-gen for nonfragile ivar bitfield access (objc2 nonfragile abi).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63644
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Tue, 3 Feb 2009 18:07:49 +0000 (18:07 +0000)]
Targets that don't have stack use global address space for parameters.
Specify external linkage for such globals so that llvm optimizer do
not assume there values initialized as zero.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63636
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 3 Feb 2009 17:34:34 +0000 (17:34 +0000)]
Minor objc2 bug fix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63635
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Tue, 3 Feb 2009 17:23:12 +0000 (17:23 +0000)]
Fixed the typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63634
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 3 Feb 2009 07:41:46 +0000 (07:41 +0000)]
reclaim my precious bit in FileInfo by ensuring that ContentCache objects
are 8-byte aligned.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63630
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 3 Feb 2009 07:30:45 +0000 (07:30 +0000)]
switch SourceManager from using an std::map and std::list of
ContentCache objects to using a densemap and list, and allocating
the ContentCache objects from a bump pointer. This does not speed
up or slow down things substantially, but gives us control over
their alignment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63628
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 3 Feb 2009 07:28:12 +0000 (07:28 +0000)]
true is pass, false is success.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63627
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 3 Feb 2009 07:25:43 +0000 (07:25 +0000)]
disable this test too
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63626
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 3 Feb 2009 07:24:53 +0000 (07:24 +0000)]
make this fail faster.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63625
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 3 Feb 2009 07:20:54 +0000 (07:20 +0000)]
add #include to make more self-contained.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63624
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 3 Feb 2009 06:51:18 +0000 (06:51 +0000)]
Change ABIInfo to compute information for a full signature at a time
(the main point of this restructing).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63619
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 3 Feb 2009 06:30:17 +0000 (06:30 +0000)]
Remove ABIArgInfo::Default kind, ABI is now responsible for specifying
acceptable kind with more precise semantics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63617
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 3 Feb 2009 06:17:37 +0000 (06:17 +0000)]
Add ABIArgInfo::Direct kind, which passes arguments using whatever the
native IRgen type is. This is like Default, but without any extra
semantics (like automatic tweaking of structures or void).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63615
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 3 Feb 2009 06:05:34 +0000 (06:05 +0000)]
remove some overly-crazy ideas.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63614
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 3 Feb 2009 06:02:10 +0000 (06:02 +0000)]
Add two FIXMEs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63613
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 3 Feb 2009 05:59:18 +0000 (05:59 +0000)]
Always use CGFunctionInfo to access ABI information.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63612
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 3 Feb 2009 05:31:23 +0000 (05:31 +0000)]
Move ABIArgInfo into CGFunctionInfo, computed on creation.
- Still have to convert some consumers over.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63610
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 3 Feb 2009 01:28:04 +0000 (01:28 +0000)]
Content Cache only needs to be 4-byte aligned. Since it is stored in
an std::set, we can't make a strong guarantee about what its alignment
will be. Since I don't need the 3rd bit anyway yet, just change the
assertion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63588
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 3 Feb 2009 01:05:53 +0000 (01:05 +0000)]
Move ABIInfo/ABIArgInfo classes into ABIInfo.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63586
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 3 Feb 2009 00:34:39 +0000 (00:34 +0000)]
Simplify the way in which we inject the names of tag definitions and
elaborated-type-specifier declarations into outer scopes while
retaining their proper lexical scope. This way is simpler and more
consistent with the way DeclContexts work, and also fixes
http://llvm.org/bugs/show_bug.cgi?id=3430
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63581
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 3 Feb 2009 00:09:52 +0000 (00:09 +0000)]
objc2's ir-gen for nonfragile ivar access.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63578
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 3 Feb 2009 00:07:12 +0000 (00:07 +0000)]
Memoize CGFunctionInfo construction.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63576
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Mon, 2 Feb 2009 23:46:21 +0000 (23:46 +0000)]
Formatting fix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63573
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 2 Feb 2009 23:43:58 +0000 (23:43 +0000)]
Change CGFunctionInfo args iterator to not include the return type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63571
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 2 Feb 2009 23:39:07 +0000 (23:39 +0000)]
Add a macro-based enumeration of all of the Decl nodes (like we do
with Stmt/Expr nodes), and convert some of the more mundane
switch-on-all-decl-kinds uses over to use this new file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63570
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 2 Feb 2009 23:23:47 +0000 (23:23 +0000)]
Thread CGFunctionInfo construction through CodeGenTypes.
- Inefficient & leaks memory currently, will be cleaned up subsequently.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63567
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Mon, 2 Feb 2009 22:57:57 +0000 (22:57 +0000)]
Use the updated CommandLine api for -fno-blocks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63563
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 2 Feb 2009 22:57:15 +0000 (22:57 +0000)]
emit diagnostic when casting a ptr to a small int when doing static initialization (addresses Eli's comments I believe)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63562
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 2 Feb 2009 22:32:08 +0000 (22:32 +0000)]
fix TryToFixInvalidVariablyModifiedType to reject negative array sizes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63557
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 2 Feb 2009 22:11:10 +0000 (22:11 +0000)]
Steve set me straight on this one. GCC was right, EDG was wrong: the
direct-initialization following a user-defined conversion can select
any constructor; it just can't employ any user-defined
conversions. So we ban those conversions and classify the constructor
call based on the relationship between the "from" and "to" types in
the conversion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63554
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 2 Feb 2009 22:03:45 +0000 (22:03 +0000)]
More ABI API cleanup.
- Lift CGFunctionInfo creation above ReturnTypeUsesSret and
EmitFunction{Epi,Pro}log.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63553
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 2 Feb 2009 21:45:32 +0000 (21:45 +0000)]
Clean up indentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63551
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 2 Feb 2009 21:43:58 +0000 (21:43 +0000)]
ABI handling API changes.
- Lift CGFunctionInfo creation up to callers of EmitCall.
- Move isVariadic bit out of CGFunctionInfo, take as argument to
GetFunctionType instead.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63550
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 2 Feb 2009 21:35:47 +0000 (21:35 +0000)]
Add iterators to LookupResult, allowing one to iterate over the
non-ambiguous name lookup results without allocating any memory, e.g.,
for sets of overloaded functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63549
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 2 Feb 2009 20:52:40 +0000 (20:52 +0000)]
AnalysisConsumer:
- Pass "Actions" vector by reference.
- Remove guard against checking macro-generated code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63546
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 2 Feb 2009 20:02:29 +0000 (20:02 +0000)]
Refactored code gen for ivar access in preparation for
objc2 nonfragile ivar access code gen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63541
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 2 Feb 2009 19:06:38 +0000 (19:06 +0000)]
Shuffle some functions around, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63538
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 2 Feb 2009 18:25:48 +0000 (18:25 +0000)]
Split specific_decl_iterator, which had a run-time field for
determining what decls are acceptable, into specific_decl_iterator
(in which all decls matching the SpecificDecl type requirements are
acceptable) and filtered_decl_iterator (which also does a run-time
check via a member pointer non-type template parameter). This saves
some space in the iterators.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63535
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 2 Feb 2009 18:24:29 +0000 (18:24 +0000)]
Change the ObjC type encoding for block pointer types to "@?" (for consistency with GCC).
This fixes <rdar://problem/
6538564 > clang ObjC rewriter: Wrong encoding emitted for methods with Block parameters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63534
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 2 Feb 2009 18:06:39 +0000 (18:06 +0000)]
Add FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63531
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 2 Feb 2009 17:56:05 +0000 (17:56 +0000)]
Slim down the specific_decl_iterator, since NULL denotes the end of the range. Good eyes, Chris
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63528
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 2 Feb 2009 17:43:21 +0000 (17:43 +0000)]
Check value-initializations that occur when an initializer list
provides too few elements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63525
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 2 Feb 2009 17:19:26 +0000 (17:19 +0000)]
RewriteObjC::RewriteBlockDeclRefExpr(): Add parens to enforce precedence. This fixes <rdar://problem/
6529468 > clang ObjC rewriter: Need parenthesis around dereferences in rewritten Blocks.
Also changed RewriteObjC::SynthesizeBlockFunc() to declare a pointer to the block argument even when there are no user-supplied arguments to the block.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63522
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 2 Feb 2009 16:07:41 +0000 (16:07 +0000)]
allow cast from array to int to be considered as constant
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63519
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 2 Feb 2009 15:33:56 +0000 (15:33 +0000)]
avoid creating tmp files elsewhere
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63518
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 2 Feb 2009 15:00:55 +0000 (15:00 +0000)]
fix PR3459: improve compatibility with gcc when checking for constant exprs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63517
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 1 Feb 2009 08:12:19 +0000 (08:12 +0000)]
Fix for PR3447: use padded sizes for computations on struct/union
constants.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63491
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 31 Jan 2009 19:07:49 +0000 (19:07 +0000)]
Forgot to add this test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63484
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 31 Jan 2009 03:05:44 +0000 (03:05 +0000)]
Remove unused overload of GetFunctionType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63472
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 31 Jan 2009 02:54:56 +0000 (02:54 +0000)]
Initialize CGFunctionInfo isVariadic bit correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63471
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sat, 31 Jan 2009 02:43:27 +0000 (02:43 +0000)]
Use target alignment API to set objc2's meta-data
alignment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63470
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 31 Jan 2009 02:20:43 +0000 (02:20 +0000)]
Err, unbreak my previous "no functionality change commit", will fix properly later.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63467
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 31 Jan 2009 02:19:00 +0000 (02:19 +0000)]
Kill off CGCallInfo, always use CGFunctionInfo for encapsulating
function/call info.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63466
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 31 Jan 2009 01:32:23 +0000 (01:32 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63464
91177308 -0d34-0410-b5e6-
96231b3b80d8