Commit Graph

57929 Commits

Author SHA1 Message Date
Fariborz Jahanian 6c6aea914a Diagnose properties which have no implementations;
either unimplemented setter/getter or no
implementation directive.

llvm-svn: 69098
2009-04-14 23:15:21 +00:00
Daniel Dunbar 3241fae46c Set alignment on __cstring metadata variables to 1 (matching
llvm-gcc).

llvm-svn: 69097
2009-04-14 23:14:47 +00:00
Dan Gohman 86e43e7999 Fix the RUN lines so that this test actually tests.
llvm-svn: 69096
2009-04-14 22:50:17 +00:00
Dan Gohman 62f4498646 For the h-register addressing-mode trick, use the correct value for
any non-address uses of the address value. This fixes 186.crafty.

llvm-svn: 69094
2009-04-14 22:45:05 +00:00
Daniel Dunbar 729df96bf5 Avoid use of magic \01 prefix when unneeded.
llvm-svn: 69093
2009-04-14 22:44:26 +00:00
Chris Lattner faa1dbb4d0 add fixitrewriter to xcode proj
llvm-svn: 69092
2009-04-14 22:44:23 +00:00
Daniel Dunbar 346892aafc Comment fix.
llvm-svn: 69091
2009-04-14 22:41:13 +00:00
Evan Cheng 3f1a3008f4 Mac OS X 10.6 and above do not use key manager to register EH frames.
llvm-svn: 69090
2009-04-14 22:31:59 +00:00
Dan Gohman e5cd1fcdb9 When the result of an EXTRACT_SUBREG, INSERT_SUBREG, or SUBREG_TO_REG
operator is used by a CopyToReg to export the value to a different
block, don't reuse the CopyToReg's register for the subreg operation
result if the register isn't precisely the right class for the
subreg operation.

Also, rename the h-registers.ll test, now that there are more
than one.

llvm-svn: 69087
2009-04-14 22:17:14 +00:00
Chris Lattner b4a8fe8dcc Make the implicit-int handling error recovery stuff handle C++
nested name specifiers.  Now we emit stuff like:

t.cpp:8:13: error: unknown type name 'X'
static foo::X  P;
       ~~~~ ^

instead of:

t.cpp:8:16: error: invalid token after top level declarator
static foo::X  P;
               ^

This is inspired by a really awful error message I got from 
g++ when I misspelt diag::kind as diag::Kind.

llvm-svn: 69086
2009-04-14 22:17:06 +00:00
Douglas Gregor e0a3a51637 Add PCH support for PredefinedExpr and FloatingLiteral expressions
llvm-svn: 69084
2009-04-14 21:55:33 +00:00
Chris Lattner 20a0c61487 refactor "implicit int error recovery" code out of
ParseDeclarationSpecifiers into its own function, no
functionality change.

llvm-svn: 69083
2009-04-14 21:34:55 +00:00
Mikhail Glushenkov 60cde5ba7c Call CreateProcess with bInheritHandles = TRUE.
Makes llvmc show error messages printed by child processes when run from the
Cygwin/MSYS shell. Since ExecuteAndWait does not return until the child program
has finished execution, this change should be harmless.

llvm-svn: 69082
2009-04-14 21:31:36 +00:00
Mikhail Glushenkov 3a62efb732 Delete trailing whitespace.
llvm-svn: 69081
2009-04-14 21:31:14 +00:00
Douglas Gregor feb84b0074 PCH support for a few very, very simple kinds of expressions. Hook up
expression (de-)serialization for VLAs, variable initializers,
enum constant initializers, and bitfield widths.

llvm-svn: 69075
2009-04-14 21:18:50 +00:00
Chris Lattner a723ba97db Fix a regression in a previous patch that broke implicit
int in a bitfield.  Shantonu found this in a gcc testsuite file.

llvm-svn: 69074
2009-04-14 21:16:09 +00:00
Steve Naroff 5196c618fb Fix <rdar://problem/6252084> [sema] jumps into Obj-C exception blocks should be disallowed.
This builds on Eli's work from http://llvm.org/viewvc/llvm-project?view=rev&revision=65678.

