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

15 years agowire up -fno-show-source-location option, patch by Alexei Svitkine!
Chris Lattner [Fri, 30 Jan 2009 19:01:41 +0000 (19:01 +0000)]
wire up -fno-show-source-location option, patch by Alexei Svitkine!

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

15 years agoCode gen. for @protocol expression in the new nonfragile abi.
Fariborz Jahanian [Fri, 30 Jan 2009 18:58:59 +0000 (18:58 +0000)]
Code gen. for @protocol expression in the new nonfragile abi.

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

15 years agoadd testcase for PR3437 and r63405
Chris Lattner [Fri, 30 Jan 2009 18:49:16 +0000 (18:49 +0000)]
add testcase for PR3437 and r63405

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

15 years agoRemove testing -use-x86_64-abi option; current implementation is
Daniel Dunbar [Fri, 30 Jan 2009 18:47:53 +0000 (18:47 +0000)]
Remove testing -use-x86_64-abi option; current implementation is
robust enough for general use.

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

15 years agoavoid emitting a bogus line marker for the top level #include
Chris Lattner [Fri, 30 Jan 2009 18:44:17 +0000 (18:44 +0000)]
avoid emitting a bogus line marker for the top level #include
location.  We now -E a file containing "foo" into:

# 1 "t.c"
# 1 "t.c" 1
# 1 "<predefines>" 1
# 1 "t.c" 2
foo

instead of:

# 1 "t.c"
# 1 "t.c" 1
# 0 "t.c"
# 1 "<predefines>" 1
# 1 "t.c" 2
foo

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

15 years agox86_64 ABI: Split small vectors which cross an eightbyte boundary. Down to 33/500...
Daniel Dunbar [Fri, 30 Jan 2009 18:40:10 +0000 (18:40 +0000)]
x86_64 ABI: Split small vectors which cross an eightbyte boundary. Down to 33/500 return type failures.

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

15 years agoClosed out a few radars that were addressed by designated initializers
Douglas Gregor [Fri, 30 Jan 2009 17:42:28 +0000 (17:42 +0000)]
Closed out a few radars that were addressed by designated initializers

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

15 years ago" Attached is a patch for TextDiagnosticPrinter that adds an optional
Chris Lattner [Fri, 30 Jan 2009 17:41:53 +0000 (17:41 +0000)]
" Attached is a patch for TextDiagnosticPrinter that adds an optional
parameter that allows users to omit the printing of the source
location on a diagnostic. So basically it would omit the "abc.c:5:1: "
at the beginning of the line."

Patch by Alexei Svitkine!

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

15 years agoSwitch Type::isAggregateType to use the C++ definition of "aggregate
Douglas Gregor [Fri, 30 Jan 2009 17:31:00 +0000 (17:31 +0000)]
Switch Type::isAggregateType to use the C++ definition of "aggregate
type" rather than the C definition. We do this because both C99 and
Clang always use "aggregate type" as "aggregate or union type", and
the C++ definition includes union types.

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

15 years agoMake sure to cast the VLA size of array to the type of size_t. Fixes PR3442.
Anders Carlsson [Fri, 30 Jan 2009 16:41:04 +0000 (16:41 +0000)]
Make sure to cast the VLA size of array to the type of size_t. Fixes PR3442.

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

15 years agoSimplify/cleanup r63219 (based on Chris review).
Steve Naroff [Fri, 30 Jan 2009 14:23:32 +0000 (14:23 +0000)]
Simplify/cleanup r63219 (based on Chris review).

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

15 years agofix RUN line
Nuno Lopes [Fri, 30 Jan 2009 14:03:37 +0000 (14:03 +0000)]
fix RUN line

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

15 years agoenable test as it works
Nuno Lopes [Fri, 30 Jan 2009 13:01:29 +0000 (13:01 +0000)]
enable test as it works

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

15 years agoenable test as it already works
Nuno Lopes [Fri, 30 Jan 2009 12:58:18 +0000 (12:58 +0000)]
enable test as it already works

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

