Commit Graph

3177 Commits

Author SHA1 Message Date
Chris Lattner 2ff698df60 Implement basic support for parsing #pragma comment, a microsoft extension
documented here:
http://msdn.microsoft.com/en-us/library/7f0aews7(VS.80).aspx

This is according to my understanding reading the docs, I don't know if it
really agrees fully with what VC++ allows.

llvm-svn: 62317
2009-01-16 08:21:25 +00:00
Chris Lattner 8a42586c54 more SourceLocation lexicon change: instead of referring to the
"logical" location, refer to the "instantiation" location.

llvm-svn: 62316
2009-01-16 07:36:28 +00:00
Chris Lattner 3c91971b33 rename "virtual location" of a macro to "instantiation location".
llvm-svn: 62315
2009-01-16 07:15:35 +00:00
Chris Lattner c4c181902e rename PP::getPhysicalCharacterAt -> PP::getSpelledCharacterAt.
Slightly speed up sema of numbers like '1' by going directly to 
TargetInfo instead of through ASTContext.

llvm-svn: 62314
2009-01-16 07:10:29 +00:00
Chris Lattner 7c8556e7bc remove obsolete comment which happened to go over 80 cols.
llvm-svn: 62313
2009-01-16 07:04:11 +00:00
Chris Lattner 15af77f679 remove an unneeded const_cast.
llvm-svn: 62311
2009-01-16 07:02:14 +00:00
Chris Lattner 53e384f633 Change some terminology in SourceLocation: instead of referring to
the "physical" location of tokens, refer to the "spelling" location.
This is more concrete and useful, tokens aren't really physical objects!

llvm-svn: 62309
2009-01-16 07:00:02 +00:00
Douglas Gregor 2b5d430096 Don't advance the statement iterator after we've deallocated the statement
llvm-svn: 62306
2009-01-16 06:50:08 +00:00
Zhongxing Xu ac8ef9ea4c Extract code dealing with typedef declarators into a separate function.
No functionality change.

llvm-svn: 62303
2009-01-16 03:34:13 +00:00
Zhongxing Xu 9b7714d909 Extract code dealing with variable declarator into a separate function.
No functionality change.

llvm-svn: 62300
2009-01-16 02:36:34 +00:00
Daniel Dunbar f557d831a7 Attempt to unbreak Windows build.
llvm-svn: 62295
2009-01-16 01:50:29 +00:00
Fariborz Jahanian dae9276090 postpone sizeof objc-class computatin to the clients.
llvm-svn: 62292
2009-01-16 01:42:12 +00:00
Zhongxing Xu bece5d61f6 Extract code dealing with declarators of function type into a separate function
Sema::ActOnFunctionDeclarator().  
No functionality change.  

llvm-svn: 62290
2009-01-16 01:13:29 +00:00
Fariborz Jahanian c5ece68d16 Implemented code gen for sizeof(objc class interface).
llvm-svn: 62289
2009-01-16 00:57:08 +00:00
Douglas Gregor 1c846b0e86 Improve diagnostics for ambiguous name lookup results
llvm-svn: 62287
2009-01-16 00:38:09 +00:00
Nuno Lopes 7ffcf93b24 add codegen support to union casts
init of static vars still not working. I'll get back to it tomorrow or so

llvm-svn: 62278
2009-01-15 20:14:33 +00:00
Ted Kremenek 4bbb79a642 PTH: Fix termination condition in binary search.
llvm-svn: 62277
2009-01-15 19:28:38 +00:00
Chris Lattner e53c036d85 PR3330: given an enum like this:
enum E {
 A = 1U,
 B
};

Don't make an implicit cast expr of null for B.

llvm-svn: 62274
2009-01-15 19:19:42 +00:00
Ted Kremenek a705b04d7f IdentifierInfo:
- IdentifierInfo can now (optionally) have its string data not be
  co-located with itself.  This is for use with PTH.  This aspect is a
  little gross, as getName() and getLength() now make assumptions
  about a possible alternate representation of IdentifierInfo.
  Perhaps we should make IdentifierInfo have virtual methods?

IdentifierTable:
- Added class "IdentifierInfoLookup" that can be used by
  IdentifierTable to perform "string -> IdentifierInfo" lookups using
  an auxilliary data structure.  This is used by PTH.
- Perform tests show that IdentifierTable::get() does not slow down
  because of the extra check for the IdentiferInfoLookup object (the
  regular StringMap lookup does enough work to mitigate the impact of
  an extra null pointer check).
- The upshot is that now that some IdentifierInfo objects might be
  owned by the IdentiferInfoLookup object.  This should be reviewed.

PTH:
- Modified PTHManager::GetIdentifierInfo to *not* insert entries in
  IdentifierTable's string map, and instead create IdentifierInfo
  objects on the fly when mapping from persistent IDs to
  IdentifierInfos.  This saves a ton of work with string copies,
  hashing, and StringMap lookup and resizing.  This change was
  motivated because when processing source files in the PTH cache we
  don't need to do any string -> IdentifierInfo lookups.
- PTHManager now subclasses IdentifierInfoLookup, allowing clients of
  IdentifierTable to transparently use IdentifierInfo objects managed
  by the PTH file.  PTHManager resolves "string -> IdentifierInfo"
  queries by doing a binary search over a sorted table of identifier
  strings in the PTH file (the exact algorithm we use can be changed
  as needed).

These changes lead to the following performance changes when using PTH on Cocoa.h:
- fsyntax-only: 10% performance improvement
- Eonly: 30% performance improvement

llvm-svn: 62273
2009-01-15 18:47:46 +00:00
Daniel Dunbar 435bbe0254 Fix some unused variable, control reaches end of non-void function,
and uninitialized use options.

llvm-svn: 62270
2009-01-15 18:32:35 +00:00
Daniel Dunbar 707f6436e0 Add dummy X86_64 ABIInfo implementation.
llvm-svn: 62268
2009-01-15 18:18:40 +00:00
Nuno Lopes 6be2939d5d add support for initializing static vars with a cast to union (gcc extension)
llvm-svn: 62261
2009-01-15 16:44:45 +00:00
Seo Sanghyeon 39a3ebf8f0 PR2746: Implement GCC cast to union extension
llvm-svn: 62255
2009-01-15 04:51:39 +00:00
Douglas Gregor 41c8ba80de Deallocate the BasePaths structure that we allocate for LookupResult.
llvm-svn: 62250
2009-01-15 02:19:31 +00:00
Ted Kremenek bef9fc2240 PTH: Embed a persistentID side-table in the PTH file that is sorted in the
lexical order of the corresponding identifier strings. This will be used for a
forthcoming optimization. This slows down PTH generation time by 7%. We can
revert this change if the optimization proves to not be valuable.

llvm-svn: 62248
2009-01-15 01:26:25 +00:00
Douglas Gregor 960b5bc7c1 Initial implementation of member name lookup
llvm-svn: 62247
2009-01-15 00:26:24 +00:00
Douglas Gregor 3407432644 Refactor name lookup.
This change refactors and cleans up our handling of name lookup with
LookupDecl. There are several aspects to this refactoring:

  - The criteria for name lookup is now encapsulated into the class
  LookupCriteria, which replaces the hideous set of boolean values
  that LookupDecl currently has.

  - The results of name lookup are returned in a new class
  LookupResult, which can lazily build OverloadedFunctionDecls for
  overloaded function sets (and, eventually, eliminate the need to
  allocate member for OverloadedFunctionDecls) and contains a
  placeholder for handling ambiguous name lookup (for C++).

  - The primary entry points for name lookup are now LookupName (for
    unqualified name lookup) and LookupQualifiedName (for qualified
    name lookup). There is also a convenience function
    LookupParsedName that handles qualified/unqualified name lookup
    when given a scope specifier. Together, these routines are meant
    to gradually replace the kludgy LookupDecl, but this won't happen
    until after we have base class lookup (which forces us to cope
    with ambiguities).

  - Documented the heck out of name lookup. Experimenting a little
    with using Doxygen's member groups to make some sense of the Sema
    class. Feedback welcome!

  - Fixes some lingering issues with name lookup for
  nested-name-specifiers, which now goes through
  LookupName/LookupQualifiedName. 

llvm-svn: 62245
2009-01-14 22:20:51 +00:00
Fariborz Jahanian f2a3120b77 Patch to keep clang honest that it does not yet support
explicit return type on block literals.

llvm-svn: 62240
2009-01-14 19:39:53 +00:00
Douglas Gregor 5fb5397238 Introduce support for C++0x explicit conversion operators (N2437)
Small cleanup in the handling of user-defined conversions. 

Also, implement an optimization when constructing a call. We avoid
recomputing implicit conversion sequences and instead use those
conversion sequences that we computed as part of overload resolution.

llvm-svn: 62231
2009-01-14 15:45:31 +00:00
Steve Naroff 5de9b58bd2 Fix a subtle bug in DeclContext::DestroyDecls().
llvm-svn: 62205
2009-01-14 01:27:31 +00:00
Ted Kremenek 4ba36fcc3f FunctionDecl::setParams() now uses the allocator associated with ASTContext to allocate the array of ParmVarDecl*'s.
llvm-svn: 62203
2009-01-14 00:42:25 +00:00
Fariborz Jahanian 255c0958dd Implemenent objective-c's NSObject attribute as a way of ddeclaraing c-type
objects as an objective-c object.

llvm-svn: 62197
2009-01-13 23:34:40 +00:00
Ted Kremenek e9814186ac PTH:
- Use canonical FileID when using getSpelling() caching.  This
  addresses some cache misses we were seeing with -fsyntax-only on
  Cocoa.h
