| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 64605
|
| |
|
|
|
|
| |
like printf and malloc. Fixes PR3586
llvm-svn: 64566
|
| |
|
|
|
|
|
|
| |
which consequently caused a Seg fault. during meta-data
generation. It also addresses an issue related to
late binding of newly synthesize ivars (when we support it).
llvm-svn: 64563
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently only used for 128-bit integers.
Note that we can't use the fixed-width integer types for other integer
modes without other changes because glibc headers redefines (u)int*_t
and friends using the mode attribute. For example, this means that uint64_t
has to be compatible with unsigned __attribute((mode(DI))), and
uint64_t is currently defined to long long. And I have a feeling we'll
run into issues if we try to define uint64_t as something which isn't
either long or long long.
This doesn't get the alignment right in most cases, including
the 128-bit integer case; I'll file a PR shortly. The gist of the issue
is that the targets don't really expose the information necessary to
figure out the alignment outside of the target description, so there's a
non-trivial amount of work involved in getting it working right. That
said, the alignment used is conservative, so the only issue with the
current implementation is ABI compatibility.
This makes it trivial to add some sort of "bitwidth" attribute to make
arbitrary-width integers; I'll do that in a followup.
We could also use this for stuff like the following for compatibility
with gcc, but I have a feeling it would be a better idea for clang to be
consistent between C and C++ modes rather than follow gcc's example for
C mode.
struct {unsigned long long x : 33;} x;
unsigned long long a(void) {return x.x+1;}
llvm-svn: 64434
|
| |
|
|
|
|
|
|
| |
- rename isObjCIdType/isObjCClassType -> isObjCIdStructType/isObjCClassStructType. The previous name didn't do what you would expect.
- add back isObjCIdType/isObjCClassType to do what you would expect. Not currently used, however many of the isObjCIdStructType/isObjCClassStructType clients could be converted over time.
- move static Sema function areComparableObjCInterfaces to ASTContext (renamed to areComparableObjCPointerTypes, since it now operates on pointer types).
llvm-svn: 64385
|
| |
|
|
|
|
| |
All relevant dejagnu enocding tests pass in this mode.
llvm-svn: 64341
|
| |
|
|
|
|
|
| |
all but one dejagnu encoding tests for darwin
pass in nonfragile abi mode.
llvm-svn: 64334
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to a class template. For example, the template-id 'vector<int>' now
has a nice, sugary type in the type system. What we can do now:
- Parse template-ids like 'vector<int>' (where 'vector' names a
class template) and form proper types for them in the type system.
- Parse icky template-ids like 'A<5>' and 'A<(5 > 0)>' properly,
using (sadly) a bool in the parser to tell it whether '>' should
be treated as an operator or not.
This is a baby-step, with major problems and limitations:
- There are currently two ways that we handle template arguments
(whether they are types or expressions). These will be merged, and,
most likely, TemplateArg will disappear.
- We don't have any notion of the declaration of class template
specializations or of template instantiations, so all template-ids
are fancy names for 'int' :)
llvm-svn: 64153
|
| |
|
|
|
|
|
|
|
|
|
| |
canonicalize by template parameter depth, index, and name, and the
unnamed version of a template parameter serves as the canonical.
TemplateTypeParmDecl no longer needs to inherit from
TemplateParmPosition, since depth and index information is present
within the type.
llvm-svn: 63899
|
| |
|
|
| |
llvm-svn: 63750
|
| |
|
|
|
|
|
|
| |
consistency with GCC).
This fixes <rdar://problem/6538564> clang ObjC rewriter: Wrong encoding emitted for methods with Block parameters.
llvm-svn: 63534
|
| |
|
|
| |
llvm-svn: 63238
|
| |
|
|
|
|
|
|
|
|
|
| |
-disable-free).
snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m
0.179u 0.051s 0:00.23 95.6% 0+0k 0+0io 0pf+0w
snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m -disable-free
0.169u 0.052s 0:00.22 95.4% 0+0k 0+0io 0pf+0w
llvm-svn: 63153
|
| |
|
|
|
|
| |
Also changed FunctionTypeProto to be allocated with 8-byte alignment (noticed by Doug). I couldn't think of any reason to allocate on 16-byte boundaries. If anyone remembers why we were doing this, let me know!
llvm-svn: 63137
|
| |
|
|
| |
llvm-svn: 63116
|
| |
|
|
|
|
|
| |
of a type. The implementation is currently something of a hack, but is
sufficient for now and allows clients to be built on it.
llvm-svn: 63108
|
| |
|
|
|
|
| |
pointed out by Doug.
llvm-svn: 62944
|
| |
|
|
|
|
|
| |
not the type" semantics. This can definitely be improved, but is better than
what we had.
llvm-svn: 62939
|
| |
|
|
|
|
| |
Add serialization support for ReferenceType.
llvm-svn: 62934
|
| |
|
|
| |
llvm-svn: 62611
|
| |
|
|
|
|
| |
case.
llvm-svn: 62607
|
| |
|
|
| |
llvm-svn: 62601
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
The QualType smart pointer assumes we have 3 flag bits available.
llvm-svn: 62540
|
| |
|
|
| |
llvm-svn: 62530
|
| |
|
|
| |
llvm-svn: 62458
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
even when we are still defining the TagDecl. This is required so that
qualified name lookup of a class name within its definition works (see
the new bits in test/SemaCXX/qualified-id-lookup.cpp).
As part of this, move the nested redefinition checking code into
ActOnTag. This gives us diagnostics earlier (when we try to perform
the nested redefinition, rather than when we try to complete the 2nd
definition) and removes some code duplication.
llvm-svn: 62386
|
| |
|
|
|
|
| |
Issue diagnostics instead if types do not match.
llvm-svn: 62349
|
| |
|
|
| |
llvm-svn: 62315
|
| |
|
|
|
|
| |
objects as an objective-c object.
llvm-svn: 62197
|
| |
|
|
| |
llvm-svn: 62135
|
| |
|
|
| |
llvm-svn: 62122
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 61764
|
| |
|
|
|
|
|
| |
- I'm not sure this is appropriate, but it seems reasonable to be
able to call getFloatingRank on anything which isFloatingType().
llvm-svn: 61758
|
| |
|
|
|
|
| |
We now pass all gcc's encoding compatibility tests.
llvm-svn: 61387
|
| |
|
|
|
|
| |
gcc compatibilty in all aspects of encoding now.
llvm-svn: 61383
|
| |
|
|
|
|
| |
outer-most const of pointer types.
llvm-svn: 61355
|
| |
|
|
|
|
| |
CodeGenFunction::EmitArraySubscriptExpr.
llvm-svn: 61303
|
| |
|
|
|
|
| |
using it in ObjC's method parameter encoding.
llvm-svn: 61293
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
@encode of classes and bitfields.
llvm-svn: 61268
|
| |
|
|
| |
llvm-svn: 61231
|
| |
|
|
|
|
| |
code gen which did not belong there.
llvm-svn: 61203
|
| |
|
|
|
|
| |
and ASTRecordForInterface maps
llvm-svn: 61163
|
| |
|
|
|
|
|
| |
Note that one test duplicate-ivar-check.m will fail because I
need to re-implement duplicate ivar checking.
llvm-svn: 61154
|
| |
|
|
|
|
|
|
|
|
| |
together in the same way that we link RecordDecl/CXXRecordDecl nodes.
Unify ActOnTag and ActOnTagStruct.
Fixes PR clang/2753.
llvm-svn: 61034
|
| |
|
|
| |
llvm-svn: 60897
|
| |
|
|
|
|
| |
RecordDecl::field_const_iterator, propagating the constness down to the FieldDecls.
llvm-svn: 60883
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|