]> granicus.if.org Git - clang/log
clang
16 years agoccc: -ObjC and -ObjC++ change default language, but only for "source
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

16 years agoHandle demotion of coerced arguments (as in void a(x) short x; { ... }).
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

16 years agoImplement handling of file entry/exit notifications from GNU
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

16 years ago# 42 doesn't change system header state either, add test.
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

16 years agomake getFileCharacteristic linetable aware. line markers that
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

16 years agopropagate linemarker flags down into the the line table, currently
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

16 years agoreplace gimpy linear search with svelte binary search ;-)
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

16 years agoRemove dead code.
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

16 years agomake my atrocious linear search at least search in the order that is
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

16 years agoAdd simple #line directive test.
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

16 years agoadd comment
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

16 years agospelling change.
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

16 years agoadd the difference in the line marker phys line number and the
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

16 years agoadd really really trivial #line support, where #line now makes every
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

16 years agosimplify.
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

16 years agolower the interface to getLineNumber like we did for
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

16 years agoForce triple for this test case.
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

16 years agomake SM::getColumnNumber take a predecomposed FileID/offset, which
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

16 years agoUpdate passing of _Bool values to match what function was declared to take.
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

16 years agoChange construction of common ObjC functions to use CGCall
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

16 years agobuild per-fid linetable entries.
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

16 years agoInitial implementation of argument dependent lookup (a.k.a. ADL,
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

16 years agoSome function stub added for new abi messaging.
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

16 years agoUse -fnext-runtime for this test.
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

16 years ago-x language fix.
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

16 years agoUse CGCall infrastructure to call enumeration mutation function.
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

16 years agoSeveral new declarations for objc2 nonfragile
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

16 years agoFix return type for calls to objc_setProperty.
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

16 years agoUse ConvertTypeForMem when creating alloca for scalar argument.
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

16 years agoForce -triple/-fnext-runtime for a few more test cases.
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

16 years agoAdd CodeGenFunction::ConvertTypeForMem forwarding function.
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

16 years agomore plumbing for #line propagation. Use happy bit #3
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

16 years agoForce triple for codegen tests which have expectations on output
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

16 years agocodegen is much farther along than when this was first written.
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

16 years agostub out basic #line handling calls.
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

16 years agoGNUStep fast enumeration.
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

16 years agoupdate a couple entries, add a new idea
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

16 years agosilence some warnings.
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

16 years agoUse /usr/bin/env to run Python for increased portability. Patch by
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

16 years agoFix <rdar://problem/6521757> clang ObjC rewriter: Mixed Mac and Windows line endings...
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

16 years agoAllow taking the address of data members, resulting in a member pointer.
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

16 years agox86_64 ABI: Initial implementation of ABI compliant parameter passing.
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

16 years agoRemove a fixed FIXME
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

16 years agoWhen looking for a tag name via unqualified name lookup, only look in
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

16 years agoSemantic analysis, ASTs, and unqualified name lookup support for C++
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

16 years agoABI handling: Implement coercion for argument types (in addition to
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

16 years agoir-gen for nonfragile ivar bitfield access (objc2 nonfragile abi).
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

16 years agoTargets that don't have stack use global address space for parameters.
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

16 years agoMinor objc2 bug fix.
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

16 years agoFixed the typo in comment.
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

16 years agoreclaim my precious bit in FileInfo by ensuring that ContentCache objects
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

16 years agoswitch SourceManager from using an std::map and std::list of
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

16 years agotrue is pass, false is success.
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

16 years agodisable this test too
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

16 years agomake this fail faster.
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

16 years agoadd #include to make more self-contained.
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

16 years agoChange ABIInfo to compute information for a full signature at a time
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

16 years agoRemove ABIArgInfo::Default kind, ABI is now responsible for specifying
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

16 years agoAdd ABIArgInfo::Direct kind, which passes arguments using whatever the
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

16 years agoremove some overly-crazy ideas.
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

16 years agoAdd two FIXMEs.
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

16 years agoAlways use CGFunctionInfo to access ABI information.
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

16 years agoMove ABIArgInfo into CGFunctionInfo, computed on creation.
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

16 years agoContent Cache only needs to be 4-byte aligned. Since it is stored in
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

16 years agoMove ABIInfo/ABIArgInfo classes into ABIInfo.h
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

16 years agoSimplify the way in which we inject the names of tag definitions and
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

16 years agoobjc2's ir-gen for nonfragile ivar access.
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

16 years agoMemoize CGFunctionInfo construction.
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

16 years agoFormatting fix.
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

16 years agoChange CGFunctionInfo args iterator to not include the return type.
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

16 years agoAdd a macro-based enumeration of all of the Decl nodes (like we do
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

16 years agoThread CGFunctionInfo construction through CodeGenTypes.
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

16 years agoUse the updated CommandLine api for -fno-blocks.
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

16 years agoemit diagnostic when casting a ptr to a small int when doing static initialization...
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

16 years agofix TryToFixInvalidVariablyModifiedType to reject negative array sizes
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

16 years agoSteve set me straight on this one. GCC was right, EDG was wrong: the
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

16 years agoMore ABI API cleanup.
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

16 years agoClean up indentation.
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

16 years agoABI handling API changes.
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

16 years agoAdd iterators to LookupResult, allowing one to iterate over the
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

16 years agoAnalysisConsumer:
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

16 years agoRefactored code gen for ivar access in preparation for
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

16 years agoShuffle some functions around, no functionality change.
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

16 years agoSplit specific_decl_iterator, which had a run-time field for
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

16 years agoChange the ObjC type encoding for block pointer types to "@?" (for consistency with...
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

16 years agoAdd FIXME.
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

16 years agoSlim down the specific_decl_iterator, since NULL denotes the end of the range. Good...
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

16 years agoCheck value-initializations that occur when an initializer list
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

16 years agoRewriteObjC::RewriteBlockDeclRefExpr(): Add parens to enforce precedence. This fixes...
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

16 years agoallow cast from array to int to be considered as constant
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

16 years agoavoid creating tmp files elsewhere
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

16 years agofix PR3459: improve compatibility with gcc when checking for constant exprs
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

16 years agoFix for PR3447: use padded sizes for computations on struct/union
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

16 years agoForgot to add this test.
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

16 years agoRemove unused overload of GetFunctionType.
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

16 years agoInitialize CGFunctionInfo isVariadic bit correctly.
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

16 years agoUse target alignment API to set objc2's meta-data
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

16 years agoErr, unbreak my previous "no functionality change commit", will fix properly later.
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

16 years agoKill off CGCallInfo, always use CGFunctionInfo for encapsulating
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

16 years agoUpdate checker build.
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