- Added Preprocessor::getPhysicalCharacterAt() utility method for
  clients to grab the first character at a specified sourcelocation.
  This uses the PTH spelling cache.
- Modified Sema::ActOnNumericConstant() to use
  Preprocessor::getPhysicalCharacterAt() instead of
  SourceManager::getCharacterData() (to get PTH hits).

These changes cause -fsyntax-only to not page in any sources from
Cocoa.h.  We see a speedup of 27%.

llvm-svn: 62193
2009-01-13 23:19:12 +00:00
Douglas Gregor 2b136fe2a5 Permitting typedefs without a name is a Microsoft/GNU extension
llvm-svn: 62192
2009-01-13 23:10:51 +00:00
Ted Kremenek 7cbdcc25d4 Fix corner cases in PTH getSpelling() binary search.
llvm-svn: 62187
2009-01-13 22:16:45 +00:00
Ted Kremenek b0b4f74b6b PTH: Fix remaining cases where the spelling cache in the PTH file was being missed when it shouldn't. This shaves another 7% off PTH time for -Eonly on Cocoa.h
llvm-svn: 62186
2009-01-13 22:05:50 +00:00
Douglas Gregor 89100920d6 Turn off some Destroy calls that are currenly causing double-destruction of ScopedDecls. We will re-enable this later, when we have time to fully solve the ownership issue.
llvm-svn: 62175
2009-01-13 19:47:12 +00:00
Anders Carlsson bc12e92068 Use the unqualified type for GCCs struct/union cast extension
llvm-svn: 62170
2009-01-13 17:00:51 +00:00
Anders Carlsson 6393773c4b Warn when someone tries to pass a variable with a non-POD type to a varargs function/method/block.
llvm-svn: 62148
2009-01-13 05:48:52 +00:00
Douglas Gregor 02a0acd0bc Fix argument-passing bugs in a call to object
llvm-svn: 62147
2009-01-13 05:10:00 +00:00
Zhongxing Xu 2436f86024 add a fixme.
llvm-svn: 62142
2009-01-13 03:07:41 +00:00
Daniel Dunbar dec798bf37 Bug fix, __private_extern__ globals were always introducing a definition.
llvm-svn: 62139
2009-01-13 02:25:00 +00:00
Zhongxing Xu cff637a568 Add KillStruct to region store.
- put the killed region in the kill set.
 - set its default value to unknown.
 - removes all bindings for its subregions.  