15 years agoAdd -fno-blocks support. This fixes block-no-block-def.c.
Mike Stump [Fri, 30 Jan 2009 08:22:07 +0000 (08:22 +0000)]
Add -fno-blocks support.  This fixes block-no-block-def.c.

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

15 years agox86_64 ABI: Implement classification for arrays.
Daniel Dunbar [Fri, 30 Jan 2009 08:09:32 +0000 (08:09 +0000)]
x86_64 ABI: Implement classification for arrays.
 - This brings us down to an 8% failure rate on the first 500 return
   types tests (from 12%).

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

15 years agoImplement constant generation of ImplicitValueInitExprs.
Anders Carlsson [Fri, 30 Jan 2009 06:13:25 +0000 (06:13 +0000)]
Implement constant generation of ImplicitValueInitExprs.

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

15 years agoccc: Forward -fobjc-nonfragile-abi to clang.
Daniel Dunbar [Fri, 30 Jan 2009 04:43:19 +0000 (04:43 +0000)]
ccc: Forward -fobjc-nonfragile-abi to clang.

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

15 years agoupdate for change in API.
Chris Lattner [Fri, 30 Jan 2009 01:58:33 +0000 (01:58 +0000)]
update for change in API.

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

15 years agoEliminated LookupCriteria, whose creation was causing a bottleneck for
Douglas Gregor [Fri, 30 Jan 2009 01:04:22 +0000 (01:04 +0000)]
Eliminated LookupCriteria, whose creation was causing a bottleneck for
LookupName et al. Instead, use an enum and a bool to describe its
contents.

Optimized the C/Objective-C path through LookupName, eliminating any
unnecessarily C++isms. Simplify IdentifierResolver::iterator, removing
some code and arguments that are no longer used.

Eliminated LookupDeclInScope/LookupDeclInContext, moving all callers
over to LookupName, LookupQualifiedName, or LookupParsedName, as
appropriate.

All together, I'm seeing a 0.2% speedup on Cocoa.h with PTH and
-disable-free. Plus, we're down to three name-lookup routines.

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

15 years agoUse uint64_t not unsigned for type sizes/offsets.
Daniel Dunbar [Fri, 30 Jan 2009 00:47:38 +0000 (00:47 +0000)]
Use uint64_t not unsigned for type sizes/offsets.

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

15 years agoBug fixing involving method-list in protocol meta-data
Fariborz Jahanian [Fri, 30 Jan 2009 00:46:37 +0000 (00:46 +0000)]
Bug fixing involving method-list in protocol meta-data
(objc2 nonfragile-abi).

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

15 years agoccc: Add -Xclang option, rename -WA, to -Xanalyzer.
Daniel Dunbar [Fri, 30 Jan 2009 00:24:16 +0000 (00:24 +0000)]
ccc: Add -Xclang option, rename -WA, to -Xanalyzer.
 - -Xclang always forwards to clang

 - -Xanalyzer replaces -WA,; it seems like the cleaner mechanism and
    is more readable.

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

15 years agoccc: Mark -combine option as unsupported.
Daniel Dunbar [Fri, 30 Jan 2009 00:12:29 +0000 (00:12 +0000)]
ccc: Mark -combine option as unsupported.

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

15 years agoFix a couple bugs:
Ted Kremenek [Fri, 30 Jan 2009 00:08:43 +0000 (00:08 +0000)]
Fix a couple bugs:
- NonLoc::MakeVal() would use sizeof(unsigned) (literally) instead of consulting
  ASTContext for the size (in bits) of 'int'. While it worked, it was a
  conflation of concepts and using ASTContext.IntTy is 100% correct.
- RegionStore::getSizeInElements() no longer assumes that a VarRegion has the
  type "ConstantArray", and handles the case when uses use ordinary variables
  as if they were arrays.
- Fixed ElementRegion::getRValueType() to just return the rvalue type of its
  "array region" in the case the array didn't have ArrayType.
- All of this fixes <rdar://problem/6541136>

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