]> granicus.if.org Git - clang/log
clang
18 years agoRemoved some superfluous code. The getType() method and associated
Steve Naroff [Fri, 13 Jul 2007 17:39:21 +0000 (17:39 +0000)]
Removed some superfluous code. The getType() method and associated
assert is now done in UsualUnaryConversions().

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

18 years agoremove use of alloca.
Chris Lattner [Fri, 13 Jul 2007 17:10:38 +0000 (17:10 +0000)]
remove use of alloca.

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

18 years agoAdd (explicit) AST support for implicit casts. This should simplify the
Steve Naroff [Fri, 13 Jul 2007 16:58:59 +0000 (16:58 +0000)]
Add (explicit) AST support for implicit casts. This should simplify the
code generator. Source translation tools can simply ignore this node.

- Added a new Expr node, ImplicitCastExpr.
- Changed UsualUnaryConversions/UsualArithmeticConversions to take references
to Expr *'s. This will allow these routines to instantiate the new AST node
and pass it back.
- Changed all clients of UsualUnary/UsualArithmetic (lot's of diff's).
- Changed some names in CheckConditionalOperands. Several variables where
only distinguished by their case (e.g. Cond, cond). Yuck (what was I thinking).
- Removed an old/crufty constructor in CastExpr (cleanup).

This check-in does not actually create the new AST node. I wanted to separate
the mechanical changes from the semantic changes. In addition, I need to
coordinate with Chris, since the semantic change will break the code generator.

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

18 years agocheck in the basic llvm license
Chris Lattner [Fri, 13 Jul 2007 15:47:47 +0000 (15:47 +0000)]
check in the basic llvm license

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

18 years agoSolaris needs an included header for alloca
Gabor Greif [Fri, 13 Jul 2007 08:21:39 +0000 (08:21 +0000)]
Solaris needs an included header for alloca

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

18 years ago"Codegen for Character Literals and Conditional Operator
Chris Lattner [Fri, 13 Jul 2007 05:18:11 +0000 (05:18 +0000)]
"Codegen for Character Literals and Conditional Operator

Both in one patch, and the test case that Chris didn't commit last
time is in there too...

I'll split the patch up if somebody wants it split."

Patch by Keith Bauer.

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

18 years agoimplement support for basic codegen of global variables with no initializers.
Chris Lattner [Fri, 13 Jul 2007 05:13:43 +0000 (05:13 +0000)]
implement support for basic codegen of global variables with no initializers.

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

18 years ago"Someone typed "PtrToInt" where they meant "IntToPtr".
Chris Lattner [Fri, 13 Jul 2007 03:25:53 +0000 (03:25 +0000)]
"Someone typed "PtrToInt" where they meant "IntToPtr".

I've added a tests/CodeGen directory, and a test for this case that
used to fail and now passes."

Patch by Keith Bauer

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

18 years agoImplement codegen for + and - with pointers. Patch contributed by
Chris Lattner [Fri, 13 Jul 2007 03:05:23 +0000 (03:05 +0000)]
Implement codegen for + and - with pointers.  Patch contributed by
Keith Bauer.

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

18 years agoWorkaround gcc 3.4.x bug
Anton Korobeynikov [Fri, 13 Jul 2007 00:48:55 +0000 (00:48 +0000)]
Workaround gcc 3.4.x bug

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

18 years agoTwo changes...
Steve Naroff [Thu, 12 Jul 2007 21:46:55 +0000 (21:46 +0000)]
Two changes...

- Teach all the integer/float predicates on Type about Vectors.
- Disallow bitwise compliment on float vectors. For example...

typedef float __attribute__(( vector_size(16) )) float4;

float4 float4_return()
{
    float4 xx;

    return ~xx;
}

...now emits the following diagnostic...

[administrators-powerbook59:~/llvm/tools/clang] admin% ../../Debug/bin/clang bug.c
bug.c:8:12: error: invalid argument type to unary expression 'float4'
    return ~xx;
           ^
1 diagnostic generated.

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

18 years agoupdate tests
Chris Lattner [Thu, 12 Jul 2007 16:52:08 +0000 (16:52 +0000)]
update tests

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