llvm-svn: 62138
2009-01-13 01:49:57 +00:00
Fariborz Jahanian 5c76772f49 Patch to fix encoding of Enum bitfields in ObjC.
llvm-svn: 62135
2009-01-13 01:18:13 +00:00
Ted Kremenek eb68db238f static analyzer: Handle casts from arrays to integers. This fixes PR 3297.
llvm-svn: 62130
2009-01-13 01:04:21 +00:00
Ted Kremenek 167f2fa5f4 Invert condition on branch (was causing RegionStore::ArrayToPointer to return 'unknown' on most cases.
llvm-svn: 62129
2009-01-13 01:03:27 +00:00
Douglas Gregor c5e61070f6 Add the proper restrictions on the left-hand argument of a built-in
assignment operator candidate (C++ [over.match.oper]p4).

llvm-svn: 62128
2009-01-13 00:52:54 +00:00
Douglas Gregor f399ef43c7 Make sure we don't name a constructor or destructor with a qualified
type. It leads to very weird errors.

llvm-svn: 62124
2009-01-13 00:11:19 +00:00
Fariborz Jahanian 30e7864661 Patch to implement code gen for aggrgate-valued property used
to access a field of its type.

llvm-svn: 62123
2009-01-12 23:27:26 +00:00
Douglas Gregor b3730b50c7 Cleanup DeclContext::addDecl and DeclContext::insert interface, from Piotr Rak
llvm-svn: 62122
2009-01-12 23:27:07 +00:00
Ted Kremenek 6dfeb55897 Patch by Roman Divacky:
Extend string-literal checking for printf() format string to handle conditional
ternary operators where both sides are literals.

This fixes PR 3319: http://llvm.org/bugs/show_bug.cgi?id=3319

llvm-svn: 62117
2009-01-12 23:09:09 +00:00
Ted Kremenek 6ae6513ce2 Fix crasher due to use-after-release: DeclContext now owns all ObjCMethodDecls, and shouldn't be released elsewhere.
llvm-svn: 62113
2009-01-12 22:49:54 +00:00
Douglas Gregor c6f58fe266 Implement support for anonymous structs and unions in C. Both C and
C++ handle anonymous structs/unions in the same way. Addresses several
bugs:

  <rdar://problem/6259534>
  <rdar://problem/6481130>
  <rdar://problem/6483159>

The test case in PR clang/1750 now passes with -fsyntax-only, but
CodeGen for inline assembler still fails.

llvm-svn: 62112
2009-01-12 22:49:06 +00:00
Ted Kremenek 7e90422e95 retain/release checker:
- Refactor a bunch of logic in the retain/release checker, making it more
  condense and easier to read.
- Add support for "Create" methods in the DiskArbitration framework

retain/release tests:
- Rename CFDate.m to retain-release.m, and move test from CFString.c to
  retain-release.m
- Add DiskArbitration framework tests cases.
- Add/refine and few more retain/release GC test cases.

llvm-svn: 62106
2009-01-12 21:45:02 +00:00
Daniel Dunbar 62db95e891 (LLVM up) Match TargetData API change in LLVM TOT.
llvm-svn: 62101
2009-01-12 21:08:18 +00:00
Fariborz Jahanian 8e1555c7c3 Patch to supprt case of readonly property being
assigned to when it has user declared setter method
defined in the class implementation (but no declaration in
the class itself).

llvm-svn: 62098
2009-01-12 19:55:42 +00:00
Douglas Gregor 45a33ecce1 Properly set the scope of non-fields declared within a struct, union,
or enum to be outside that struct, union, or enum. Fixes several
regressions: 

  <rdar://problem/6487662>
  <rdar://problem/6487669>
  <rdar://problem/6487684>
  <rdar://problem/6487702>
  PR clang/3305
  PR clang/3312

There is still some work to do in Objective-C++, but this requires
that each of the Objective-C entities (interfaces, implementations,
etc.) to be introduced into the context stack with
PushDeclContext/PopDeclContext. This will be a separate fix, later.

llvm-svn: 62091
2009-01-12 18:45:55 +00:00
Anders Carlsson 00057e4e09 Handle multi-value inputs
llvm-svn: 62069
2009-01-12 02:22:13 +00:00
Anders Carlsson 30c235d182 Make sure to initialize the ConstraintInfo to 0
llvm-svn: 62068
2009-01-12 02:15:29 +00:00
Chris Lattner 5562d19ebe some more minor asqualtype bugs.
llvm-svn: 62064
2009-01-12 00:21:19 +00:00
Chris Lattner d1f748dabc improve some more is*Type predicates to look through asqualtypes.
llvm-svn: 62063
2009-01-12 00:10:42 +00:00
Chris Lattner ebcbce5ec8 simplify these predicates a bit.
llvm-svn: 62061
2009-01-11 23:59:49 +00:00
Nuno Lopes a0abe62904 make ScalarExprEmitter::EmitCompare() emit the expression with the correct type instead of always zext it to an int
this fixes codegen of simple exprs in C++ like 'if (x != 0)'

llvm-svn: 62060
2009-01-11 23:22:37 +00:00
Anders Carlsson 431acd1129 More inline asm fixes
llvm-svn: 62049
2009-01-11 21:23:27 +00:00
Anders Carlsson a948c34b0b Handle readwrite constraints correctly
llvm-svn: 62043
2009-01-11 19:46:50 +00:00
Anders Carlsson 03aaf11502 Forgot to commit this
llvm-svn: 62042
2009-01-11 19:40:10 +00:00
Anders Carlsson da5f56939b Use a common function for emitting asm inputs and remove a FIXME
llvm-svn: 62041
2009-01-11 19:32:54 +00:00
Sebastian Redl f70b683e89 Fix operator precedence.
llvm-svn: 62038
2009-01-11 13:39:06 +00:00
Steve Naroff ba3dc38840 Convert property implementation to DeclContext::addDecl().
This completes the ObjCContainerDecl AST cleanup (for now).

llvm-svn: 62037
2009-01-11 12:47:58 +00:00
Steve Naroff 0c0f5bae80 A few property related cleanups to ObjCContainerDecl AST.
llvm-svn: 62034
2009-01-11 01:06:09 +00:00
Sebastian Redl 6a8002eac7 Convert some more actions to smart pointers.
No performance regression in my basic test.
Also fixed a type error in ActOnFinishSwitchStmt's arguments (body is a stmt).

llvm-svn: 62032
2009-01-11 00:38:46 +00:00
Steve Naroff 5a7dd78ba2 Fix a misleading comment.
llvm-svn: 62031
2009-01-10 22:55:25 +00:00
Fariborz Jahanian 0196a1cd2b This patch fixes the code gen failures which was a fallout from
not merging protocol properties into the classes which
use those protocols. With this patch, all my exceutable
test pass again.

llvm-svn: 62030
2009-01-10 21:06:09 +00:00
Fariborz Jahanian 8630b2d992 Explicit declaration of property setters over-ride
prohibition of 'readonly' properties in an assignment.

llvm-svn: 62028
2009-01-10 18:43:55 +00:00
Douglas Gregor b37080a969 Allow multiple Microsoft calling-convention keywords. Fixes rdar://problem/6486133
llvm-svn: 62018
2009-01-10 00:48:18 +00:00
Fariborz Jahanian d9c238dc9f assert if attempting to code gen. a property setter/getter
coming from a protocol.

llvm-svn: 62017
2009-01-10 00:13:01 +00:00
Douglas Gregor 498b58ceb1 Don't bother setting NextDeclarator for EnumConstantDecls. It isn't used
llvm-svn: 62016
2009-01-09 23:23:35 +00:00
Douglas Gregor 658b9550bb When we see a reference to a struct, class, or union like "struct X"
that is neither a definition nor a forward declaration and where X has
not yet been declared as a tag, introduce a declaration
into the appropriate scope (which is likely *not* to be the current
scope). The rules for the placement of the declaration differ slightly
in C and C++, so we implement both and test the various corner
cases. This implementation isn't 100% correct due to some lingering
issues with the function prototype scope (for a function parameter
list) not being the same scope as the scope of the function
definition. Testcase is FIXME'd; this probably isn't an important issue.

Addresses <rdar://problem/6484805>.

llvm-svn: 62014
2009-01-09 22:42:13 +00:00
Sebastian Redl 6138f2b4d8 Add some comments to the virtual work. Thanks to Doug Gregor for the review.
llvm-svn: 62012
2009-01-09 22:29:03 +00:00
Ted Kremenek 890d44eb7f Dead stores checker: Don't flag dead stores for self-assignments (common escape hatch for 'unused variable' warnings).
llvm-svn: 62010
2009-01-09 22:15:01 +00:00
Ted Kremenek 47b8cf6deb Enhance PTH 'getSpelling' caching:
- Refactor caching logic into a helper class PTHSpellingSearch
- Allow "random accesses" in the spelling cache, thus catching the remaining
  cases where 'getSpelling' wasn't hitting the PTH cache
  
For -Eonly, PTH, Cocoa.h:
- This reduces wall time by 3% (user time unchanged, sys time reduced)
- This reduces the amount of paged source by 1112K.
  The remaining 1112K still being paged in is from somewhere else
  (investigating).

llvm-svn: 62009
2009-01-09 22:05:30 +00:00
Sebastian Redl 020cddcfee Prevent a segfault for vaarg expressions on unsupported architectures.
llvm-svn: 62008
2009-01-09 21:09:38 +00:00
Fariborz Jahanian 519976c4e9 This patch removes mergeProperties and does the property lookup
in designated protocols lazily.

llvm-svn: 62007
2009-01-09 21:04:52 +00:00
Daniel Dunbar 8429dbc753 Implement EmitUnsupportedRValue to generate an appropriately typed RValue.
llvm-svn: 62004
2009-01-09 20:09:28 +00:00
Sebastian Redl 6079525591 Very basic support for pure virtual functions.
llvm-svn: 62003
2009-01-09 19:57:06 +00:00
Douglas Gregor 020713e308 Replace DeclContext's vector of ScopedDecl pointers with a linked list
of ScopedDecls (using the new ScopedDecl::NextDeclInScope
pointer). Performance-wise:

  - It's a net win in memory utilization, since DeclContext is now one
    pointer smaller than it used to be (std::vectors are typically 3
    pointers; we now use 2 pointers) and 
  - Parsing Cocoa.h with -fsyntax-only (with a Release-Asserts Clang)
    is about 1.9% faster than before, most likely because we no longer
    have the memory allocations and copying associated with the
    std::vector.

I'll re-enable serialization of DeclContexts once I've sorted out the
NextDeclarator/NextDeclInScope question.

llvm-svn: 62001
2009-01-09 19:42:16 +00:00
Douglas Gregor c72e645fd6 Make sure that ScopedDecls passed to DeclContext::addDecl are added into their lexical context
llvm-svn: 61998
2009-01-09 18:51:29 +00:00
Douglas Gregor ffca3a21f1 Provide a new kind of iterator, the specific_decl_iterator, that
filters the decls seen by decl_iterator with two criteria: the dynamic
type of the declaration and a run-time predicate described by a member
function. This simplifies EnumDecl, RecordDecl, and ObjCContainerDecl
considerably. It has no measurable performance impact.

llvm-svn: 61994
2009-01-09 17:18:27 +00:00
Daniel Dunbar 93215eca9b Emit more refined "unsupported" error for block expressions.
llvm-svn: 61993
2009-01-09 17:04:29 +00:00
Daniel Dunbar bb197e439d Give "unsupported" error on calls through block pointers instead of
crashes.

llvm-svn: 61992
2009-01-09 16:50:52 +00:00
Steve Naroff b3a8798253 Move property API's up to ObjCContainerDecl (removing a lot of duplicate code).
Add isa/cast/dyncast support for ObjCContainerDecl.
Renamed classprop_iterator/begin/end to prop_iterator/begin/end (the class prefix was confusing).
More simplifications to Sema::ActOnAtEnd()...
Added/changed some FIXME's as a result of the above work.

llvm-svn: 61988
2009-01-09 15:36:25 +00:00
Chris Lattner c7c9ab7947 Fix rdar://6480479 - [parser] infinite loop on invalid input
llvm-svn: 61975
2009-01-09 04:34:13 +00:00
Daniel Dunbar cc1b6e8fce Convert block types in IRgen. This is not the correct type, but
matches llvm-gcc (?).

llvm-svn: 61974
2009-01-09 02:48:46 +00:00
Daniel Dunbar 9b21e63251 Block pointer types are not aggregate types.
llvm-svn: 61973
2009-01-09 02:44:18 +00:00
Daniel Dunbar f4c6616d9d Fix crash on null deference when searching for readwrite properties in
categories.
 - Also, simplify nesting via early return.

llvm-svn: 61968
2009-01-09 01:04:21 +00:00
Douglas Gregor c25d7a7fe0 Addressed the issue in <rdar://problem/6479085>, where we failed to
rewrite @class declarations that showed up within linkage
specifications because those @class declarations never made it any
place where the rewriter could find them.

Moved all of the ObjC*Decl nodes over to ScopedDecls, so that they can
live in the appropriate top-level or transparent DeclContext near the
top level, e.g., TranslationUnitDecl or LinkageSpecDecl. Objective-C
declarations now show up in a traversal of the declarations in a
DeclContext (they didn't before!). This way, the rewriter finds all
Objective-C declarations within linkage specifications.

llvm-svn: 61966
2009-01-09 00:49:46 +00:00
Fariborz Jahanian e84858ccf9 Adding support for ObjC methods which have c-style
parameter list. This is work in progress.

llvm-svn: 61964
2009-01-09 00:38:19 +00:00
Ted Kremenek 8ae06625b5 Invert assertion condition.
llvm-svn: 61961
2009-01-09 00:36:11 +00:00
Anders Carlsson bfd47a3c00 Add mm_malloc.h, patch by Sam Weinig.
llvm-svn: 61954
2009-01-08 23:30:09 +00:00
Douglas Gregor e4b414c781 Revert my previous, failed attempt to pretty-print anonymous struct/union accesses well. Added a FIXME so we know to revisit this later
llvm-svn: 61951
2009-01-08 22:45:41 +00:00
Ted Kremenek 0667123ba1 Fix ObjCInterfaceDecl::Destroy and ObjCProtocolDecl::Destroy to iterate and destroy all contained ObjCMethodDecls in one sweep. This fixes a use-after-free error found by valgrind.
llvm-svn: 61943
2009-01-08 20:49:27 +00:00
Douglas Gregor c8938e09ca Remove double-insertion of EnumConstantDecls. Thanks to Zhongxing Xu for pointing this out
llvm-svn: 61942
2009-01-08 20:48:26 +00:00
Douglas Gregor 82ac25e4a7 Unify the code for defining tags in C and C++, so that we always
introduce a Scope for the body of a tag. This reduces the number of
semantic differences between C and C++ structs and unions, and will
help with other features (e.g., anonymous unions) in C. Some important
points:

  - Fields are now in the "member" namespace (IDNS_Member), to keep
    them separate from tags and ordinary names in C. See the new test
    in Sema/member-reference.c for an example of why this matters. In
    C++, ordinary and member name lookup will find members in both the
    ordinary and member namespace, so the difference between
    IDNS_Member and IDNS_Ordinary is erased by Sema::LookupDecl (but
    only in C++!). 
  - We always introduce a Scope and push a DeclContext when we're
    defining a tag, in both C and C++. Previously, we had different
    actions and different Scope/CurContext behavior for enums, C
    structs/unions, and C++ structs/unions/classes. Now, it's one pair
    of actions. (Yay!)

There's still some fuzziness in the handling of struct/union/enum
definitions within other struct/union/enum definitions in C. We'll
need to do some more cleanup to eliminate some reliance on CurContext
before we can solve this issue for real. What we want is for something
like this:

  struct X {
    struct T { int x; } t;
  };

to introduce T into translation unit scope (placing it at the
appropriate point in the IdentifierResolver chain, too), but it should
still have struct X as its lexical declaration
context. PushOnScopeChains isn't smart enough to do that yet, though,
so there's a FIXME test in nested-redef.c

llvm-svn: 61940
2009-01-08 20:45:30 +00:00
Steve Naroff 6c879a1448 Move FIXME to a better location.
llvm-svn: 61937
2009-01-08 20:17:34 +00:00
Steve Naroff e538c5f3ae Removed ObjCContainerDecl::getPropertyMethods()...doesn't belong in the AST.
Moved logic to Sema::ProcessPropertyDecl().

llvm-svn: 61936
2009-01-08 20:15:03 +00:00
Steve Naroff 11b387fee0 Remove redundant method context (now that ObjCMethodDecl isa ScopedDecl).
Convert clients to use the standard getDeclContext() API.

Doug, thanks for the review!

llvm-svn: 61935
2009-01-08 19:41:02 +00:00
Steve Naroff 35c62ae632 This is a large/messy diff that unifies the ObjC AST's with DeclContext.
- ObjCContainerDecl's (ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl), ObjCCategoryImpl, & ObjCImplementation are all DeclContexts.
- ObjCMethodDecl is now a ScopedDecl (so it can play nicely with DeclContext).
- ObjCContainerDecl now does iteration/lookup using DeclContext infrastructure (no more linear search:-)
- Removed ASTContext argument to DeclContext::lookup(). It wasn't being used and complicated it's use from an ObjC AST perspective.
- Added Sema::ProcessPropertyDecl() and removed Sema::diagnosePropertySetterGetterMismatch().
- Simplified Sema::ActOnAtEnd() considerably. Still more work to do.
- Fixed an incorrect casting assumption in Sema::getCurFunctionOrMethodDecl(), now that ObjCMethodDecl is a ScopedDecl.
- Removed addPropertyMethods from ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl.

This passes all the tests on my machine. Since many of the changes are central to the way ObjC finds it's methods, I expect some fallout (and there are still a handful of FIXME's). Nevertheless, this should be a step in the right direction.

llvm-svn: 61929
2009-01-08 17:28:14 +00:00
Zhongxing Xu 550c1c46f9 Add isSubRegionOf() method to SubRegion.
llvm-svn: 61924
2009-01-08 13:17:14 +00:00
Ted Kremenek d5e6e16d0d PTH: Hook up getSpelling() caching in PTHLexer. This results in a nice
performance gain. Here's what we see for -Eonly on Cocoa.h (using PTH):

- wall time decreases by 21% (26% speedup overall)
- system time decreases by 35%
- user time decreases by 6%

These reductions are due to not paging source files just to get spellings for
literals. The solution in place doesn't appear to be 100% yet, as we still see
some of the pages for source files getting mapped in. Using -print-stats, we see
that SourceManager maps in 7179K less bytes of source text (reduction of 75%).
Will investigate why the remaining 25% are getting paged in.

With these changes, here's how PTH compares to non-PTH on Cocoa.h:
  -Eonly: PTH takes 64% of the time as non-PTH (54% speedup)
  -fsyntax-only: PTH takes 89% of the time as non-PTH (11% speedup)

llvm-svn: 61913
2009-01-08 04:30:32 +00:00
Ted Kremenek 884a558441 PTH:
- Added stub PTHLexer::getSpelling() that will be used for fetching cached
  spellings from the PTH file.  This doesn't do anything yet.
- Added a hook in Preprocessor::getSpelling() to call PTHLexer::getSpelling()
  when using a PTHLexer.
- Updated PTHLexer to read the offsets of spelling tables in the PTH file.

llvm-svn: 61911
2009-01-08 02:47:16 +00:00
Fariborz Jahanian 17290c3638 Objc's compatibility-alias semantics and code
gen issue fix.

llvm-svn: 61901
2009-01-08 01:10:55 +00:00
Ted Kremenek f929b0aefe Update some doxygen comments to be more rich. Remove StoreManager::GetRegionSVal.
llvm-svn: 61894
2009-01-07 22:56:17 +00:00
Ted Kremenek 682c3a6dd6 Refactor MemRegionManager instance variable into parent class. No functionality change.
llvm-svn: 61888
2009-01-07 22:18:50 +00:00
Douglas Gregor f325278799 Fix PR clang/3291
llvm-svn: 61886
2009-01-07 21:36:02 +00:00
Douglas Gregor f09c2dc8e0 Fix printing of member references to avoid displaying implicitly-generated member references, e.g., for anonymous struct/unions or implicit 'this' in member functions
llvm-svn: 61885
2009-01-07 21:26:07 +00:00
Fariborz Jahanian dd2d75bb52 Don't ICE when messaging on 'super' receiver when class
of category implementation is undeclared. Issue error instead.

llvm-svn: 61882
2009-01-07 21:01:41 +00:00
Fariborz Jahanian 475831bd6e Another nasty code gen. bug with trivial fix. Calling class
method on 'super' receiver in a category implementation.
Other simpler cases were working by accident.

llvm-svn: 61880
2009-01-07 20:11:22 +00:00
Douglas Gregor f4d332797b Finished semantic analysis of anonymous unions in C++.
Duplicate-member checking within classes is still a little messy, and
anonymous unions are still completely broken in C. We'll need to unify
the handling of fields in C and C++ to make this code applicable in
both languages.

llvm-svn: 61878
2009-01-07 19:46:03 +00:00
Steve Naroff 639de9ccd9 ObjC AST cleanups/simplifications (phase 1).
Add ObjCContainerDecl class and have ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl inherit from it.

llvm-svn: 61866
2009-01-07 17:57:40 +00:00
Douglas Gregor e955880357 Use DeclContext::getLookupContext wherever necessary to ensure that we look through transparent contexts
llvm-svn: 61861
2009-01-07 16:34:42 +00:00
Douglas Gregor 8d973111a8 When determining whether a variable is a file-scoped variable, check
out its lookup context (to see through linkage
specifications). Addresses <rdar://problem/6477142>.

llvm-svn: 61848
2009-01-07 02:48:43 +00:00
Douglas Gregor 9ac7a0707d Initial implementation of anonymous unions (and, as a GNU extension,
structures and classes) in C++. Covers name lookup and the synthesis
and member access for the unnamed objects/fields associated with
anonymous unions.

Some C++ semantic checks are still missing (anonymous unions can't
have function members, static data members, etc.), and there is no
support for anonymous structs or unions in C.

llvm-svn: 61840
2009-01-07 00:43:41 +00:00
Ted Kremenek 1d92d2c813 This commit reflects changes to the retain/release checker motivated by my
recent discussions with Thomas Clement and Ken Ferry concerning the "fundamental
rule" for Cocoa memory management
(http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/MemoryManagementRules.html).

Here is the revised behavior of the checker concerning tracking retain/release
counts for objects returned from message expressions involving instance methods:

1) Track the returned object if the return type of the message expression is
id<..>, id, or a pointer to *any* object that subclasses NSObject. Such objects
are assumed to have a retain count. Previously the checker only tracked objects
when the receiver of the message expression was part of the standard Cocoa API
(i.e., had class names prefixed with 'NS'). This should significantly expand the
amount of checking performed.

