Commit Graph

57775 Commits

Author SHA1 Message Date
Chris Lattner fa6059ff2f rename test
llvm-svn: 68900
2009-04-12 09:04:18 +00:00
Chris Lattner 0d5640c7be Fix rdar://6770142 - Class and qualified id's are compatible, just like
Class and unqualified id's are.

llvm-svn: 68899
2009-04-12 09:02:39 +00:00
Chris Lattner baa405fc4c rename test
llvm-svn: 68898
2009-04-12 08:47:09 +00:00
Chris Lattner 98b30412ab merge protocol-test-1.m -> protocol-test-2.m
llvm-svn: 68897
2009-04-12 08:46:44 +00:00
Chris Lattner 7a9c6d2973 Merge forward-circular into protocol-test-2
llvm-svn: 68896
2009-04-12 08:45:55 +00:00
Chris Lattner 10644fac2f this test is subsumed by protocol-test-2.m
llvm-svn: 68895
2009-04-12 08:44:47 +00:00
Chris Lattner dac168d2a6 Fix rdar://6771034: don't warn on use of forward declared protocol in protocol
list of another protocol definition.  This warning is very noisy and GCC doesn't
produce it so existing code doesn't expect it.

llvm-svn: 68894
2009-04-12 08:43:13 +00:00
Chris Lattner 1c7b885f5f fix typo in test name.
llvm-svn: 68893
2009-04-12 08:37:16 +00:00
Chris Lattner 261b6a5c3a call objc interfaces just "interfaces" in diagnostics, not "Objective-C types"
or "Objective-C interface types" etc.

llvm-svn: 68892
2009-04-12 08:25:48 +00:00
Chris Lattner a8a7d0f371 implement rdar://6780761, making sema reject some code that otherwise
crashes codegen.

llvm-svn: 68891
2009-04-12 08:11:20 +00:00
Chris Lattner ce6bcf0847 fix a cross-block fastisel crash handling overflow intrinsics.
See comment for details.  This fixes rdar://6772169

llvm-svn: 68890
2009-04-12 07:51:14 +00:00
Chris Lattner a101f6f8d3 make UpdateValueMap handle the possiblity that we could be
copying into the right register, avoiding a copy.

llvm-svn: 68889
2009-04-12 07:46:30 +00:00
Chris Lattner ada5d6c37e optimize FastISel::UpdateValueMap to avoid duplicate map lookups,
and make it return the assigned register.

llvm-svn: 68888
2009-04-12 07:45:01 +00:00
Chris Lattner 99a8cb627d simplify code by using IntrinsicInst.
llvm-svn: 68887
2009-04-12 07:36:01 +00:00
Chris Lattner 24ac95abc1 Add new TargetInstrDesc::hasImplicitUseOfPhysReg and
hasImplicitDefOfPhysReg methods.  Use them to remove a 
look in X86 fast isel.

llvm-svn: 68886
2009-04-12 07:26:51 +00:00
Chris Lattner 91b6af24ac add some optimizations for strncpy/strncat and factor some
code.  Patch by Benjamin Kramer!

llvm-svn: 68885
2009-04-12 05:06:39 +00:00
Chris Lattner cac63f359e Implement support for GCC's -dD mode, which dumps -E output *and*
macro definitions.

llvm-svn: 68884
2009-04-12 01:56:53 +00:00
Chris Lattner 928e9096cb add a ppcallback hook for macro definitions.
llvm-svn: 68883
2009-04-12 01:39:54 +00:00
Chris Lattner c523d8e88c now that we have an identifier table in the PCH file, finish hooking up
macro deserialization.  We now correctly install II's in tokens, handle
function-like macros, etc.

llvm-svn: 68882
2009-04-11 21:15:38 +00:00
Chris Lattner 28d198177f test this in non-pch mode as well as in pch mode.
llvm-svn: 68881
2009-04-11 20:52:19 +00:00
Chris Lattner 5300accc7a improve location info for property stuff. In a property like this:
@property int x;

