Commit Graph

2905 Commits

Author SHA1 Message Date
Steve Naroff f727faf2ed Explicitly set the string literal type from "char *" to "constant array of char".
At this point, I am fairly certain the front-end is correct. Unfortunately, the back-end is still unhappy.

That said, I've commented out the two lines in globalinit.c that are causing problems.

Chris, please have a look...thanks!

llvm-svn: 44823
2007-12-11 00:00:01 +00:00
Ted Kremenek c0870605be Fixed bug in CFG::PopulateBlkExprMap where the ordering
between fetching the size of the expression map (for use as
the next integer id for an Expr*) and the creation of the
entry in the map could be non-deterministic.  This could
cause the size of the map to be incremented prior to the
index being determine.

On Linux the map entry would be created first, causing the
map to the "size" to be incremented prior to it being
queried. On Mac OS X we had the reverse behavior. Now the
size is always queried prior to the new id being inserted
into the map.

This was the real cause of the bit-overrun triggered in
PR 1847:

  http://llvm.org/bugs/show_bug.cgi?id=1847
  
Also reverted the change in patch 44813, which was a bogus
fix to this problem:

  http://llvm.org/viewvc/llvm-project?rev=44813&view=rev

llvm-svn: 44822
2007-12-10 23:58:39 +00:00
Ted Kremenek f182e81d85 Added missing inclusion of stdarg.h. Now CGExprScalar.cpp
compiles again on Linux.

llvm-svn: 44821
2007-12-10 23:44:32 +00:00
Steve Naroff 91f78080e3 Add support for initializing char arrays from string literals.
Adapted from a patch by Anders Carlsson.

llvm-svn: 44816
2007-12-10 22:44:33 +00:00
Ted Kremenek b4785e3054 Fixed off-by-one-error when resizing Bitvectors used for
dataflow analysis over expressions and decls.

This should fix bug 1847:

http://llvm.org/bugs/show_bug.cgi?id=1847

Thanks to Török Edwin for providing a test case that
identified the problem.

llvm-svn: 44813
2007-12-10 22:01:22 +00:00
Chris Lattner 433fb26707 add support for implicit cast from array to pointer that is not the element
type.

llvm-svn: 44809
2007-12-10 19:50:32 +00:00
Anders Carlsson d0113e4be3 Revert change that broke the build.
llvm-svn: 44808
2007-12-10 19:46:20 +00:00
Chris Lattner e665077f9a disable case that makes this fail.
llvm-svn: 44807
2007-12-10 19:44:50 +00:00
Anders Carlsson b9eb82c3ee Add EmitShuffleVector helper method.
llvm-svn: 44806
2007-12-10 19:35:18 +00:00
Anders Carlsson dc16e8f299 Address comments from Chris.
llvm-svn: 44804
2007-12-10 19:30:18 +00:00
Chris Lattner 456078d50d minor edits.
llvm-svn: 44801
2007-12-10 18:56:37 +00:00
Devang Patel b3ae8d7dc2 Add assert to flag incomplete bit-field support.
llvm-svn: 44800
2007-12-10 18:52:06 +00:00
Devang Patel 3c31b54b47 Use getABITypeSizeInBits() instead of getTypeSizeInBits() during struct layout.
llvm-svn: 44799
2007-12-10 18:37:40 +00:00
Devang Patel bb5c0d8960 Use getABITypeSizeInBits() instead of getTypeSizeInBits() during struct layout.
llvm-svn: 44798
2007-12-10 18:25:34 +00:00
Ted Kremenek 256a15d532 Added newline to end of file.
llvm-svn: 44797
2007-12-10 18:01:25 +00:00
Chris Lattner 80c54698e8 be more clear about what we are comparing.
llvm-svn: 44795
2007-12-10 17:38:50 +00:00
Anders Carlsson 1b9853a9f8 Forgot this file.
llvm-svn: 44790
2007-12-10 08:48:18 +00:00
Chris Lattner c3307e2418 fixes, thanks to Nico Weber
llvm-svn: 44789
2007-12-10 08:21:12 +00:00
Chris Lattner 428760a6e6 clean up the TOC.
llvm-svn: 44788
2007-12-10 08:19:29 +00:00
Chris Lattner e396aaae28 finish the features description.
llvm-svn: 44787
2007-12-10 08:12:49 +00:00
Chris Lattner b6a8cfea24 now with hackability.
llvm-svn: 44784
2007-12-10 07:23:52 +00:00
Chris Lattner aa085d36e2 reorganize features, expound on a couple more.
llvm-svn: 44783
2007-12-10 07:14:08 +00:00
Chris Lattner e404df76c0 incorporate suggestions from Joel Nelson.
llvm-svn: 44782
2007-12-10 06:01:32 +00:00
Chris Lattner f572f3364d start making features be a more detailed description of the features/goals section on the main page.
llvm-svn: 44781
2007-12-10 05:52:05 +00:00
Chris Lattner 27a2709cfb add toc
llvm-svn: 44780
2007-12-10 05:23:01 +00:00
Chris Lattner b072569682 don't duplicate goals on the features page.
llvm-svn: 44779
2007-12-10 05:20:47 +00:00
Chris Lattner ab44e15ce7 update status
llvm-svn: 44778
2007-12-10 05:11:40 +00:00
Chris Lattner fdfd014270 edits, switch the goals/why section.
llvm-svn: 44777
2007-12-10 05:10:14 +00:00
Chris Lattner 5a7359c8c2 minor edits
llvm-svn: 44776
2007-12-10 05:06:15 +00:00
Chris Lattner e31cd5b564 add link to comparison page.
llvm-svn: 44763
2007-12-10 02:25:51 +00:00
Chris Lattner 609f9ccb2c Be more positive! Add to sidebar.
llvm-svn: 44762
2007-12-10 02:24:44 +00:00
Chris Lattner 10ebf4dcb1 updates.
llvm-svn: 44761
2007-12-10 02:18:15 +00:00
Chris Lattner 3fbe73bef2 minor edits
llvm-svn: 44759
2007-12-10 02:05:32 +00:00
Chris Lattner cf7cb4bbdd make more positive.
llvm-svn: 44758
2007-12-10 01:52:24 +00:00
Chris Lattner 78eeea2ce9 Add a "comparing clang to other compilers" page, to help resolve some FAQ's.
llvm-svn: 44754
2007-12-10 01:44:24 +00:00
Chris Lattner 7f0ad21480 lots of this is done.
llvm-svn: 44753
2007-12-10 00:14:49 +00:00
Chris Lattner cb04ac9599 abort when we lower an initializer to the wrong type, as we currently do for:
char text[] = "string";

