Commit Graph

130 Commits

Author SHA1 Message Date
Daniel Dunbar 3cd20632ff Kill off CGCallInfo, always use CGFunctionInfo for encapsulating
function/call info.

llvm-svn: 63466
2009-01-31 02:19:00 +00:00
Fariborz Jahanian 0408723269 class meta-data belong to __objc_data section (in objc2
nonfragile abi).

llvm-svn: 63461
2009-01-31 01:07:39 +00:00
Fariborz Jahanian 822082517f Recognize class's visibility attribute and set its linkage
to private extern (in objc2 nonfragile abi).

llvm-svn: 63460
2009-01-31 00:59:10 +00:00
Fariborz Jahanian 75e0351adb Missed another mis-alignment of an objc2 meta-data.
llvm-svn: 63453
2009-01-30 23:51:52 +00:00
Fariborz Jahanian e46e284efd Setting correct alignent for objc2 meta-data.
llvm-svn: 63445
2009-01-30 23:15:42 +00:00
Fariborz Jahanian fa57e8e7ab add imag_info section and data (for objc2 nonfragile abi).
llvm-svn: 63430
2009-01-30 22:07:48 +00:00
Fariborz Jahanian 279abd31a9 Generate list of implemented classes and categories in their
own sections (related to objc2 nonfragile abi).

llvm-svn: 63418
2009-01-30 20:55:31 +00:00
Fariborz Jahanian 097feda5e0 Code gen. for @protocol expression in the new nonfragile abi.
llvm-svn: 63408
2009-01-30 18:58:59 +00:00
Fariborz Jahanian d9c28b808b Bug fixing involving method-list in protocol meta-data
(objc2 nonfragile-abi).

llvm-svn: 63351
2009-01-30 00:46:37 +00:00
Fariborz Jahanian 34fe880648 Random bug fix related to protocl metadata in categories in
non-fragile abi.

llvm-svn: 63343
2009-01-29 23:23:06 +00:00
Fariborz Jahanian 61cd4b56c3 Set protocol linkage and visibility correctly and
build protocol translation table meta-data (objc2
non-fragile abi).

llvm-svn: 63329
2009-01-29 20:10:59 +00:00
Fariborz Jahanian 56b3b77c7d Protocol meta-data for objc2's non-fragile abi.
Lot more to do in this area.

llvm-svn: 63326
2009-01-29 19:24:30 +00:00
Fariborz Jahanian d27a820ae2 Add setter/getter methods to the list of methods
of class's meta-data (related to objc2 nonfragile abi).

llvm-svn: 63251
2009-01-28 22:46:49 +00:00
Fariborz Jahanian 066347ec7b property metadata for objc2's nonfragile abi
llvm-svn: 63246
2009-01-28 22:18:42 +00:00
Fariborz Jahanian b042a59230 Some refactoring of common code. No change in functionality.
llvm-svn: 63218
2009-01-28 19:12:34 +00:00
Fariborz Jahanian 3d3426f321 Set visibility of ivar offset symbols according to
accessibility of the ivar (related to objc2's
non-fragile abi).

llvm-svn: 63166
2009-01-28 01:36:42 +00:00
Fariborz Jahanian 40a4bcd49b Generation of ivar-offset symbols in objc2's non-fragile abi.
Changed section names for meta-data (to match current gcc).

llvm-svn: 63163
2009-01-28 01:05:23 +00:00
Fariborz Jahanian e19a1f15ae After talking to our runtime guru, I added a comment.
llvm-svn: 63141
2009-01-27 22:27:56 +00:00
Fariborz Jahanian 7415caa3d4 ivar meta-data generation for nonfragile-abi.
Still more work to do in this area.

llvm-svn: 63126
2009-01-27 19:38:51 +00:00
Fariborz Jahanian d0e8e85afc Added a FIXME.
llvm-svn: 63071
2009-01-26 23:49:05 +00:00
Fariborz Jahanian 2612e149ef Build method-description-list for category meta-data
as well (for nonfragile-abi).

llvm-svn: 63062
2009-01-26 22:58:07 +00:00
Fariborz Jahanian 99113fd577 Method decription meta-data and its setting in class_ro_t
meta-data.

llvm-svn: 63043
2009-01-26 21:38:32 +00:00
Fariborz Jahanian 0c8d060715 Meta-data for nonfragile-abi's categories
llvm-svn: 63020
2009-01-26 18:32:24 +00:00
Fariborz Jahanian a887e63434 Compute instaceStart/instanceSize fields of the class_ro_t meta-data
for objc2's non-fragile abi.

llvm-svn: 62945
2009-01-24 23:43:01 +00:00
Fariborz Jahanian 4723fb70a9 Patch to build class meta-data for each implementation
of class in objc2's nonfragile abi.

llvm-svn: 62935
2009-01-24 21:21:53 +00:00
Fariborz Jahanian 9e3ad5220d This patch builds the meta-class object for each
implemented class in objc2's nonfrigile abi.

llvm-svn: 62929
2009-01-24 20:21:50 +00:00
Fariborz Jahanian 71394045e4 Some very early work for new objc's
meta-data generation.