18 years ago-pedantic no longer defaults to on.
Chris Lattner [Thu, 12 Jul 2007 16:49:27 +0000 (16:49 +0000)]
-pedantic no longer defaults to on.

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

18 years agoupdate test
Chris Lattner [Thu, 12 Jul 2007 16:48:52 +0000 (16:48 +0000)]
update test

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

18 years agodon't pick up random stuff in .svn directories.
Chris Lattner [Thu, 12 Jul 2007 16:46:07 +0000 (16:46 +0000)]
don't pick up random stuff in .svn directories.

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

18 years agoadd missing header
Gabor Greif [Thu, 12 Jul 2007 16:00:00 +0000 (16:00 +0000)]
add missing header
(needed on Solaris)

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

18 years agoFix "no newline at end of file" warnings. Patch contributed by
Chris Lattner [Thu, 12 Jul 2007 15:43:07 +0000 (15:43 +0000)]
Fix "no newline at end of file" warnings.  Patch contributed by
Benoit Boissinot!

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

18 years agoImprove portability to compilers where <cassert> is not implicitly
Chris Lattner [Thu, 12 Jul 2007 15:32:57 +0000 (15:32 +0000)]
Improve portability to compilers where <cassert> is not implicitly
included.  Patch contributed by Benoit Boissinot!

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

18 years agoAllow this to compile on compilers where <string>
Chris Lattner [Thu, 12 Jul 2007 15:30:49 +0000 (15:30 +0000)]
Allow this to compile on compilers where <string>
doesn't imply <cassert>.

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

18 years agoProperly use local variable declaration inside a switch case
Anton Korobeynikov [Thu, 12 Jul 2007 15:26:50 +0000 (15:26 +0000)]
Properly use local variable declaration inside a switch case

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

18 years agoadd missing specification for a default argument. I guess g++ 4.0 doesn't
Chris Lattner [Thu, 12 Jul 2007 15:26:16 +0000 (15:26 +0000)]
add missing specification for a default argument.  I guess g++ 4.0 doesn't
notice this.

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

18 years agoEvaluate the initializer for automatic variables.
Chris Lattner [Thu, 12 Jul 2007 00:39:48 +0000 (00:39 +0000)]
Evaluate the initializer for automatic variables.

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

18 years agoremember the initializer for a variable in the AST and teach the
Chris Lattner [Thu, 12 Jul 2007 00:36:32 +0000 (00:36 +0000)]
remember the initializer for a variable in the AST and teach the
pretty printer to print it.

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

18 years agoimplement codegen support for pre/post inc/dec.
Chris Lattner [Wed, 11 Jul 2007 23:43:46 +0000 (23:43 +0000)]
implement codegen support for pre/post inc/dec.

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

18 years agoFix a release build of clang.
Chris Lattner [Wed, 11 Jul 2007 21:50:45 +0000 (21:50 +0000)]
Fix a release build of clang.

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

18 years agoupdate this.
Chris Lattner [Wed, 11 Jul 2007 18:58:19 +0000 (18:58 +0000)]
update this.

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

18 years agoTest commit
Chris Lattner [Wed, 11 Jul 2007 17:31:59 +0000 (17:31 +0000)]
Test commit

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

18 years agoMove the ModuleInfo.txt file.
Reid Spencer [Wed, 11 Jul 2007 17:03:27 +0000 (17:03 +0000)]
Move the ModuleInfo.txt file.

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

18 years agoStage two of getting CFE top correct.
Reid Spencer [Wed, 11 Jul 2007 17:01:13 +0000 (17:01 +0000)]
Stage two of getting CFE top correct.

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

18 years agoAdd a comment to indicate what this file is for.
Reid Spencer [Wed, 11 Jul 2007 08:00:56 +0000 (08:00 +0000)]
Add a comment to indicate what this file is for.

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

18 years agoAdd ModuleInfo.txt for the cfe module.
Reid Spencer [Wed, 11 Jul 2007 07:46:26 +0000 (07:46 +0000)]
Add ModuleInfo.txt for the cfe module.

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

18 years agoCreate initial directory structure for the C Front End.
Reid Spencer [Wed, 11 Jul 2007 07:42:41 +0000 (07:42 +0000)]
Create initial directory structure for the C Front End.

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