]> granicus.if.org Git - clang/log
clang
15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 years agoAdd sema support for the cleanup attribute.
Anders Carlsson [Sat, 31 Jan 2009 01:16:18 +0000 (01:16 +0000)]
Add sema support for the cleanup attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63462 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoclass meta-data belong to __objc_data section (in objc2
Fariborz Jahanian [Sat, 31 Jan 2009 01:07:39 +0000 (01:07 +0000)]
class meta-data belong to __objc_data section (in objc2
nonfragile abi).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63461 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRecognize class's visibility attribute and set its linkage
Fariborz Jahanian [Sat, 31 Jan 2009 00:59:10 +0000 (00:59 +0000)]
Recognize class's visibility attribute and set its linkage
to private extern (in objc2 nonfragile abi).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63460 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agox86_64 ABI: Retool classification to compute lo & hi classifications
Daniel Dunbar [Sat, 31 Jan 2009 00:06:58 +0000 (00:06 +0000)]
x86_64 ABI: Retool classification to compute lo & hi classifications
in terms of where the type resides in the containing object. This is a
more clear embodiement of the spec & fixes a merging issue with
unions. Down to 3/1000 failures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63455 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMissed another mis-alignment of an objc2 meta-data.
Fariborz Jahanian [Fri, 30 Jan 2009 23:51:52 +0000 (23:51 +0000)]
Missed another mis-alignment of an objc2 meta-data.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63453 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImprove our handling of the second step in a user-defined conversion
Douglas Gregor [Fri, 30 Jan 2009 23:27:23 +0000 (23:27 +0000)]
Improve our handling of the second step in a user-defined conversion
sequence. Previously, we weren't permitting the second step to call
copy constructors, which left user-defined conversion sequences
surprisingly broken.

Now, we perform overload resolution among all of the constructors, but
only accept the result if it makes the conversion a standard
conversion. Note that this behavior is different from both GCC and EDG
(which don't agree with each other, either); I've submitted a core
issue on the matter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63450 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix typo noticed by Chris.
Anders Carlsson [Fri, 30 Jan 2009 23:26:40 +0000 (23:26 +0000)]
Fix typo noticed by Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63449 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTurn on -flax-vector-conversions by default, issue a warning whenever one is done...
Anders Carlsson [Fri, 30 Jan 2009 23:17:46 +0000 (23:17 +0000)]
Turn on -flax-vector-conversions by default, issue a warning whenever one is done. Add a -fnolax-vector-conversions option. Fixes PR2862.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63447 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSetting correct alignent for objc2 meta-data.
Fariborz Jahanian [Fri, 30 Jan 2009 23:15:42 +0000 (23:15 +0000)]
Setting correct alignent for objc2 meta-data.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63445 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agox86_64 ABI: Fix more thinkos, straddling computation for complex was
Daniel Dunbar [Fri, 30 Jan 2009 22:40:15 +0000 (22:40 +0000)]
x86_64 ABI: Fix more thinkos, straddling computation for complex was
computing in bytes not bits. We are now down to 22/1000 failures on
the return types tests, and 18 of those are gcc bugs I believe.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63438 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpgrade the "excess elements in array initializer" warning to an
Douglas Gregor [Fri, 30 Jan 2009 22:26:29 +0000 (22:26 +0000)]
Upgrade the "excess elements in array initializer" warning to an
error, since both C99 and C++ consider it an error. For reference, GCC
makes this a warning while G++ makes it an error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63435 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement and test aggregate initialization in C++. Major changes:
Douglas Gregor [Fri, 30 Jan 2009 22:09:00 +0000 (22:09 +0000)]
Implement and test aggregate initialization in C++. Major changes:

  - Support initialization of reference members; complain if any
  reference members are left uninitialized.
  - Use C++ copy-initialization for initializing each element (falls
  back to constraint checking in C)
  - Make sure we diagnose when one tries to provide an initializer
  list for a non-aggregate.
  - Don't complain about empty initializers in C++ (they are permitted)
  - Unrelated but necessary: don't bother trying to convert the
  decl-specifier-seq to a type when we're dealing with a C++
  constructor, destructor, or conversion operator; it results in
  spurious warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63431 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd imag_info section and data (for objc2 nonfragile abi).
Fariborz Jahanian [Fri, 30 Jan 2009 22:07:48 +0000 (22:07 +0000)]
add imag_info section and data (for objc2 nonfragile abi).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63430 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agox86_64 ABI: Fix thinko in prev commit, 64-bit vectors should have SSE
Daniel Dunbar [Fri, 30 Jan 2009 21:50:20 +0000 (21:50 +0000)]
x86_64 ABI: Fix thinko in prev commit, 64-bit vectors should have SSE
class, not integer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63426 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix horrible non-termination bug in LiveVariables. The issue was that
Ted Kremenek [Fri, 30 Jan 2009 21:35:30 +0000 (21:35 +0000)]
Fix horrible non-termination bug in LiveVariables.  The issue was that
the liveness state of block-level expressions could oscillate because
of two issues:
- The initial value before a merge was not always set to "Top"
- The set of live block-level expressions is a union, not an intersection

This fixes <rdar://problem/650084>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63421 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGenerate list of implemented classes and categories in their
Fariborz Jahanian [Fri, 30 Jan 2009 20:55:31 +0000 (20:55 +0000)]
Generate list of implemented classes and categories in their
own sections (related to objc2 nonfragile abi).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63418 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDiagnosticKinds.def is gone.
Chris Lattner [Fri, 30 Jan 2009 20:04:14 +0000 (20:04 +0000)]
DiagnosticKinds.def is gone.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63415 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomemset takes an int, not a char.
Chris Lattner [Fri, 30 Jan 2009 20:03:59 +0000 (20:03 +0000)]
memset takes an int, not a char.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63414 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agox86_64 ABI: Pass <1 x double> in memory. This is arguably wrong, but
Daniel Dunbar [Fri, 30 Jan 2009 19:38:39 +0000 (19:38 +0000)]
x86_64 ABI: Pass <1 x double> in memory. This is arguably wrong, but
matches gcc 4.2 (not llvm-gcc).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63413 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove method out-of-line.
Ted Kremenek [Fri, 30 Jan 2009 19:27:39 +0000 (19:27 +0000)]
Move method out-of-line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63412 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix inverted logic in ParentMap::hasParent()
Ted Kremenek [Fri, 30 Jan 2009 19:06:38 +0000 (19:06 +0000)]
Fix inverted logic in ParentMap::hasParent()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63410 91177308-0d34-0410-b5e6-96231b3b80d8