associate the location of X with the property decl, not the location
of the @.  Also, pass this info along to the synthesized ParmVarDecls
so that redefinition and other diagnostics can use it.  This eliminates
a fixme.

llvm-svn: 68880
2009-04-11 20:14:49 +00:00
Chris Lattner 67f35b051b improve the 'conflicting types' diagnostics to include correct location info, now
that it is plumbed through Sema.  On a file from growl, we used to emit:

t.mi:107059:1: warning: conflicting types for 'removePluginHandler:forPluginTypes:'
- (void) removePluginHandler:(id <GrowlPluginHandler>)handler forPluginTypes:(NSSet *)extensions {
^
t.mi:105280:1: note: previous definition is here
- (void) removePluginHandler:(id <NSObject>)handler forPluginTypes:(NSSet *)types;
^

now we produce:

t.mi:107059:55: warning: conflicting parameter types in implementation of 'removePluginHandler:forPluginTypes:': 'id<NSObject>' vs 'id<GrowlPluginHandler>'
- (void) removePluginHandler:(id <GrowlPluginHandler>)handler forPluginTypes:(NSSet *)extensions {
                                                      ^
t.mi:105280:45: note: previous definition is here
- (void) removePluginHandler:(id <NSObject>)handler forPluginTypes:(NSSet *)types;
                                            ^

We still don't have proper loc info for properties, hence the FIXME.

rdar://6782494

llvm-svn: 68879
2009-04-11 19:58:42 +00:00
Chris Lattner 03a6cbbd91 pass -fblocks
llvm-svn: 68878
2009-04-11 19:49:49 +00:00
Chris Lattner 23b0faf031 Set proper location info on objc method arguments.
llvm-svn: 68877
2009-04-11 19:42:43 +00:00
Chris Lattner 9713a1c91d simplify code to use adjustParameterType, apply objc arg attributes
to their arguments.

llvm-svn: 68876
2009-04-11 19:34:56 +00:00
Chris Lattner 6de05080e4 fix blocks to reject objc interfaces returned by value. Also,
a block without a prototype should still coerce a return in it to
use the declared return type.

llvm-svn: 68875
2009-04-11 19:27:54 +00:00
Chris Lattner 80718823ae fix test
llvm-svn: 68874
2009-04-11 19:18:22 +00:00
Chris Lattner 347eec9d84 diagnose attempts to return objc interfaces by-value from C functions.
llvm-svn: 68873
2009-04-11 19:17:25 +00:00
Chris Lattner de5a531677 Improve the 'cannot pass objc interface by value' diagnostic:
1) improve localizability by not passing english strings in.
2) improve location for arguments.
3) print the objc type being passed.

Before:
method-bad-param.m:15:1: error: Objective-C type cannot be passed by value
-(void) my_method:(foo) my_param
^

after:
method-bad-param.m:15:25: error: Objective-C interface type 'foo' cannot be passed by value
-(void) my_method:(foo) my_param
                        ^

llvm-svn: 68872
2009-04-11 19:08:56 +00:00
Chris Lattner d8626fd283 change the interface to ActOnMethodDeclaration to pass down argument
information in a little struct instead of individually.  While we're
at it, add per-argument loc info and attribute info.

llvm-svn: 68871
2009-04-11 18:57:04 +00:00
Fariborz Jahanian a4f6b6b180 Minor refactoring of my last patch.
llvm-svn: 68870
2009-04-11 18:54:57 +00:00
Chris Lattner 7e0fe4458c sink abstract typedefs like Action::ExprTy from the Action class
down to the ActionBase class.  This eliminates dependencies of (e.g.)
DeclSpec.h on Action.h, meaning that action.h can now include these
headers and use their types directly in the actions interfaces.

This is a refactoring to support a future change, no functionality
change.

llvm-svn: 68869
2009-04-11 18:48:18 +00:00
Chris Lattner 225dd6c830 add some #includes for better compatibility with gcc 4.4,
thanks to Tobias Stadler for pointing this out.