2) Consider the object owned if the selector of the message expression contains
"alloc", "new", or "copy". Previously we also considered "create", but this
doesn't follow from the fundamental rule (discussions with the Cocoa folks
confirms this).

llvm-svn: 61837
2009-01-07 00:39:56 +00:00
Douglas Gregor 6ad0ef5091 Allow Objective-C entities to be declared within a transparent context
nested in the translation unit. This fixes <rdar://problem/6476070>.

llvm-svn: 61832
2009-01-06 23:51:29 +00:00
Ted Kremenek 763ea559ac SourceManager: Implement "lazy" creation of MemBuffers for source files.
- Big Idea:
   Source files are now mmaped when ContentCache::getBuffer() is first called.
   While this doesn't change the functionality when lexing regular source files,
   it can result in source files not being paged in when using PTH.

- Performance change:
  - No observable difference (-fsyntax-only/-Eonly) on Cocoa.h when doing
    regular source lexing.
  - No observable time difference (-fsyntax-only/-Eonly) on Cocoa.h when using
    PTH. We do observe, however, a reduction of 279K in memory mapped source
    code (3% reduction). The majority of pages from Cocoa.h (and friends) are
    still being pulled in, however, because any literal will cause
    Preprocessor::getSpelling() to be called (causing the source for the file to
    get pulled in). The next possible optimization is to cache literal strings
    in the PTH file to avoid the need for the original header sources entirely.

- Right now there is a preprocessor directive to toggle between "lazy" and
  "eager" creation of MemBuffers. This is not permanent, and is there in the
  short term to just test additional optimizations.