llvm-svn: 44752
2007-12-10 00:05:55 +00:00
Chris Lattner 686628e052 extend or truncate the initializer for a string initializer to match its type.
llvm-svn: 44751
2007-12-10 00:00:56 +00:00
Chris Lattner c25c42f3ca Implement codegen support for:
char text[8] = "string";

Big fixme remains.

llvm-svn: 44750
2007-12-09 23:49:42 +00:00
Anders Carlsson 92c4e44da1 Address Chris's comments.
llvm-svn: 44749
2007-12-09 23:39:18 +00:00
Anders Carlsson 895af08562 Move target specific builtin IDs to TargetBuiltins.h so that they can be used by CGBuiltin.cpp
llvm-svn: 44748
2007-12-09 23:17:02 +00:00
Chris Lattner 4d62f42eba Implement correct semantic analysis of subtractions, implementing
C99 6.5.6.

llvm-svn: 44746
2007-12-09 21:53:25 +00:00
Anders Carlsson 8e1d8cf241 Implement __builtin_ia32_mulps.
llvm-svn: 44745
2007-12-09 21:51:19 +00:00
Anders Carlsson a020c43034 Generate code for target specific intrinsics.
llvm-svn: 44744
2007-12-09 21:20:04 +00:00
Chris Lattner 3ed83c1c0f The flags on tokens indicate whether they are the start of a *physical* line,
not the start of a logical line.  Be careful about this distinction, which 
affects when newlines are printed and when paste-avoidance happens, etc.  
This fixes PR1848, thanks to Neil for noticing this!

llvm-svn: 44743
2007-12-09 21:11:08 +00:00
Chris Lattner 84f450789a Fix a pretty big but subtle bug counting the number of newlines to emit.
This would cause us to emit different code (in -E mode) for these two files:

---
#define t(x) x

t(a
3)
---
#define t(x) x
t(a
3)
---

In one case, -E would print "a\n3", in the other it printed "a3".  Now
it prints "a3" for both.

This is part of PR1848.

llvm-svn: 44742
2007-12-09 20:45:43 +00:00
Chris Lattner 615315f307 Add dumping support for locations, make -dumptokens print out the location
info of each token.

llvm-svn: 44741
2007-12-09 20:31:55 +00:00
Chris Lattner 93cd101e5c Fix typo noticed by Nico Weber
llvm-svn: 44739
2007-12-09 17:50:14 +00:00
Chris Lattner 7566350b74 many edits to the main page, add a prominant 'status' section.
llvm-svn: 44737
2007-12-09 09:05:23 +00:00
Chris Lattner d93d0fc79a unindent, don't zap whitespace before/after paragraphs.
llvm-svn: 44736
2007-12-09 08:40:26 +00:00