llvm-svn: 68868
2009-04-11 18:40:46 +00:00
Chris Lattner 4f472a325a rename Parser::ParseObjCSelector -> Parser::ParseObjCSelectorPiece,
since it only parses one identifier out of the selector, not the 
whole thing.

llvm-svn: 68867
2009-04-11 18:13:45 +00:00
Chris Lattner a9d0ffe57e simplify this code to not bother stripping to canonical types, and
indent code properly

llvm-svn: 68866
2009-04-11 18:01:59 +00:00
Fariborz Jahanian aae4349df9 Fixes a ir-gen crash for K&R style blocks.
llvm-svn: 68865
2009-04-11 17:55:15 +00:00
Chris Lattner 9edfeed6b8 add radar number
llvm-svn: 68864
2009-04-11 17:26:58 +00:00
Dan Gohman 825236b116 Revert r68847. It breaks the build on non-Darwin targets, with this message
from the assembler:

Error: unknown pseudo-op: `.debug_inlined'
llvm-svn: 68863
2009-04-11 15:57:04 +00:00
Ted Kremenek be4fe9e239 Update analyzer build.
llvm-svn: 68860
2009-04-11 04:57:08 +00:00
Ted Kremenek 52ca69ebf3 analyzer: We cannot bind values to CodeTextRegions.
llvm-svn: 68857
2009-04-11 02:32:27 +00:00
Daniel Dunbar 343f4ba18f Tweak wording, input argument isn't necessarily a "file", things like
-lstdc++ are inputs too.

llvm-svn: 68854
2009-04-11 02:06:32 +00:00
Anders Carlsson d8281f1589 Don't mangle variables that are at translation unit scope.
llvm-svn: 68853
2009-04-11 01:19:45 +00:00
Anders Carlsson d8e39bbb84 Add support for generating reference initialization code.
llvm-svn: 68852
2009-04-11 01:08:03 +00:00
Ted Kremenek 4531be138c Add analyzer support for objc_atomicCompareAndSwap()
llvm-svn: 68849
2009-04-11 00:54:13 +00:00
Devang Patel 790e60999e Keep track of inlined functions and their locations. This information is collected when nested llvm.dbg.func.start intrinsics are seen. (Right now, inliner removes nested llvm.dbg.func.start intrinisics during inlining.)
Create debug_inlined dwarf section using these information. This info is used by gdb, at least on Darwin, to enable better experience debugging inlined functions. See DwarfWriter.cpp for more information on structure of debug_inlined section.

llvm-svn: 68847
2009-04-11 00:16:47 +00:00
Douglas Gregor 3ed42cb0b3 Store unique IDs for identifiers in the PCH file. Use some bitmangling
so that we only need to perform the lookup and identifier resolution
once per identifier in the PCH file.

llvm-svn: 68846
2009-04-11 00:14:32 +00:00
Ted Kremenek df24000d24 Implement analyzer support for OSCompareAndSwap. This required pushing "tagged"
ProgramPoints all the way through to GRCoreEngine.

NSString.m now fails with RegionStoreManager because of the void** cast.
Disabling use of region store for that test for now.

llvm-svn: 68845
2009-04-11 00:11:10 +00:00
Fariborz Jahanian d381cde486 Non-pointer objects are none gc'able regardles of
the attribute set on them.

llvm-svn: 68844
2009-04-11 00:00:54 +00:00
Chris Lattner 4d59f88e60 move a target-specific test into its directory so it isn't run if you
don't configure the ARM target in.

llvm-svn: 68843
2009-04-10 23:58:38 +00:00
Douglas Gregor 92863e475e Compare the predefines buffer in the PCH file with the predefines
buffer generated for the current translation unit. If they are
different, complain and then ignore the PCH file. This effectively
checks for all compilation options that somehow would affect
preprocessor state (-D, -U, -include, the dreaded -imacros, etc.).

When we do accept the PCH file, throw away the contents of the
predefines buffer rather than parsing them, since all of the results
of that parsing are already stored in the PCH file. This eliminates
the ugliness with the redefinition of __builtin_va_list, among other
things.

llvm-svn: 68838
2009-04-10 23:10:45 +00:00