llvm-svn: 61827
2009-01-06 22:43:04 +00:00
Steve Naroff f192fabbdc Another tweak to handle the MS extensions (<rdar://problem/5956221>).
llvm-svn: 61821
2009-01-06 19:34:12 +00:00
Ted Kremenek 016056cfde Add whitespace to silence the following warning in a Release build: warning: suggest a space before ';' or explicit braces around empty body in 'while' statement
llvm-svn: 61820
2009-01-06 19:17:58 +00:00
Ted Kremenek 47ad37dbe4 Return UnknownVal in RegionStoreManager::getSizeInElements() for unsupported regions. This silences a warning when compiling Release-Asserts builds.
llvm-svn: 61818
2009-01-06 19:12:06 +00:00
Fariborz Jahanian 6e7ecc84c8 Couple of code gen. fixes in ObjC's colection-statement. Hard
to track down, easy to fix. This is on going.

llvm-svn: 61817
2009-01-06 18:56:31 +00:00
Steve Naroff 1f42c2e94d Fix <rdar://problem/5956221> clang ObjC rewriter: Microsoft-specific __fastcall keyword unrecognized.
This fix is C++ specific.

llvm-svn: 61816
2009-01-06 17:40:00 +00:00
Chris Lattner ce1da2cfca - Various comment typo fixes in Sema.h
- Simplify ParseDeclCXX to use early exit on error instead of nesting.
- Change ParseDeclCXX to using the 'skip on error' form of ExpectAndConsume.
- If we don't see the ; in a using directive, still call the action, for 
  hopefully better error recovery.

llvm-svn: 61801
2009-01-06 07:27:21 +00:00
Chris Lattner 8dca2e9a4e it is ok to insert empty source ranges into diagnostics, declare variable in an if.
llvm-svn: 61800
2009-01-06 07:24:29 +00:00
Chris Lattner a7c7095b42 simplify some code using 'continue' and the new 'isInIdentifierNamespace' predicate.
llvm-svn: 61799
2009-01-06 07:20:03 +00:00
Douglas Gregor d05cb418fd Minor tweaks to the transparent declcontext patch
llvm-svn: 61798
2009-01-06 07:17:58 +00:00
Chris Lattner a448d75b2a rename MaybeParseCXXScopeSpecifier -> ParseOptionalCXXScopeSpecifier and
MaybeParseTypeSpecifier -> ParseOptionalTypeSpecifier.

llvm-svn: 61796
2009-01-06 06:59:53 +00:00
Chris Lattner 9b01ca1f5a minor code cleanups, reduce indentation since 'if' block can't fall through.
llvm-svn: 61795
2009-01-06 06:55:51 +00:00
Douglas Gregor c7acfdfe9a Add QualifiedDeclRefExpr, which retains additional source-location
information for declarations that were referenced via a qualified-id,
e.g., N::C::value. We keep track of the location of the start of the
nested-name-specifier. Note that the difference between
QualifiedDeclRefExpr and DeclRefExpr does have an effect on the
semantics of function calls in two ways:
  1) The use of a qualified-id instead of an unqualified-id suppresses
     argument-dependent lookup
  2) If the name refers to a virtual function, the qualified-id
  version will call the function determined statically while the
  unqualified-id version will call the function determined dynamically
  (by looking up the appropriate function in the vtable).

Neither of these features is implemented yet, but we do print out
qualified names for QualifiedDeclRefExprs as part of the AST printing.

llvm-svn: 61789
2009-01-06 05:10:23 +00:00
Chris Lattner a8a3f73a47 rename tok::annot_qualtypename -> tok::annot_typename, which is both
shorter and  more accurate.  The type name might not be qualified.

llvm-svn: 61788
2009-01-06 05:06:21 +00:00
Ted Kremenek 12c2af44e9 Misc changes to SourceManager::ContentCache:
- 'Buffer' is now private and must be accessed via 'getBuffer()'.
   This paves the way for lazily mapping in source files on demand.
- Added 'getSize()' (which gets the size of the content without
   necessarily accessing the MemBuffer) and 'getSizeBytesMapped()'.
- Modifed SourceManager to use these new methods.  This reduces the
  number of places that actually access the MemBuffer object for a file
  to those that actually look at the character data.

These changes result in no performance change for -fsyntax-only on Cocoa.h.

llvm-svn: 61782
2009-01-06 01:55:26 +00:00
Chris Lattner 933d5ffc11 Optimize stringification a bit to avoid std::string thrashing and
avoid the version of Preprocessor::getSpelling that returns an 
std::string.

llvm-svn: 61769
2009-01-05 23:04:18 +00:00
Daniel Dunbar 0d2bfec51d Remainder is only valid on integer vector operands.
Improve ext vector test case.

llvm-svn: 61766
2009-01-05 22:55:36 +00:00
Daniel Dunbar 8f8e40a324 Back out code for handling VectorType's in getFloatingRank.
llvm-svn: 61764
2009-01-05 22:44:35 +00:00
Daniel Dunbar 060d5e248e Use CheckVectorOperands when % is applied to a vector type.
llvm-svn: 61763
2009-01-05 22:42:10 +00:00
Daniel Dunbar a1f3441d50 Implement getFloatingRank() for extended vectors.
- I'm not sure this is appropriate, but it seems reasonable to be
   able to call getFloatingRank on anything which isFloatingType().

llvm-svn: 61758
2009-01-05 22:14:37 +00:00
Sebastian Redl 1654ef0187 Silence a GCC warning
llvm-svn: 61747
2009-01-05 20:53:53 +00:00
Sebastian Redl baad4e765f PODness and Type Traits
Make C++ classes track the POD property (C++ [class]p4)
Track the existence of a copy assignment operator.
Implicitly declare the copy assignment operator if none is provided.
Implement most of the parsing job for the G++ type traits extension.
Fully implement the low-hanging fruit of the type traits:
__is_pod: Whether a type is a POD.
__is_class: Whether a type is a (non-union) class.
__is_union: Whether a type is a union.
__is_enum: Whether a type is an enum.
__is_polymorphic: Whether a type is polymorphic (C++ [class.virtual]p1).

llvm-svn: 61746
2009-01-05 20:52:13 +00:00
Douglas Gregor 07665a69e8 Introduce support for "transparent" DeclContexts, which are
DeclContexts whose members are visible from enclosing DeclContexts up
to (and including) the innermost enclosing non-transparent
DeclContexts. Transparent DeclContexts unify the mechanism to be used
for various language features, including C enumerations, anonymous
unions, C++0x inline namespaces, and C++ linkage
specifications. Please refer to the documentation in the Clang
internals manual for more information.

Only enumerations and linkage specifications currently use transparent
DeclContexts.

Still to do: use transparent DeclContexts to implement anonymous
unions and GCC's anonymous structs extension, and, later, the C++0x
features. We also need to tighten up the DeclContext/ScopedDecl link
to ensure that every ScopedDecl is in a single DeclContext, which
will ensure that we can then enforce ownership and reduce the memory
footprint of DeclContext.

llvm-svn: 61735
2009-01-05 19:45:36 +00:00
Chris Lattner 07ebf302e5 simplify Preprocessor::getSpelling now that identifiers carry around
their length.

llvm-svn: 61734
2009-01-05 19:44:41 +00:00
Douglas Gregor cfc7022a7b Fix an uninitialized-variable warning
llvm-svn: 61700
2009-01-05 17:18:30 +00:00
Chris Lattner 8a7d10d753 remove optimization to avoid looking ahead for cases like ::foo. This
isn't worth the complexity and the code already does a ton of lookahead.

llvm-svn: 61671
2009-01-05 03:55:46 +00:00
Chris Lattner 6b87b9d84e simplify some code.
llvm-svn: 61668
2009-01-05 02:07:19 +00:00
Chris Lattner da0300870f Rearrange some code in TryAnnotateTypeOrScopeToken to make it
early exit for C and avoid template lookup for C.

llvm-svn: 61667
2009-01-05 01:49:50 +00:00
Chris Lattner c69537feb5 Fix a bug where we'd try to look beyond the current cached tokens when
not in backtracking mode.  This was just using the wrong predicate.

llvm-svn: 61666
2009-01-05 01:42:04 +00:00
Chris Lattner b5134c05b9 TryAnnotateTypeOrScopeToken and TryAnnotateCXXScopeToken can
only be called when they might be needed now, so make them assert
that their current token is :: or identifier.

llvm-svn: 61662
2009-01-05 01:24:05 +00:00
Anders Carlsson d8cd7b6c34 Generate debug info for VLA types
llvm-svn: 61661
2009-01-05 01:23:29 +00:00
Chris Lattner 45ddec319e ParseCXXSimpleTypeSpecifier can only be called on things that are
verified to be simple type specifiers, so there is no need for it
to call TryAnnotateTypeOrScopeToken.

Make MaybeParseCXXScopeSpecifier reject ::new and ::delete with a 
hard error now that it may never be transitively called in a 
context where these are legal.  This allows me to start 
disentangling things more.

llvm-svn: 61659
2009-01-05 00:13:00 +00:00
Chris Lattner bd31aa3b05 sink a call to TryAnnotateCXXScopeToken down into the
applicable cases in ParseDeclarationSpecifiers. 

llvm-svn: 61657
2009-01-05 00:07:25 +00:00
Chris Lattner a21db61ed9 Simplify some control flow and remove a call to TryAnnotateCXXScopeToken
that isn't doing what is desired. It was annotating the current token
not the 'next' token.  This code should be fixed.

llvm-svn: 61656
2009-01-04 23:51:17 +00:00
Chris Lattner 1f69ebb5fa code simplification
llvm-svn: 61654
2009-01-04 23:46:59 +00:00
Chris Lattner 020bab992e sink calls to TryAnnotateTypeOrScopeToken down into the only cases that they
can interact with.

llvm-svn: 61652
2009-01-04 23:41:41 +00:00
Chris Lattner b7895c4180 push the call in isCXXDeclarationSpecifier to TryAnnotateTypeOrScopeToken
down into the two cases that it can possibly affect.  This avoids calls
to it that obviously can't do anything.

llvm-svn: 61651
2009-01-04 23:33:56 +00:00
Chris Lattner 9a8968b50d my previous patch caused sema to drop the global qualifier, make
sure to pass it down.  This makes the code a bit gross, I will clean
it up in subsequent commits.

llvm-svn: 61650
2009-01-04 23:23:14 +00:00
Chris Lattner 122db26b28 sink the call to TryAnnotateTypeOrScopeToken in
ParseCastExpression into the switch.  This gets it out of the hot
path through ParseCastExpression for all the non-identifier and 
non-:: tokens.

