Commit Graph

48077 Commits

Author SHA1 Message Date
Steve Naroff 8edb573a79 Fix <rdar://problem/6252129> implementation of method in category doesn't effectively declare it for methods below.
llvm-svn: 56771
2008-09-28 14:55:53 +00:00
Steve Naroff 4831c74d40 Fix <rdar://problem/6252108> assigning to argument passed to block should not require __block.
llvm-svn: 56770
2008-09-28 14:02:55 +00:00
Chris Lattner 037379d767 Fix rdar://6252231 - cannot call vsnprintf with va_list on x86_64,
by decaying __builtin_va_list's type when forming builtins.  On
x86-64 (and other targets) __builtin_va_list is a typedef for
an array.

llvm-svn: 56768
2008-09-28 06:05:35 +00:00
Chris Lattner ff2c187e59 Replace a comparison with a static list of builtins that was wrong (it
wasn't covering checking builtins like __builtin___vsnprintf_chk) with
a check that won't get out of date. 

llvm-svn: 56767
2008-09-28 05:54:29 +00:00
Chris Lattner e9d291c038 Fix rdar://6251437, references to enum constant decls in a block
don't need a BlockDeclRefExpr.

llvm-svn: 56766
2008-09-28 05:30:26 +00:00
Ted Kremenek 7dbc92a269 Add "Path Length" back to the table of bug reports.
llvm-svn: 56765
2008-09-28 04:13:09 +00:00
Steve Naroff e18f94c20d Fix <rdar://problem/6252216> compare block to NULL.
llvm-svn: 56764
2008-09-28 01:11:11 +00:00
Daniel Dunbar d3dcb4f8ed Add support for implicit rethrows in @catch blocks.
Comment exception-handling code generation strategy.

llvm-svn: 56763
2008-09-28 01:03:14 +00:00
Daniel Dunbar a2d3570fc9 Skip redundant if.
llvm-svn: 56762
2008-09-28 00:19:22 +00:00
Steve Naroff edec9ba58d Fix <rdar://problem/6252226> parser thinks block argument is undefined identifier in NSServices.m
llvm-svn: 56761
2008-09-28 00:13:36 +00:00
Dan Gohman 843fe14fab Move the code that handles DAGISel error conditions into
helper functions instead of duplicating it inline each time
it is needed. This eliminates a few hundred or so copies
of this code in each target.

llvm-svn: 56759
2008-09-27 23:53:14 +00:00
Daniel Dunbar 7f08678f7d (Update LLVM) Clean up obj-c exception generation to be a bit more
readable and to generate more readable IR.

llvm-svn: 56758
2008-09-27 23:30:04 +00:00
Daniel Dunbar c7486c8636 Add IRBuilder::{CreateIsNull, CreateIsNonNull} helper methods.
- I'm open to the idea that these could have better names. I think
   these read better than CreateEQNull and CreateNENull.

llvm-svn: 56757
2008-09-27 23:22:55 +00:00
Daniel Dunbar 86919f45cc Bug fix, codegen @catch(id<X> ...) acceptably.
- This should be rejected by sema (IMHO) but that needs some
   investigation.

llvm-svn: 56756
2008-09-27 22:21:14 +00:00
Ted Kremenek 21c24f1785 Revert 56735. The old bug categories were more informative.
llvm-svn: 56755
2008-09-27 22:02:42 +00:00
Daniel Dunbar 523208fb4a Simplify generate code for exceptions:
- There is no need to branch on the rethrow variable to determine if
   we need to call objc_exception_try_exit. We know whether an
   exception was thrown, so just branch to a different target if we
   want to skip the try_exit. 

   This is a slight semantic departure from gcc, but only for throwing
   nil, which is undefined (and for which gcc emits broken code).

 - Also fixes a bug in current code which was calling try_exit too
   many times when an exception was uncaught (but there were some
   handlers).

Fix bug introduced in prev. commit, the type of the @catch parameter
was uninitialized.

llvm-svn: 56754
2008-09-27 07:36:24 +00:00
Daniel Dunbar aec553bfdb Prefer llvm::Function::addFnAttr(...) to F->addAttribute(~0, ...).
llvm-svn: 56753
2008-09-27 07:16:42 +00:00
Daniel Dunbar 274ff37583 Simplify code to emit the unified return block and move it to the end
of the function.

llvm-svn: 56752
2008-09-27 07:15:59 +00:00
Daniel Dunbar b22ff59750 Bug fix, make sure to initialize exception object (to rethrow) even
when there are no @catch blocks.

Also, eliminated unneeded alloca for the rethrow object.

Also, avoid generating code to rethrow exception if the exception will
trivially always be caught.

llvm-svn: 56751
2008-09-27 07:03:52 +00:00
Daniel Dunbar da04d7f4ec Easy fix for nasty bug, exception data buffer had wrong type == wrong
(smaller) size == garbage on stack == heisenbugs.

llvm-svn: 56750
2008-09-27 06:32:25 +00:00
Zhongxing Xu 612e0c9604 Delete trailing white space. It's over 80 columns.
llvm-svn: 56749
2008-09-27 03:27:29 +00:00
Evan Cheng 3774b2f292 Re-apply 56683 with fixes.
llvm-svn: 56748
2008-09-27 01:56:22 +00:00
Daniel Dunbar 53642c0160 Remove automagic substitution of %llvmgcc
- Is unused and somewhat unreliable.

llvm-svn: 56737
2008-09-27 00:47:03 +00:00
Ted Kremenek 16a59fabec Change "leaks" to have the category "Performance".
llvm-svn: 56735
2008-09-27 00:45:27 +00:00
Daniel Dunbar 00e36f4c5c Fix function-attributes test case to not rely on llvm-gcc.
llvm-svn: 56734
2008-09-27 00:44:01 +00:00
Daniel Dunbar 23b46ca198 Fix attributes test case to not run clang umpteen times.
llvm-svn: 56733
2008-09-27 00:39:13 +00:00
Devang Patel db937ec8fa Update tests.
llvm-svn: 56730
2008-09-27 00:25:28 +00:00
Daniel Dunbar 1d5e766016 Unbreak build.
llvm-svn: 56727
2008-09-27 00:22:09 +00:00
Bill Wendling ba3d0b7c00 Add missing #include for asserts.
llvm-svn: 56718
2008-09-27 00:08:24 +00:00
Devang Patel 9eb525d4f9 Implement function notes as function attributes.
llvm-svn: 56716
2008-09-26 23:51:19 +00:00
Dale Johannesen c4b02eb4e5 Generated files for warning fix.
llvm-svn: 56715
2008-09-26 23:46:20 +00:00
Dale Johannesen e2ea91e7cb Fix a compiler warning.
llvm-svn: 56714
2008-09-26 23:45:53 +00:00
Evan Cheng 7d6fa97567 Implement "punpckldq %xmm0, $xmm0" as "pshufd $0x50, %xmm0, %xmm" unless optimizing for code size.
llvm-svn: 56711
2008-09-26 23:41:32 +00:00
Ted Kremenek 8bafa2cf9f Internally store the body of a BlockExpr using a Stmt* instead of a CompoundStmt*, and use the getBody() method to do the appropriate checking. This both removes the type-punning warnings in Expr.cpp and also makes BlockExpr have more consistency checks against modifications to its body (via StmtIterator).
llvm-svn: 56710
2008-09-26 23:24:14 +00:00
Ted Kremenek 2e53c51914 Forgot to check in header file with last commit.
llvm-svn: 56709
2008-09-26 23:24:05 +00:00
Ted Kremenek 6ed79f0c13 Use a union instead of a bunch of magic casts to implement a variant. This removes the type-punning errors for DeclGroup.
llvm-svn: 56708
2008-09-26 23:19:04 +00:00
Ted Kremenek f5e7e3ae26 Add more control-flow to test case.
llvm-svn: 56707
2008-09-26 23:05:47 +00:00
Ted Kremenek d86d39cc9e Add CFG support for implicit-control flow for VLA size expressions within an SizeOfAlignOfTypeExpr.
llvm-svn: 56706
2008-09-26 22:58:57 +00:00
Devang Patel 597e70876e Now Attributes are divided in three groups
- return attributes - inreg, zext and sext
- parameter attributes
- function attributes - nounwind, readonly, readnone, noreturn

Return attributes use 0 as the index.
Function attributes use ~0U as the index.

llvm-svn: 56705
2008-09-26 22:53:57 +00:00
Devang Patel a05633e105 Now Attributes are divided in three groups
- return attributes - inreg, zext and sext
- parameter attributes
- function attributes - nounwind, readonly, readnone, noreturn

Return attributes use 0 as the index.
Function attributes use ~0U as the index.

This patch requires corresponding changes in llvm-gcc and clang.

llvm-svn: 56704
2008-09-26 22:53:05 +00:00
Bill Wendling c966a737c5 Temporarily reverting r56683. This is causing a failure during the build of llvm-gcc:
/Volumes/Gir/devel/llvm/clean/llvm-gcc.obj/./gcc/xgcc -B/Volumes/Gir/devel/llvm/clean/llvm-gcc.obj/./gcc/ -B/Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/bin/ -B/Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/lib/ -isystem /Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/include -isystem /Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/sys-include -mmacosx-version-min=10.4 -O2  -O2 -g -O2  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include  -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Gir/devel/llvm/clean/llvm.obj/include -I/Volumes/Gir/devel/llvm/clean/llvm.src/include -fexceptions -fvisibility=hidden -DHIDE_EXPORTS -c ../../llvm-gcc.src/gcc/unwind-dw2-fde-darwin.c -o libgcc/./unwind-dw2-fde-darwin.o
Assertion failed: (TargetRegisterInfo::isVirtualRegister(regA) && TargetRegisterInfo::isVirtualRegister(regB) && "cannot update physical register live information"), function runOnMachineFunction, file /Volumes/Gir/devel/llvm/clean/llvm.src/lib/CodeGen/TwoAddressInstructionPass.cpp, line 311.
../../llvm-gcc.src/gcc/unwind-dw2.c:1527: internal compiler error: Abort trap
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.
{standard input}:3521:non-relocatable subtraction expression, "_dwarf_reg_size_table" minus "L20$pb"
{standard input}:3521:symbol: "_dwarf_reg_size_table" can't be undefined in a subtraction expression
{standard input}:3520:non-relocatable subtraction expression, "_dwarf_reg_size_table" minus "L20$pb"
...

llvm-svn: 56703
2008-09-26 22:10:44 +00:00
Dan Gohman 5628f642ad Fix missing whitespace in the printing of function notes.
llvm-svn: 56702
2008-09-26 22:02:59 +00:00
Ted Kremenek 928f484c2d Updated checker build.
llvm-svn: 56701
2008-09-26 22:00:01 +00:00
Dan Gohman 6e0548336a Rename ConstantSDNode's getSignExtended to getSExtValue, for
consistancy with ConstantInt, and re-implement it in terms
of ConstantInt's getSExtValue.

llvm-svn: 56700
2008-09-26 21:54:37 +00:00
Dan Gohman 7e763ed3aa Make some minor reorganizations and comment changes to eliminate trivial
differences between the CallInst and InvokeInst classes.

llvm-svn: 56699
2008-09-26 21:38:45 +00:00
Dan Gohman 7e922aa35d Mark lea fi# as being really rematerializable.
llvm-svn: 56698
2008-09-26 21:30:20 +00:00
Evan Cheng 30f5494efb unpckhps requires sse1, punpckhdq requires sse2.
llvm-svn: 56697
2008-09-26 21:26:30 +00:00
Chris Lattner b03dc76499 clean up a bunch of fixme's I added, by moving
DirectoryLookup::DirType into SourceManager.h

llvm-svn: 56692
2008-09-26 21:18:42 +00:00
Daniel Dunbar 94cefefcbb Update LICENSE link.
llvm-svn: 56689
2008-09-26 21:12:29 +00:00
Chris Lattner c88a23e8d7 Fix the rest of rdar://6243860 hopefully. This requires changing FileIDInfo
to whether the fileid is a 'extern c system header' in addition to whether it
is a system header, most of this is spreading plumbing around.  Once we have that,
PPLexerChange bases its "file enter/exit" notifications to PPCallbacks to
base the system header state on FileIDInfo instead of HeaderSearch.  Finally,
in Preprocessor::HandleIncludeDirective, mirror logic in GCC: the system headerness
of a file being entered can be set due to the #includer or the #includee.

llvm-svn: 56688
2008-09-26 20:12:23 +00:00