llvm-svn: 62894
2009-01-23 23:53:38 +00:00
Fariborz Jahanian 7fa50496f6 Checked in an oops!
llvm-svn: 62853
2009-01-23 17:48:29 +00:00
Fariborz Jahanian 5a63e4cd53 Another missing LLVM type for objc2's new abi defined.
llvm-svn: 62852
2009-01-23 17:41:22 +00:00
Fariborz Jahanian 0232c0569f Define LLVM types for nonfragile abi metadata.
llvm-svn: 62830
2009-01-23 01:46:23 +00:00
Fariborz Jahanian b15a3d5969 Use NonFragileABI as name of new Next abi. More comments
for the new meta-data.

llvm-svn: 62806
2009-01-22 23:02:58 +00:00
Fariborz Jahanian eee54df5b6 More refactoring of common API to the common class for
the two Next's objc runtimes. More comments.

llvm-svn: 62735
2009-01-22 00:37:21 +00:00
Fariborz Jahanian 0b1ccdce88 Moved whole bunch of common APIs to the common class.
No change in functionality.

llvm-svn: 62729
2009-01-21 23:34:32 +00:00
Fariborz Jahanian 279eda6275 Refactoring ObjC Next's runtime classes in preparation for
the new ObjC's abi.

llvm-svn: 62721
2009-01-21 22:04:16 +00:00
Fariborz Jahanian 4b4c826999 Commented objective-c's metadata types. Minor clean up.
No change in functionality.

llvm-svn: 62646
2009-01-21 00:39:53 +00:00
Douglas Gregor 6e6ad602e5 Remove ScopedDecl, collapsing all of its functionality into Decl, so
that every declaration lives inside a DeclContext.

Moved several things that don't have names but were ScopedDecls (and,
therefore, NamedDecls) to inherit from Decl rather than NamedDecl,
including ObjCImplementationDecl and LinkageSpecDecl. Now, we don't
store empty DeclarationNames for these things, nor do we try to insert
them into DeclContext's lookup structure.

The serialization tests are temporarily disabled. We'll re-enable them
once we've sorted out the remaining ownership/serialiazation issues
between DeclContexts and TranslationUnion, DeclGroups, etc.

llvm-svn: 62562
2009-01-20 01:17:11 +00:00
Fariborz Jahanian 705c6d9cdd Patch to re-implement ivar-list meta-data generation to fix
cases of unnamed ivar bitfields.

llvm-svn: 62429
2009-01-17 19:36:33 +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
Daniel Dunbar 62db95e891 (LLVM up) Match TargetData API change in LLVM TOT.
llvm-svn: 62101
2009-01-12 21:08:18 +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
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
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
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
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
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
Fariborz Jahanian b517e90662 Code gen. for ivar references; including bitfield
ivars.

llvm-svn: 61043
2008-12-15 20:35:07 +00:00
Douglas Gregor 91f84216f7 Unifies the name-lookup mechanisms used in various parts of the AST
and separates lexical name lookup from qualified name lookup. In
particular:
  * Make DeclContext the central data structure for storing and
    looking up declarations within existing declarations, e.g., members
    of structs/unions/classes, enumerators in C++0x enums, members of
    C++ namespaces, and (later) members of Objective-C
    interfaces/implementations. DeclContext uses a lazily-constructed
    data structure optimized for fast lookup (array for small contexts,
    hash table for larger contexts). 

  * Implement C++ qualified name lookup in terms of lookup into
    DeclContext.

  * Implement C++ unqualified name lookup in terms of
    qualified+unqualified name lookup (since unqualified lookup is not
    purely lexical in C++!)

  * Limit the use of the chains of declarations stored in
    IdentifierInfo to those names declared lexically.

  * Eliminate CXXFieldDecl, collapsing its behavior into
    FieldDecl. (FieldDecl is now a ScopedDecl).

  * Make RecordDecl into a DeclContext and eliminates its
    Members/NumMembers fields (since one can just iterate through the
    DeclContext to get the fields).

llvm-svn: 60878
2008-12-11 16:49:14 +00:00
Anders Carlsson a726c1763a Append an extra newline to the module inline asm if it's not empty.
llvm-svn: 60827
2008-12-10 02:21:04 +00:00
Chris Lattner f3d3faeca6 Rename NamedDecl::getName() to getNameAsString(). Replace a bunch of
uses of getName() with uses of getDeclName().  This upgrades a bunch of
diags to take DeclNames instead of std::strings.

This also tweaks a couple of diagnostics to be cleaner and changes
CheckInitializerTypes/PerformInitializationByConstructor to pass
around DeclarationNames instead of std::strings.

llvm-svn: 59947
2008-11-24 05:29:24 +00:00
Chris Lattner 86d7d91366 Rename NamedDecl::getIdentifierName() to ::getNameAsCString() and make it
assert if the name is not an identifier.  Update callers to do the right
thing and avoid this method in unsafe cases.  This also fixes an objc
warning that was missing a space, and migrates a couple more to taking
IdentifierInfo and QualTypes instead of std::strings.

llvm-svn: 59936
2008-11-24 03:54:41 +00:00