Commit Graph

51383 Commits

Author SHA1 Message Date
Ted Kremenek ee87e0bd31 Enhance PTH preprocessor-condition-block side table to track #elseinformation as well.
llvm-svn: 60955
2008-12-12 18:31:09 +00:00
Chris Lattner 04397358ec Implement the final (hopefully) wrinkle to i-c-e + builtin_constant_p
processing: it allows arbitrary foldable constants as the operand of ?: when
builtin_constant_p is the condition.

llvm-svn: 60954
2008-12-12 18:00:51 +00:00
Nick Lewycky 729bf137a8 Revert my re-instated reverted commit, fixes the bootstrap build on x86-64 linux.
llvm-svn: 60951
2008-12-12 17:09:07 +00:00
Douglas Gregor 4287b37389 Enable out-of-line definitions of C++ constructors and destructors
llvm-svn: 60947
2008-12-12 08:25:50 +00:00
Duncan Sands e4bcb8e2dd When using a 4 byte jump table on a 64 bit machine,
do an extending load of the 4 bytes rather than a
potentially illegal (type) i32 load followed by a
sign extend.

llvm-svn: 60945
2008-12-12 08:13:38 +00:00
Duncan Sands dd6f3dbd05 Don't make use of an illegal type (i64) when
lowering f64 function arguments.

llvm-svn: 60944
2008-12-12 08:05:40 +00:00
Anders Carlsson 30032889ae Implement allocation and sizeof VLAs. This is very basic for now.
llvm-svn: 60943
2008-12-12 07:38:43 +00:00
Chris Lattner e141a9e225 rdar://6060752 - don't warn about trigraphs in bcpl-style comments
llvm-svn: 60942
2008-12-12 07:34:39 +00:00
Chris Lattner ee99aa63ca fix breakage I introduced in r60938
llvm-svn: 60941
2008-12-12 07:33:52 +00:00
Douglas Gregor b9d2380204 Add test of enumerator types
llvm-svn: 60940
2008-12-12 07:27:10 +00:00
Anders Carlsson ccbe9200f9 Add map of VLA types and their sizes
llvm-svn: 60939
2008-12-12 07:19:02 +00:00
Chris Lattner dcba4a7713 silence warning in release-asserts mode about unused variable, also
move comment into assert message.

llvm-svn: 60938
2008-12-12 07:16:09 +00:00
Chris Lattner 89770575cd fix thought-o
llvm-svn: 60937
2008-12-12 07:14:34 +00:00
Chris Lattner 4bf85ffe83 merge these testcases into one file.
llvm-svn: 60936
2008-12-12 07:01:24 +00:00
Chris Lattner d260aa03b5 add a fixme.
llvm-svn: 60935
2008-12-12 06:57:03 +00:00
Chris Lattner 85b25bc344 implement rdar://6091492 - ?: with __builtin_constant_p as the operand is an i-c-e.
llvm-svn: 60934
2008-12-12 06:55:44 +00:00
Chris Lattner 10da53c60c use smarter error recovery for do/while.
llvm-svn: 60933
2008-12-12 06:35:28 +00:00
Chris Lattner c0081db332 apply the new error recovery smarts we have for if's to while's and switch's.
llvm-svn: 60932
2008-12-12 06:31:07 +00:00
Chris Lattner fce12fdf6f rename recovery-3 to recovery.c
llvm-svn: 60931
2008-12-12 06:21:41 +00:00
Chris Lattner 5b3ddc8ef9 merge recovery-1 into recovery-3.
llvm-svn: 60930
2008-12-12 06:21:18 +00:00
Chris Lattner bc2d77cdf2 merge recovery-2.c into recovery-3.c.
Substantially improve error recovery after broken if conditions by
parsing the full if when we have a semantic error instead of using
parser recovery techniques to recover from a semantic error.

This fixes rdar://6094870 - spurious error after invalid 'if' condition