llvm-svn: 69073
2009-04-14 20:53:38 +00:00
Chris Lattner b874dbd478 add support for -W[no-]extra-tokens
llvm-svn: 69071
2009-04-14 20:36:01 +00:00
Chris Lattner 28549de12c remove dead enum
llvm-svn: 69070
2009-04-14 20:30:29 +00:00
Chris Lattner bae0e68930 Fix PR3988: extern inline functions get strong symbol definitions in
C99 mode.  This is a regression from an earlier patch of mine.

This also simplifies the linkage enums a bit.

llvm-svn: 69069
2009-04-14 20:25:53 +00:00
Fariborz Jahanian 899e7eb6c7 Do not dead code strip global meta-data objects.
This will match gcc's behavior in the arena.

llvm-svn: 69061
2009-04-14 18:41:56 +00:00
Mike Stump d73e4419f5 Fixup whitespacing.
llvm-svn: 69055
2009-04-14 18:24:37 +00:00
Chris Lattner 66037791b1 temporarily revert r69046
llvm-svn: 69054
2009-04-14 18:05:08 +00:00
Daniel Dunbar 4527d30c3d Fix comment.
llvm-svn: 69053
2009-04-14 17:42:51 +00:00
Douglas Gregor db908332e3 Add a tricky, tricky test case for PCH that we currently don't handle. Committed with a FIXME so that we don't forget it
llvm-svn: 69052
2009-04-14 17:10:28 +00:00
Chris Lattner 4225e23e62 implement some sema for gnuc_inline attribute. Reject always_inline and no_inline on objc methods.
llvm-svn: 69051
2009-04-14 17:02:11 +00:00
Anders Carlsson a5d077df73 Support code generation of 'this' exprs
llvm-svn: 69050
2009-04-14 16:58:56 +00:00
Evan Cheng dfbbf5c043 Some of GR8_NOREX registers are only available in 64-bit mode.
llvm-svn: 69049
2009-04-14 16:57:43 +00:00
Sanjiv Gupta 69650b099a Literal value calculation isn't likely to overflow on targets having int as 32 or less. Fixing the assert as it otherwise triggers for PIC16 which as i16 as int.
llvm-svn: 69046
2009-04-14 16:46:37 +00:00
Chris Lattner 02e987f3e8 implement codegen support for __attribute((__gnuc_inline__)),
pulling some attribute munging stuff into GetLinkageForFunction.

This should fix PR3986

llvm-svn: 69045
2009-04-14 16:44:36 +00:00
Chris Lattner eaad6b70a9 recognize the gnuc_inline attribute.
llvm-svn: 69044
2009-04-14 16:30:50 +00:00
Douglas Gregor 54feb84489 When building a PCH file, don't perform end-of-translation-unit
wrap-up (e.g., turning tentative definitions into definitions). Also,
very that, when we actually use the PCH file, we get the ride code
generation for tentative definitions and definitions that show up in
the PCH file.

llvm-svn: 69043
2009-04-14 16:27:31 +00:00
Steve Naroff 06f440dd7b ASTContext::mergeTypes(): Loosen up the type checking for 'Class' (treating it like 'id').
This fixes <rdar://problem/6782722> XCDataTipsManager.m registers, observes notifications in class methods.

The radar above is the result of clang typing 'self' in a class method as 'Class', which results in some spurious warnings (GCC types 'self' in a class method as 'id').

I considered changing the type of 'self' to 'id' (to conform to GCC), however this resulted in *many* test cases breaking. In addition, I really prefer a more strongly typed 'self'.

All in all, this is the least obtrusive fix I could find for removing the spurious warnings (though we do loose some valid warnings).