llvm-svn: 61643
2009-01-04 22:52:14 +00:00
Chris Lattner dfa1a45abd use early exits to reduce nesting.
llvm-svn: 61642
2009-01-04 22:32:19 +00:00
Chris Lattner 8a38aa83da simplify control flow by removing a goto.
llvm-svn: 61641
2009-01-04 22:28:21 +00:00
Chris Lattner 109faf2b8b eliminate lookahead when parsing ::new / ::delete.
llvm-svn: 61638
2009-01-04 21:25:24 +00:00
Chris Lattner f9b2cd4d92 minor simplifications.
llvm-svn: 61637
2009-01-04 21:14:15 +00:00
Anders Carlsson 762e162284 Fix the bug that would cause Python to crash at startup.
When emitting the static variables we need to make sure that the order is preserved. 
Fix this by making StaticDecls a std::list which has O(1) random removal.

llvm-svn: 61621
2009-01-04 02:08:04 +00:00
Anders Carlsson 37e0088610 Perform default function/array conversion for input arguments to inline asm statements if the input expr can be a memory operand
llvm-svn: 61515
2008-12-31 07:27:38 +00:00
Douglas Gregor d7c4d984d0 Parser support for C++ using directives, from Piotr Rak
llvm-svn: 61486
2008-12-30 03:27:21 +00:00
Fariborz Jahanian 408035072b Remove hasKind(). Use existing getKind().
llvm-svn: 61476
2008-12-29 19:57:17 +00:00
Sebastian Redl 1cbb59182c Convert a two more statement actions to smart pointers.
llvm-svn: 61456
2008-12-28 16:13:43 +00:00
Sebastian Redl a2b5e31cb1 Diagnose declarations that don't declare anything, and fix PR3020.
Examples:
int;
typedef int;

llvm-svn: 61454
2008-12-28 15:28:59 +00:00
Anders Carlsson f562b39e80 Add a MS specific intrinsic.
llvm-svn: 61446
2008-12-27 04:26:15 +00:00
Anders Carlsson a7e0e61b9d Eli noticed that I had forgotten some #defines. Add them.
llvm-svn: 61445
2008-12-26 22:49:10 +00:00
Anders Carlsson 70f8da06d3 Add float.h header. Eli, please review :)
llvm-svn: 61444
2008-12-26 17:10:18 +00:00
Douglas Gregor 1dc9826a46 Add support for out-of-line definitions of conversion functions and member operators
llvm-svn: 61442
2008-12-26 15:00:45 +00:00
Anders Carlsson 88b53663fb Fix implementation of _mm_pause.
llvm-svn: 61441
2008-12-26 02:22:10 +00:00
Anders Carlsson 19ef5d49d4 OK, all tests pass. Let's start using the SSE2 header
llvm-svn: 61440
2008-12-26 00:57:11 +00:00
Anton Korobeynikov d72f47aa05 Add full dllimport / dllexport support: both sema checks and codegen.
Patch by Ilya Okonsky

llvm-svn: 61437
2008-12-26 00:52:02 +00:00
Anders Carlsson 37ba1a5927 Fix formatting
llvm-svn: 61435
2008-12-26 00:50:47 +00:00
Anders Carlsson 37c2371a88 Add _mm_pause and _MM_SHUFFLE
llvm-svn: 61434
2008-12-26 00:49:43 +00:00
Anders Carlsson 85eb1247a3 More SSE2 intrinsics
llvm-svn: 61433
2008-12-26 00:45:50 +00:00
Anders Carlsson a0d5ca2773 More SSE2 intrinsics
llvm-svn: 61432
2008-12-25 23:48:58 +00:00
Steve Naroff f9c29d4200 Add parser support for __forceinline, __w64, __ptr64.
llvm-svn: 61431
2008-12-25 14:41:26 +00:00
Steve Naroff 44ac777741 Add parser support for __cdecl, __stdcall, and __fastcall.
Change preprocessor implementation of _cdecl to reference __cdecl.

llvm-svn: 61430
2008-12-25 14:16:32 +00:00
Zhongxing Xu 4c1661102e Add Fedora 10 GCC paths.
llvm-svn: 61429
2008-12-25 09:28:01 +00:00
Anders Carlsson 51beccbd0b Make _mm_add_si64 inlined
llvm-svn: 61428
2008-12-25 07:07:08 +00:00
Steve Naroff 3a9b7e0cff Add explicit "fuzzy" parse support for Microsoft declspec.
Remove previous __declspec macro that would effectively erase the construct prior to parsing.

llvm-svn: 61422
2008-12-24 20:59:21 +00:00
Sebastian Redl 068b13d62a Fix try statement deserialization.
llvm-svn: 61421
2008-12-24 13:02:38 +00:00
Ted Kremenek 2907ab7d77 Add a bunch of comments and FIXMEs.
llvm-svn: 61419
2008-12-24 07:46:32 +00:00
Zhongxing Xu c7a2792817 set region default value if there are not enough init values for array and struct.
llvm-svn: 61418
2008-12-24 07:29:24 +00:00
Zhongxing Xu be2d5535f6 Add serialization support for TypeOfType.
llvm-svn: 61417
2008-12-24 07:22:26 +00:00
Zhongxing Xu 329f204b1b Add serialization support for TypeOfExpr.
llvm-svn: 61416
2008-12-24 06:36:01 +00:00
Douglas Gregor b9bd8a994c Keep track of template arguments when we parse them. Right now, we don't actually do anything with the template arguments, but they'll be used to create template declarations
llvm-svn: 61413
2008-12-24 02:52:09 +00:00
Anders Carlsson a283f91a67 Add integer arithmetic intrinsics
llvm-svn: 61412
2008-12-24 02:41:00 +00:00
Anders Carlsson b08ac0b2b0 Add store/set/load intrisics
llvm-svn: 61411
2008-12-24 02:11:54 +00:00
Anders Carlsson f15e71d170 Start implementing some SSE2 instructions
llvm-svn: 61410
2008-12-24 01:45:22 +00:00
Ted Kremenek ae189ec1be Comment and fixup GDM entries for RegionStore to use unique 'tag classes' to identify GDM entries.
llvm-svn: 61409
2008-12-24 01:05:03 +00:00
Douglas Gregor 583540360c Correct the order in which we cope with end-of-class-definition
semantics and improve our handling of default arguments. Specifically,
we follow this order:

  - As soon as the see the '}' in the class definition, the class is
  complete and we add any implicit declarations (default constructor,
  copy constructor, etc.) to the class.
  - If there are any default function arguments, parse them
  - If there were any inline member function definitions, parse them

As part of this change, we now keep track of the the fact that we've
seen unparsed default function arguments within the AST. See the new
ParmVarDecl::hasUnparsedDefaultArg member. This allows us to properly
cope with calls inside default function arguments to other functions
where we're making use of the default arguments.

Made some C++ error messages regarding failed initializations more
specific. 

llvm-svn: 61406
2008-12-24 00:01:03 +00:00
Anton Korobeynikov 484f05e14d Sema for fastcall/stdcall stuff. Tests will follow.
Patch by Ilya Okonsky!

llvm-svn: 61394
2008-12-23 22:24:07 +00:00
Douglas Gregor 17eb26bc4e Fix misguided type selection
llvm-svn: 61393
2008-12-23 22:05:29 +00:00
Douglas Gregor 74a3444394 When determining whether a class type has a const copy constructor, be
sure to look at all of the results returned by name lookup. Fixes
<rdar://problem/6465262>

llvm-svn: 61388
2008-12-23 21:31:30 +00:00
Fariborz Jahanian 4ecf1e94db Last patch, for now, to privde ObjC's encoding of types.
We now pass all gcc's encoding compatibility tests.

llvm-svn: 61387
2008-12-23 21:30:15 +00:00
Douglas Gregor 8b9ccca5e5 Don't push OverloadedFunctionDecls onto the chain of declarations
attached to an identifier. Instead, all overloaded functions will be
pushed into scope, and we'll synthesize an OverloadedFunctionDecl on
the fly when we need it. 

llvm-svn: 61386
2008-12-23 21:05:05 +00:00
Fariborz Jahanian 0f66a6c926 Lot more encoding work. We are closing the gap to
gcc compatibilty in all aspects of encoding now.

llvm-svn: 61383
2008-12-23 19:56:47 +00:00
Ted Kremenek b0051a9955 Remove old PTH token-generation test harness.
llvm-svn: 61382
2008-12-23 19:25:33 +00:00
Ted Kremenek 78cc24730e PTH: Remove some methods and simplify some conditions in PTHLexer::Lex(). No big functionality change.
llvm-svn: 61381
2008-12-23 19:24:24 +00:00
Ted Kremenek a754c40390 PTH: Use 3 bytes instead of 4 bytes to encode the persistent ID for a token.
- This reduces the PTH size for Cocoa.h by 7%.
- The increases PTH -Eonly speed for Cocoa.h by 0.8%.

llvm-svn: 61377
2008-12-23 18:41:34 +00:00
Ted Kremenek 3f94706e57 Cosmetics: rename a variable and tighten spacing. No functionality change.
llvm-svn: 61375
2008-12-23 18:27:26 +00:00
Ted Kremenek 1bd0a550d0 PTH:
- Encode the token length with 2 bytes instead of 4.
- This reduces the size of the .pth file for Cocoa.h by 12%.
- This speeds up PTH time (-Eonly) on Cocoa.h by 1.6%.

llvm-svn: 61364
2008-12-23 02:52:12 +00:00
Ted Kremenek 66076a964b PTH:
- In PTHLexer::Lex read all of the token data from PTH file before
  constructing the token.  The idea is to enhance locality.