llvm-svn: 60929
2008-12-12 06:19:11 +00:00
Chris Lattner d8980509b3 minor refactoring of ParseParenExpression
llvm-svn: 60928
2008-12-12 06:00:12 +00:00
Chris Lattner dca17ceb19 add expected diag
llvm-svn: 60927
2008-12-12 05:59:56 +00:00
Chris Lattner db44f532c0 add ownership.h to xcode project
llvm-svn: 60926
2008-12-12 05:54:54 +00:00
Anders Carlsson 8a472c3151 Work in preparation for VLAs. Make sure to restore the stack if necessary (Saving the stack isn't implemented right now :)
llvm-svn: 60925
2008-12-12 05:52:00 +00:00
Chris Lattner 053441f39d Fix rdar://6095061 - gcc allows __builtin_choose_expr as an lvalue
llvm-svn: 60924
2008-12-12 05:35:08 +00:00
Chris Lattner 54139445ba Testcase for something that already works. Clang agrees with Comeau,
and this makes sense.  likely a gcc bug that it doesn't diagnose the bad
restrict.

llvm-svn: 60923
2008-12-12 05:25:55 +00:00
Chris Lattner b4396f40a0 add codegen support for __func__ and friends, producing the same
output that GCC does.  rdar://6440297

llvm-svn: 60922
2008-12-12 05:18:02 +00:00
Chris Lattner f45c5ecb3b fix rdar://6097892 - gcc incompat: clang rejects __func__, __FUNCTION__, and __PRETTY_FUNCTION__ outside func
Yeah, this is "useful".

llvm-svn: 60921
2008-12-12 05:05:20 +00:00
Chris Lattner 81ed6805db Implement rdar://6138816 - [sema] named bitfields cannot have 0 width
llvm-svn: 60920
2008-12-12 04:56:04 +00:00
Chris Lattner e5a6d7ddae fix some incorrect links.
llvm-svn: 60919
2008-12-12 04:20:01 +00:00
Mikhail Glushenkov a6a9066848 Man page update.
llvm-svn: 60918
2008-12-12 02:34:56 +00:00
Douglas Gregor 1d248c53ab In C++, set the type of each of the enumerators in an enumeration to
the type of the enumeration once the enumeration has been defined.

Fix the overloading test-case to properly create enums that promote
the way we want them to.

Implement C++0x promotions from enumeration types to long
long/unsigned long long. We're using these promotions in Carbon.h
(since long long is a common extension).

Fixes PR clang/2954: http://llvm.org/bugs/show_bug.cgi?id=2954

llvm-svn: 60917
2008-12-12 02:00:36 +00:00
Mon P Wang 9c2d26d208 Added support for SELECT v8i8 v4i16 for X86 (MMX)
Added support for TRUNC v8i16 to v8i8 for X86 (MMX)

llvm-svn: 60916
2008-12-12 01:25:51 +00:00
Bill Wendling 1a317678bc Redo the arithmetic with overflow architecture. I was changing the semantics of
ISD::ADD to emit an implicit EFLAGS. This was horribly broken. Instead, replace
the intrinsic with an ISD::SADDO node. Then custom lower that into an
X86ISD::ADD node with a associated SETCC that checks the correct condition code
(overflow or carry). Then that gets lowered into the correct X86::ADDOvf
instruction.

Similar for SUB and MUL instructions.

llvm-svn: 60915
2008-12-12 00:56:36 +00:00
Mikhail Glushenkov 6932e2f368 Fix W3C validator errors.
llvm-svn: 60912
2008-12-11 23:43:14 +00:00
Ted Kremenek 864eb39233 PTH:
- Added a side-table per each token-cached file with the preprocessor conditional stack.  This tracks what #if's are matched with what #endifs and where their respective tokens are in the PTH file.  This will allow for quick skipping of excluded conditional branches in the Preprocessor.
- Performance testing shows the addition of this information (without actually utilizing it) leads to no performance regressions.

llvm-svn: 60911
2008-12-11 23:36:38 +00:00
Mikhail Glushenkov d9a7795abc Use correct file for the llvmc tutorial.
llvm-svn: 60910
2008-12-11 23:33:33 +00:00
Mikhail Glushenkov 6fd5513284 Update the auto-generated llvmc documentation.
llvm-svn: 60909
2008-12-11 23:24:40 +00:00
Chris Lattner ece9ae718b add annotation
llvm-svn: 60907
2008-12-11 23:11:52 +00:00
Sebastian Redl d65cea8dde Convert a big bunch of expression parsers to use smart pointers.
llvm-svn: 60906
2008-12-11 22:51:44 +00:00
Ted Kremenek ca153f7349 PTHLexer: Keep track of the location of the last '#' token and provide the means to jump ahead in the token stream.
llvm-svn: 60905
2008-12-11 22:41:47 +00:00
Sebastian Redl 90893187c4 Convert some more expression parsers to use smart pointers.
llvm-svn: 60904
2008-12-11 22:33:27 +00:00
Mikhail Glushenkov 4673023e71 Add a '-Wo,' option that passes options to opt.
llvm-svn: 60902
2008-12-11 22:19:14 +00:00
Evan Cheng a52c3b4b8b Fix a 80 col. violation.
llvm-svn: 60901
2008-12-11 22:02:02 +00:00
Sebastian Redl 59b5e517c7 Convert selected expression parsers to use smart pointers.
llvm-svn: 60900
2008-12-11 21:36:32 +00:00
Steve Naroff a5c0db8467 Rename a local predicate to avoid confusion with Type::isBlockPointerType().
llvm-svn: 60899
2008-12-11 21:05:33 +00:00
Steve Naroff 5ac4eac3b6 Fixup generated code for imported block decl refs.
Found while investigating <rdar://problem/6435837> clang ObjC rewriter: use Block_release instead of Block_destroy.

llvm-svn: 60898
2008-12-11 20:51:38 +00:00
Douglas Gregor 7a4fad1b0b Address some comments on the name lookup/DeclContext patch from Chris
llvm-svn: 60897
2008-12-11 20:41:00 +00:00
Ted Kremenek 67ab296d5c Remove unused ivar CurTokenIdx.
llvm-svn: 60896
2008-12-11 20:39:48 +00:00