llvm-svn: 69041
2009-04-14 15:11:46 +00:00
Daniel Dunbar 389325715b Refactor how attributes are set on values.
- Pull out SetCommonAttributes, which handles the things common to
   aliases, methods, functions, and variables.

 - Pull out SetLLVMFunctionAttributesForDefinition, which handles the
   LLVM attributes which we only want to apply to a definition (like
   noinline and alwaysinline).

 - Kill SetGVDeclarationAttributes (inlined into SetFunctionAttributes
   and specialized).

 - Kill SetFunctionAttributesForDefinition (inlined into sole caller).

 - Inline SetGVDefinitionAttributes into SetMethodAttributes and
   specialize.

 - Rename SetGVDefinitionAttributes to SetFunctionDefinitionAttributes.

This is supposed to be a no functionality change commit, but I may
have made a mistake.

llvm-svn: 69036
2009-04-14 08:05:55 +00:00
Daniel Dunbar 81a3f1bdf3 Split SetGlobalValueAttributes into definition/declaration halves.
- No functionality change.

llvm-svn: 69035
2009-04-14 07:19:20 +00:00
Daniel Dunbar aeddffc99d Rename (one) SetFunctionAttributes to SetLLVMFunctionAttributes to
disambiguate it.
 - No functionality change.

llvm-svn: 69034
2009-04-14 07:08:30 +00:00
Daniel Dunbar 64a41cb39e Reduce indentation, no functionality change.
llvm-svn: 69033
2009-04-14 07:02:17 +00:00
Chris Lattner 92028dad66 defer emission of always_inline, extern_inline, and inline functions (when
not in c89 mode).

llvm-svn: 69032
2009-04-14 06:44:48 +00:00
Chris Lattner 169a5c963f give always_inline functions internal linkage. If they cannot be
inlined for some reason, then we don't want a strong or even weak
definition.

llvm-svn: 69031
2009-04-14 06:32:05 +00:00
Chris Lattner 256c9507c8 set the linkage of an inline function according to its language rules.
llvm-svn: 69030
2009-04-14 06:27:57 +00:00
Daniel Dunbar 29eff88fc8 Add a comment on SetGlobalValueAttributes.
llvm-svn: 69029
2009-04-14 06:19:49 +00:00
Chris Lattner 3e031f4121 add a new enum type for linkage, no functionality change.
llvm-svn: 69028
2009-04-14 06:04:17 +00:00
Daniel Dunbar f5f359fb73 Clean up handling of visibility.
llvm-svn: 69027
2009-04-14 06:00:08 +00:00
Chris Lattner 73920ce565 reduce indentation, no functionality change.
llvm-svn: 69026
2009-04-14 05:33:52 +00:00
Chris Lattner 6a0f907a5e do not set visibility on "private" or "available externally" linkage objects.
llvm-svn: 69025
2009-04-14 05:27:13 +00:00
Chris Lattner 825676afdf Offer a fixit hint for our warning about tokens at the end of a directive:
t.c:3:8: warning: extra tokens at end of #endif directive
#endif foo
       ^
       //

Don't do this in strict-C89 mode because bcpl comments aren't 
valid there, and it is too much trouble to analyze whether
C block comments are safe.

llvm-svn: 69024
2009-04-14 05:15:20 +00:00
Chris Lattner ce2ab6f425 Fix the #import / #include_next "extra tokens at end of #foo directive"
Warning to properly report that it is an import/include_next instead of
claiming it is a #include.

llvm-svn: 69023
2009-04-14 05:07:49 +00:00
Sanjiv Gupta 92bb846e2b Handle aggregate type arguments to direct and indirect calls.
llvm-svn: 69022
2009-04-14 02:49:52 +00:00
Mike Stump 4c0dc0e48a Use hasAttr instead of getAttr for conditionals.
llvm-svn: 69021
2009-04-14 02:45:29 +00:00
Daniel Dunbar 0ca1660129 Audit __private_extern__ handling.
- Exposed quite a few Sema issues and a CodeGen crash.

 - See FIXMEs in test case, and in SemaDecl.cpp (PR3983).

I'm skeptical that __private_extern__ should actually be a storage
class value. I think that __private_extern__ basically amounts to
  extern A __attribute__((visibility("hidden")))
and would be better off handled (a) as that, or (b) with an extra bit
in the VarDecl.

llvm-svn: 69020
2009-04-14 02:25:56 +00:00