- Do not use Read8/Read32 in PTHLexer::Lex.  Inline these operations manually.
- Change PTHManager::ReadIdentifierInfo() to PTHManager::GetIdentifierInfo().
  They are functionally the same except that PTHLexer::Lex() reads the
  persistent id.

These changes result in a 3.3% speedup for PTH on Cocoa.h (-Eonly).

llvm-svn: 61363
2008-12-23 02:30:15 +00:00
Ted Kremenek 1b18ad240c PTH:
- Embed 'eom' tokens in PTH file.
- Use embedded 'eom' tokens to not lazily generate them in the PTHLexer.
  This means that PTHLexer can always advance to the next token after
  reading a token (instead of buffering tokens using a copy).
- Moved logic of 'ReadToken' into Lex.  GetToken & ReadToken no longer exist.
- These changes result in a 3.3% speedup (-Eonly) on Cocoa.h.
- The code is a little gross.  Many cleanups are possible and should be done.

llvm-svn: 61360
2008-12-23 01:30:52 +00:00
Douglas Gregor 033f56d533 Add some block-pointer conversions in C++
llvm-svn: 61359
2008-12-23 00:53:59 +00:00
Douglas Gregor 55297ac499 Don't explicitly represent OverloadedFunctionDecls within
DeclContext. Instead, just keep the list of currently-active
declarations and only build the OverloadedFunctionDecl when we
absolutely need it.

This is a half-step toward eliminating the need to explicitly build
OverloadedFunctionDecls that store sets of overloaded
functions. This was suggested by Argiris a while back, and it's a good
thing for several reasons: first, it eliminates the messy logic that
currently tries to keep the OverloadedFunctionDecl in sync with the 
declarations that are being added. Second, it will (eventually)
eliminate the need to allocate memory for overload sets, which could
help performance. Finally, it helps set us up for when name lookup can
return multiple (possibly ambiguous) results, as can happen with
lookup of class members in C++.

Next steps: make the IdentifierResolver store overloads as separate
entries in its list rather than replacing them with an
OverloadedFunctionDecl now, then see how far we can go toward
eliminating OverloadedFunctionDecl entirely.

llvm-svn: 61357
2008-12-23 00:26:44 +00:00
Fariborz Jahanian daef00bca6 More encoding support; in this case, encoding of
outer-most const of pointer types.

llvm-svn: 61355
2008-12-22 23:22:27 +00:00
Sebastian Redl 9b244a8797 Full AST support and better Sema support for C++ try-catch.
llvm-svn: 61346
2008-12-22 21:35:02 +00:00
Douglas Gregor 79a6b01802 Support conversion from a null pointer constant o any Objective-C object pointer type. Fixes rdar://problem/6463298
llvm-svn: 61340
2008-12-22 20:51:52 +00:00
Fariborz Jahanian 8b2d1294db Fixed a bug showed up the meta-data for protocol
instance methods by building print-class-info.m,
whose output is now identical to what gcc puts out.

llvm-svn: 61339
2008-12-22 20:41:58 +00:00
Sebastian Redl 54c04d4700 Partial AST and Sema support for C++ try-catch.
llvm-svn: 61337
2008-12-22 19:15:10 +00:00
Fariborz Jahanian ed4c443193 Patch to remove bogus warning in case of @dynamic
property in a category and to issue diagnostics
for mismatch method in some other cases.

llvm-svn: 61336
2008-12-22 19:05:31 +00:00
Sebastian Redl 04253537dc Expr and Stmt must be destroyed with Destroy, not delete. Fixes PR/3245.
llvm-svn: 61335
2008-12-22 17:51:10 +00:00
Anders Carlsson c72502308d Fix test failures noticed by Fariborz.
llvm-svn: 61334
2008-12-22 17:42:23 +00:00
Zhongxing Xu 4ee570a4cb Fix initialization order.
llvm-svn: 61333
2008-12-22 08:30:52 +00:00
Anders Carlsson e5f993da3d Flip the switch and start using the new xmmintrin.h
llvm-svn: 61332
2008-12-22 07:36:02 +00:00
Anders Carlsson 27046fc4e6 Comment out _mm_insert_pi16 for now
llvm-svn: 61331
2008-12-22 07:34:23 +00:00
Anders Carlsson 5aa0c50e29 Implement the last intrinsics, _mm_insert_pi16 is the last remaining one now.
llvm-svn: 61330
2008-12-22 07:08:03 +00:00
Douglas Gregor 97fd6e24c4 Add support for calls to overloaded member functions. Things to note:
- Overloading has to cope with having both static and non-static
    member functions in the overload set.
  - The call may or may not have an implicit object argument,
    depending on the syntax (x.f() vs. f()) and the context (static
    vs. non-static member function).
  - We now generate MemberExprs for implicit member access expression.
  - We now cope with mutable whenever we're building MemberExprs.

llvm-svn: 61329
2008-12-22 05:46:06 +00:00
Anders Carlsson 25b16dbcd8 Add macros
llvm-svn: 61328
2008-12-22 05:42:03 +00:00
Anders Carlsson 8b79fc8aab Add misc intrinsics
llvm-svn: 61327
2008-12-22 05:20:34 +00:00
Anders Carlsson 53b3d4a32a Add control register intrinsics
llvm-svn: 61326
2008-12-22 05:00:07 +00:00
Anders Carlsson 4cf8ac8bb8 Add integer intrinsics
llvm-svn: 61325
2008-12-22 04:55:36 +00:00
Anders Carlsson 0462eb270a Generate code for __builtin_ia32_pshufw
llvm-svn: 61324
2008-12-22 04:54:32 +00:00
Anders Carlsson 70d5f46646 Add cacheability intrinsics
llvm-svn: 61323
2008-12-22 03:50:21 +00:00
Anders Carlsson 1e71996bd1 Add store intrinsics
llvm-svn: 61322
2008-12-22 03:16:40 +00:00
Anders Carlsson c7d0d8b60d Add set intrinsics
llvm-svn: 61321
2008-12-22 02:51:35 +00:00
Anders Carlsson 13fd3a1411 Add load intrinsics
llvm-svn: 61320
2008-12-22 02:43:30 +00:00
Zhongxing Xu 5b0ae81ab1 Add an option to make 'RemoveDeadBindings' a configurable behavior. This enables
us to measure the effect of this optimization.

llvm-svn: 61319
2008-12-22 01:52:37 +00:00
Anders Carlsson 1e4a9b7c0d _mm_cvtsi64_ss is 64-bit only, so wrap it in #ifdef __x86_64__
Add composite conversion intrinsics - will implement them shortly.

llvm-svn: 61318
2008-12-22 01:26:50 +00:00
Anders Carlsson 157643c8d7 Add a couple of conversion intrinsics
llvm-svn: 61317
2008-12-22 00:48:30 +00:00
Anders Carlsson 60053dd2a5 Add comparison intrinsics.
llvm-svn: 61316
2008-12-22 00:28:39 +00:00
Anders Carlsson 2df1ce496e Check in an in-progress version of xmmintrin.h that I had lying around.
llvm-svn: 61315
2008-12-22 00:01:20 +00:00
Anders Carlsson 39def3adc8 Add codegen support for __null
llvm-svn: 61314
2008-12-21 22:39:40 +00:00
Sebastian Redl fc24b63b9a Fix a comment.
llvm-svn: 61313
2008-12-21 19:24:58 +00:00
Sebastian Redl b219c90d7b Parser support for C++ try-catch.
llvm-svn: 61312
2008-12-21 16:41:36 +00:00
Zhongxing Xu 7b9c57083b Correct comments.
llvm-svn: 61311
2008-12-21 13:00:52 +00:00
Sebastian Redl 52f03bac60 Convert a few Stmt actions to smart pointers.
llvm-svn: 61309
2008-12-21 12:04:03 +00:00
Zhongxing Xu d93e03b25f fix 80-col violation.
llvm-svn: 61306
2008-12-21 04:46:06 +00:00
Anders Carlsson 3ebc7c4a0d Implement alignof for vla types.
llvm-svn: 61305
2008-12-21 03:48:05 +00:00
Zhongxing Xu 40b0e50ffd Use utility method.
llvm-svn: 61304
2008-12-21 03:46:11 +00:00
Anders Carlsson e0808df4a5 Add ASTContext::getBaseElementType and use it in CodeGenFunction::EmitArraySubscriptExpr.
llvm-svn: 61303
2008-12-21 03:44:36 +00:00
Anders Carlsson 76dbc0423e Make sure to emit the size expression for sizeof(type)
llvm-svn: 61301
2008-12-21 03:33:21 +00:00
Zhongxing Xu 303a6d4f11 Use utility methods. No functional change.
llvm-svn: 61300
2008-12-21 03:31:01 +00:00
Zhongxing Xu f97d95a782 Remove unused function.
llvm-svn: 61299
2008-12-21 03:26:05 +00:00
Eli Friedman dea4193e8a Fix for PR3246: an empty clobber list is the empty string, not a null
string.

That said, we should probably try and track down the correct clobber 
lists for the targets that don't have them (PPC, ARM, and Sparc), 
so that we can generate correct code.

llvm-svn: 61298
2008-12-21 01:15:32 +00:00
Anders Carlsson 8e0ba05074 Did not mean to commit this.
llvm-svn: 61296
2008-12-21 00:16:32 +00:00
Anders Carlsson 3d312f8788 Handle VLA indexing
llvm-svn: 61295
2008-12-21 00:11:23 +00:00
Douglas Gregor 2eedc3aa1c Add support for member references (E1.E2, E1->E2) with C++ semantics,
which can refer to static data members, enumerators, and member
functions as well as to non-static data members.

Implement correct lvalue computation for member references in C++. 
Compute the result type of non-static data members of reference type properly.

llvm-svn: 61294
2008-12-20 23:49:58 +00:00
Fariborz Jahanian a0befc0a6f Finish up saving original parameter type and
using it in ObjC's method parameter encoding.

llvm-svn: 61293
2008-12-20 23:29:59 +00:00
Eli Friedman 5ad3c91b27 Extend the unsupported error to include break and continue, and fix a
warning by using an unsigned index.

llvm-svn: 61292
2008-12-20 23:18:29 +00:00
Eli Friedman f4084708cd Make VLAs usable, and make basic usage work correctly. Also, add a
simple test that actually does VLA codegen.

Note that despite the fact that the alloca isn't in the entry block, it 
should dominate all uses; this is guaranteed by the restrictions on goto 
into VLA scope in C99.

llvm-svn: 61291
2008-12-20 23:11:59 +00:00
Anders Carlsson 5d985f5f16 Handle typedefs to VLAs (Emit the size expr when we encounter the typedef
llvm-svn: 61290
2008-12-20 21:51:53 +00:00
Anders Carlsson fbef9c208f Check the entire StackSaveValues stack for VLAs when dealing with goto and return statements. Noticed by Eli Friedman.
llvm-svn: 61289
2008-12-20 21:33:38 +00:00
Anders Carlsson c20879a6e4 Make sure to generate code for arguments that have a variably modified type.
llvm-svn: 61288
2008-12-20 21:28:43 +00:00
Fariborz Jahanian 0c277dbee2 Add case for the new AST node.
llvm-svn: 61287
2008-12-20 21:06:28 +00:00
Fariborz Jahanian 7664ffb954 introducing ParmVarWithOriginalTypeDecl class to
keep track of the original parameter decl. types.
This is work in progress.

llvm-svn: 61286
2008-12-20 20:56:12 +00:00
Anders Carlsson 8a01b79274 Change EmitVLASize to take a QualType that must be a variably modified type.
Emit the size even if the declared type is a variably modified type. This lets us handle

void f(int n) {
  int (*a)[n];
  
  printf("size: %d\n", sizeof(*a));
}

llvm-svn: 61285
2008-12-20 20:46:34 +00:00
Anders Carlsson e388a5bf44 Split up emitting of VLA sizes and getting the size of a VLA.
llvm-svn: 61284
2008-12-20 20:27:15 +00:00
Anders Carlsson 6200f0c533 Add some ErrorUnsupported calls and turn on VLA codegen again.
llvm-svn: 61283
2008-12-20 19:33:21 +00:00
Fariborz Jahanian 7acf0749d4 Strangely enough, name of ObjC class is not encoded into the
full encoding of the class which has an ivar of pointer to this
class. Its name is encoded in the type for the ivar in the
ivar-list metadata. This patch conforms to the above rule.

llvm-svn: 61282
2008-12-20 19:17:01 +00:00
Sebastian Redl e10c2c32af Implement checks for bool in increment and decrement.
llvm-svn: 61275
2008-12-20 09:35:34 +00:00
Zhongxing Xu af7415ffb1 Lazy bingding for region-store manager.
* Now Bind() methods take and return GRState* because binding could
  also alter GDM.
* No variables are initialized except those declared with initial
  values.
* failed C test cases are due to bugs in RemoveDeadBindings(),
which removes constraints that is still alive. This will be fixed in later
patch.
* default value of array and struct regions will be implemented in later patch.

llvm-svn: 61274
2008-12-20 06:32:12 +00:00
Ted Kremenek 7d002beb5b Fix <rdar://problem/6454568>: BugReporter should correctly handle switch statements with no default case.
llvm-svn: 61270
2008-12-20 01:41:43 +00:00
Fariborz Jahanian 1d35f12e6b More encoding support. This time for
@encode of classes and bitfields.

llvm-svn: 61268
2008-12-19 23:34:38 +00:00
Anders Carlsson 6736d1a2bb Get rid of the old Expr::Evaluate variant.
llvm-svn: 61260
2008-12-19 20:58:05 +00:00
Douglas Gregor a119f10482 Support more implicit conversions for Objective-C types. Addresses <rdar://problem/6458293>.
llvm-svn: 61255
2008-12-19 19:13:09 +00:00
Douglas Gregor 47d3f2742a Allow downcasts of pointers to Objective-C interfaces, with a
warning. This matches GCC's behavior and addresses
<rdar://problem/6458293>.

llvm-svn: 61246
2008-12-19 17:40:08 +00:00
Anders Carlsson 324de7ba46 Fix for PR3234
llvm-svn: 61245
2008-12-19 17:27:57 +00:00
Fariborz Jahanian 781c5c879c Several@encode bug fixes for ObjC.
llvm-svn: 61231
2008-12-19 00:14:49 +00:00
Douglas Gregor 1e57a3fb46 Add some more implicit conversions for Objective-C++
llvm-svn: 61229
2008-12-18 23:43:31 +00:00
Ted Kremenek 5b26c11f56 Fix regression when invalidating reference-counts for objects passed-by-reference to a function/method.
llvm-svn: 61224
2008-12-18 23:34:57 +00:00
Steve Naroff 1ef21279b6 Don't define __STDC__ when compiling with -fms-extensions
llvm-svn: 61223
2008-12-18 22:37:25 +00:00
Douglas Gregor b04675d112 Don't check initializers when there are dependent types or type-dependent expressions involved
llvm-svn: 61212
2008-12-18 21:49:58 +00:00
Douglas Gregor 55ad91fecb Ultrasimplistic sketch for the parsing of C++ template-ids. This won't
become useful or correct until we (1) parse template arguments
correctly, (2) have some way to turn template-ids into types,
declarators, etc., and (3) have a real representation of templates.

llvm-svn: 61208
2008-12-18 19:37:40 +00:00
Ted Kremenek 9443f0ea5e Use '&' to test StartOfLine flag.
llvm-svn: 61205
2008-12-18 18:15:29 +00:00
Fariborz Jahanian f8f0c6b1bc Removed a slot in ObjCMemRegExpr used in
code gen which did not belong there.

llvm-svn: 61203
2008-12-18 17:29:46 +00:00
Steve Naroff d96f7cca5f Fix http://llvm.org/bugs/show_bug.cgi?id=3189.
llvm-svn: 61202
2008-12-18 15:50:41 +00:00
Chris Lattner 84a1162e4c add a simple fast-path for the common case of [] and [4] in
array size declarators.  No need to go through all the trouble
of parsing crazy things like [static const 4] when most code
doesn't need it.

llvm-svn: 61200
2008-12-18 07:27:21 +00:00
Chris Lattner cf0bab2042 disallow attributes in a few callers of ParseTypeQualifierListOpt,
these completely ignore parsed attributes anyway, so don't try
to read them.

llvm-svn: 61198
2008-12-18 07:02:59 +00:00
Chris Lattner b6ec4e75ad Clean up the C89/C++ warnings about C99 array features to not
emit duplicate diags (some in parser and some in sema) and to
warn about use of typequals in array sizes.  This implements 
PR2759.

llvm-svn: 61197
2008-12-18 06:50:14 +00:00
Daniel Dunbar 9ae0afdcd6 Allow ABI to use StructRet even for scalar values.
- Update comment to reflect fact that StructRet is now supported for
   any type (modulo LLVM support).

 - No functionality change, no scalar types currently use this
   feature.

llvm-svn: 61192
2008-12-18 04:52:14 +00:00
Chris Lattner 0cb00d66ea This is valid in C++.
void foo() { return foo(); }

llvm-svn: 61188
2008-12-18 02:03:48 +00:00
Chris Lattner 27e5beff70 Merge function-return.c into function.c
Fix PR2790 by making a warning an EXTWARN instead of EXTENSION.
Add a new EXTENSION warning for "return (some void expression);"

llvm-svn: 61187
2008-12-18 02:01:17 +00:00
Chris Lattner d19c1c0d6d implement PR3177 - "__extension__ union" not supported in C++ mode
llvm-svn: 61180
2008-12-18 01:12:00 +00:00
Ted Kremenek aceeb25660 Rewrite PTHLexer::DiscardToEndOfLine() to not use GetToken and instead only read the bytes needed to determine if a token is not at the start of the line.
llvm-svn: 61172
2008-12-17 23:52:11 +00:00
Nuno Lopes 394ec984f2 fix leakage of var's initializers
llvm-svn: 61171
2008-12-17 23:39:55 +00:00
Ted Kremenek 63ff81c4e1 Change PTHLexer::getSourceLocation() to not call GetToken() and instead just read the file offset in the token data buffer directly.
llvm-svn: 61170
2008-12-17 23:36:32 +00:00
Douglas Gregor 19b8c4fffa Delay semantic analysis of the C++ names casts when the subexpression is type-dependent or the destination type is dependent.
llvm-svn: 61165
2008-12-17 22:52:20 +00:00
Nuno Lopes e013c7f6c1 fix a few more memory leaks: clean the ASTRecordLayouts, ASTObjCInterfaces and ASTRecordForInterface maps
llvm-svn: 61163
2008-12-17 22:30:25 +00:00
Fariborz Jahanian 4496c0ff86 Patch to re-implement duplicate ivar checking
(which will pass duplicate-ivar-check.m test again).

llvm-svn: 61161
2008-12-17 22:21:44 +00:00