Daniel Dunbar
e3532f82a7
Switch ABI selection to use llvm::Triple instead of string munging.
...
llvm-svn: 79900
2009-08-24 08:52:16 +00:00
Douglas Gregor
76d8c5725f
Don't install Clang libraries.
...
llvm-svn: 79824
2009-08-23 05:02:18 +00:00
Anders Carlsson
622ddae92b
Whoops, comment this out for now. I'll fix it shortly.
...
llvm-svn: 79806
2009-08-23 01:28:08 +00:00
Anders Carlsson
d606de72ab
More work towards zero-initializing structs that contain member pointers in constant expressions.
...
llvm-svn: 79805
2009-08-23 01:25:01 +00:00
Anders Carlsson
beac2bef4d
Remove the PaddingFields member from CGRecordLayout, it wasn't used anyway.
...
llvm-svn: 79799
2009-08-23 01:01:04 +00:00
Anders Carlsson
faeccc622f
Handle CK_NullToMemberPointer casts in the constant expr emitter.
...
llvm-svn: 79790
2009-08-23 00:02:11 +00:00
Anders Carlsson
3b0c5dcdd2
Change the constant expression emitter to look at the cast kind for to-union casts.
...
llvm-svn: 79789
2009-08-22 23:54:44 +00:00
Anders Carlsson
9cedbefb24
Add a -fno-elide-constructors option to clang-cc.
...
llvm-svn: 79782
2009-08-22 22:30:33 +00:00
Mike Stump
0b8c5ae7af
Calculate the address point for a vtable better, and start fleshing out the vcall
...
calculations better.
llvm-svn: 79687
2009-08-21 23:09:30 +00:00
Fariborz Jahanian
8adc973483
Patch to ir-gen copy assigning array members when synthesizing
...
a copy assignment operator function.
llvm-svn: 79681
2009-08-21 22:34:55 +00:00
Fariborz Jahanian
5626384384
Patch to provide ir-gen support in copying array members
...
when synthesizing a copy constructor. Arrays's base element
may have a trivial or non-trivial copy constructor.
llvm-svn: 79653
2009-08-21 18:30:26 +00:00
Fariborz Jahanian
7481bd88bb
Array member construction in prologue of user-declared
...
constructors.
llvm-svn: 79640
2009-08-21 17:09:38 +00:00
Fariborz Jahanian
6c9e5a2b9e
Introduce getConstantArrayElementCount API and use it in
...
construction/destruction of array members.
llvm-svn: 79637
2009-08-21 16:31:06 +00:00
Mike Stump
a002945a20
We now support overriding base functions in vtables. WIP.
...
llvm-svn: 79587
2009-08-21 01:45:00 +00:00
Argyrios Kyrtzidis
6032ef1aa3
Remove TypeSpecStartLocation from VarDecl/FunctionDecl/FieldDecl, and use DeclaratorInfo to get this information.
...
llvm-svn: 79584
2009-08-21 00:31:54 +00:00
Fariborz Jahanian
1a606ab12a
Patch to ir-gen destruction of array member elements in revers order
...
of their construction.
llvm-svn: 79571
2009-08-20 23:02:58 +00:00
Fariborz Jahanian
9c83720d17
ir-gen patch to destruct array members. WIP.
...
llvm-svn: 79565
2009-08-20 20:54:15 +00:00
Fariborz Jahanian
9a84665921
Using "ObjCImplicitSetterGetterRefExpr" instead of "ObjCImplctSetterGetterRefExpr".
...
A field rename and more comments.
llvm-svn: 79537
2009-08-20 17:02:02 +00:00
Mike Stump
cae6178b3b
Refine vbase offsets for the inductive case. Things are now starting
...
to come together nicely. Still a WIP.
llvm-svn: 79521
2009-08-20 07:22:17 +00:00
Mike Stump
2220447adc
Ensure we don't output repeated vbase offsets. I have a testcase for
...
this, but need to fixup the actual offset value before I can check it
in. WIP.
llvm-svn: 79506
2009-08-20 02:11:48 +00:00
Fariborz Jahanian
dd46eb770f
Test case for my last patch plus a minor clean up.
...
llvm-svn: 79500
2009-08-20 01:01:06 +00:00
Fariborz Jahanian
eeb0e57247
ir-gen for multi-dimensional array construction. WIP.
...
llvm-svn: 79497
2009-08-20 00:15:15 +00:00
Fariborz Jahanian
a8fe2c26a8
Removed unneeded code for break/continue statements in
...
manufactured for-loop per Anders feedback (thanks).
- Fariborz
llvm-svn: 79466
2009-08-19 21:10:38 +00:00
Fariborz Jahanian
431c883287
ir-gen for constructing arrays as non-static data members. WIP.
...
llvm-svn: 79464
2009-08-19 20:55:16 +00:00
Daniel Dunbar
58bc48c14e
Switch to SmallString::str from SmallString::c_str.
...
- Several FIXMEs due to non-Twinification of IRBuilder.
llvm-svn: 79455
2009-08-19 20:04:03 +00:00
Mike Stump
3bc0a3bf7d
One second thought, I think I want to limit this class to just vtable
...
building activities.
llvm-svn: 79438
2009-08-19 18:10:47 +00:00
Mike Stump
b386941208
Cleanup: fold IndirectPrimary into builder.
...
llvm-svn: 79423
2009-08-19 14:40:47 +00:00
Mike Stump
3b09f004db
We don't want to confuse this layout with the BLayout from the builder.
...
llvm-svn: 79422
2009-08-19 14:06:50 +00:00
Mike Stump
984c99d190
Restore vbase offsets for classes without a primary.
...
llvm-svn: 79402
2009-08-19 02:53:08 +00:00
Mike Stump
583ef62149
Refine vcalls a little.
...
llvm-svn: 79400
2009-08-19 02:06:38 +00:00
Argyrios Kyrtzidis
e918926d31
Introduce LocInfoType which is a Sema-specific implementation detail.
...
This is a Type subclass that can hold a DeclaratorInfo* when we have type source info coming
out of a declarator that we want to preserve. This is used only at the "border" of Parser/Sema for
passing/getting QualTypes, it does not participate in the type system semantics in any way.
llvm-svn: 79394
2009-08-19 01:28:17 +00:00
Argyrios Kyrtzidis
60ed560428
Introduce DeclaratorDecl and pass DeclaratorInfo through the Decl/Sema interfaces.
...
DeclaratorDecl contains a DeclaratorInfo* to keep type source info.
Subclasses of DeclaratorDecl are FieldDecl, FunctionDecl, and VarDecl.
EnumConstantDecl still inherits from ValueDecl since it has no need for DeclaratorInfo.
Decl/Sema interfaces accept a DeclaratorInfo as parameter but no DeclaratorInfo is created yet.
llvm-svn: 79392
2009-08-19 01:27:57 +00:00
Mike Stump
6fe6ca11da
Cleanup.
...
llvm-svn: 79374
2009-08-18 22:04:08 +00:00
Mike Stump
494c42526b
Add some documentation.
...
llvm-svn: 79373
2009-08-18 21:59:28 +00:00
Mike Stump
07347353a0
Cleanups. Move GenerateRtti to CodeGenModule.
...
llvm-svn: 79372
2009-08-18 21:49:00 +00:00
Fariborz Jahanian
19380c4b88
Renamed ClassProp data member of ObjCImplctSetterGetterRefExpr
...
to InterfaceDecl, as it is unrelated to any property and
holds the InterfaceDecl needed for accessing class getter/setter
methods using the dot-syntax.
llvm-svn: 79371
2009-08-18 21:37:33 +00:00
Mike Stump
ee81dca8c7
Move the rest of the vtable building code into the new builder.
...
llvm-svn: 79370
2009-08-18 21:30:21 +00:00
Mike Stump
1f18b9a301
Suck up method generation.
...
llvm-svn: 79367
2009-08-18 21:03:28 +00:00
Mike Stump
5cb34077ef
Split out vtable bulding code into a builder.
...
llvm-svn: 79366
2009-08-18 20:50:28 +00:00
Fariborz Jahanian
88cc2340de
Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr.
...
Removed an unnecessary loop to get to setters incoming
argument. Added DoxyGen comments. Still more work
to do in this area (WIP).
llvm-svn: 79365
2009-08-18 20:50:23 +00:00
David Chisnall
26657ea8bc
Fixed typo in last commit pointed out by Anton.
...
llvm-svn: 79290
2009-08-17 23:18:30 +00:00
David Chisnall
de3a06933d
Changes to TargetABIInfo to (hopefully) select the correct calling convention. This has been tested on FreeBSD, and now correctly generates GCC-compatible code for functions returning small structures. Please test it on other platforms!
...
llvm-svn: 79288
2009-08-17 23:08:21 +00:00
Fariborz Jahanian
d172e91f2a
Patch to 1) synthesizing non-trivial default destructor when
...
one is not provided by user. 2) More complete
emission of ctor prologue when it has no initializer
list or when it is synthesized.
llvm-svn: 79269
2009-08-17 19:04:50 +00:00
Anders Carlsson
49033712e4
Remove an ErrorUnsupported call.
...
llvm-svn: 79261
2009-08-17 18:24:57 +00:00
David Chisnall
9f57c29053
Initial patch to support definitions of id and Class from headers in Objective-C code.
...
This currently breaks test/SemaObjC/id-isa-ref.m and issues some spurious warnings when you attempt to assign a struct objc_class* value to a Class variable. The test case probably should fail as it's written, because without the definition of Class the compiler should not assume struct objc_class* is a valid receiver type, but it's left broken because it would be nice if we could get that passing too for the special case of isa.
Approved by snaroff.
llvm-svn: 79248
2009-08-17 16:35:33 +00:00
Anders Carlsson
81f0df9601
Improve handling of delete expressions.
...
llvm-svn: 79205
2009-08-16 21:13:42 +00:00
Fariborz Jahanian
d262eda6fc
Patch toward synthesizing non-trivial destructors. WIP
...
llvm-svn: 79199
2009-08-16 19:36:17 +00:00
Anders Carlsson
3b848940d7
Only do this for initializers of course.
...
llvm-svn: 79197
2009-08-16 17:54:29 +00:00
Anders Carlsson
b80760bd78
Destroy bound temporaries.
...
llvm-svn: 79196
2009-08-16 17:50:25 +00:00
Anders Carlsson
5b106a7545
Add an IsInitializer flag to EmitAnyExpr. This is used to prevent temporaries from being destroyed when they're bound to a reference variable.
...
llvm-svn: 79179
2009-08-16 07:36:22 +00:00
Anders Carlsson
157c321b7c
No need to append extra padding now that we don't create packed structs for simple cases like the constant string.
...
llvm-svn: 79178
2009-08-16 05:55:31 +00:00
Mike Stump
22ea1f8a30
Cleanups and fixups for calculating the virtual base offsets. WIP.
...
llvm-svn: 79156
2009-08-16 01:46:26 +00:00
Fariborz Jahanian
0aed0225b4
Improved on ir-gen for synthesis of non-trivial default
...
constructor body whose class has non-static data-members which
required non-trivial construction.
llvm-svn: 79125
2009-08-15 18:55:17 +00:00
Eli Friedman
04fddf0d1f
Fix for PR4721: adjust CodeGen and ASTContext so that we have a
...
consistent model for handling size expressions for VLAs.
The model is essentially as follows: VLA types own their associated
expression. In some cases, we need to create multiple VLA types to
represent a given VLA (for canonical types, or qualifiers on array types,
or type merging). If we need to create multiple types based off of
the same VLA declaration, we use the new refcounting functionality so they can
all own the expression. The VLASizeMap in CodeGenFunction then uses the size
expression to identify the group of VLA types based off of the same original
declaration.
I'm not particularly attached to the VLA types owning the expression,
but we're stuck with at least until someone comes up with a way
to walk the VLA expressions for a declaration.
I did the parallel fix in ASTContext for DependentSizedArrayType, but I
haven't really looked closely at it, so there might still be issues
there.
I'll clean up the code duplication in ASTContext in a followup commit.
llvm-svn: 79071
2009-08-15 02:50:32 +00:00
John McCall
deb8448690
Disable all recognition of main() in -ffreestanding. Addresses bug #4720 .
...
llvm-svn: 79070
2009-08-15 02:09:25 +00:00
Chris Lattner
8dc7626f9c
minor cleanups for VLA stuff.
...
llvm-svn: 79059
2009-08-15 00:03:43 +00:00
Chris Lattner
19efdd67dd
use GetVLASize instead of accessing VLASizeMap directly, this gets an assert if
...
VLASize isn't populated for the type yet.
llvm-svn: 79057
2009-08-14 23:43:22 +00:00
Devang Patel
d4bbb08946
Do now overflow while calulating upper bound for zero sized array.
...
llvm-svn: 79043
2009-08-14 20:57:45 +00:00
Fariborz Jahanian
42af5ba7b7
ir-gen for generation of trvial copy constructor
...
call.
llvm-svn: 79034
2009-08-14 20:11:43 +00:00
Mike Stump
bcf756cbac
Deconflate virtual base offsets from non-virtual base offsets.
...
Deconflate a virtual base primary from a non-virtual base.
llvm-svn: 78971
2009-08-14 01:44:03 +00:00
Fariborz Jahanian
92b3f47de2
Fixed a bug in ir-gen for copy assignment synthesis.
...
Fixed a bug when evaluating those copy-assignments
which need by lazily syntheized. A test case
for these.
llvm-svn: 78965
2009-08-14 00:01:54 +00:00
Owen Anderson
c36edfede5
Update for LLVM API change.
...
llvm-svn: 78957
2009-08-13 23:27:53 +00:00
Mike Stump
c2f591b1e6
Refine vtable layout for virtual bases and keep better track of
...
primaries. WIP.
llvm-svn: 78950
2009-08-13 22:53:07 +00:00
Owen Anderson
41a750271b
Update for LLVM API change.
...
llvm-svn: 78946
2009-08-13 21:57:51 +00:00
Fariborz Jahanian
4985b33fd7
Patch to force synthesis of copy assignment operator
...
function in the order according to c++03. ir-gen
for copy assignment in the trivial case and the first
test case.
llvm-svn: 78938
2009-08-13 21:09:41 +00:00
Mike Stump
2631d8c517
Minor cleanups.
...
llvm-svn: 78927
2009-08-13 18:39:54 +00:00
Mike Stump
1300754fdd
Prep for vbase layout refinements. WIP.
...
llvm-svn: 78882
2009-08-13 02:02:14 +00:00
Fariborz Jahanian
9b630c3040
Minor refactoring of copy assign operator ir-gen. SWIP.
...
llvm-svn: 78875
2009-08-13 00:53:36 +00:00
Fariborz Jahanian
bbd5e8c2cf
More toward synthesizing copy assignments. SWIP.
...
llvm-svn: 78861
2009-08-12 23:34:46 +00:00
Mike Stump
b661738203
Cleanup.
...
llvm-svn: 78858
2009-08-12 23:25:18 +00:00
Mike Stump
938f15b033
Refactor. WIP. Eventually, this will all go into a vtable builder class.
...
llvm-svn: 78857
2009-08-12 23:14:12 +00:00
Mike Stump
480212253a
Cleanup.
...
llvm-svn: 78855
2009-08-12 23:03:28 +00:00
Mike Stump
82165efbc4
Refactor.
...
llvm-svn: 78854
2009-08-12 23:00:59 +00:00
Mike Stump
dc94d3fd27
Refactor.
...
llvm-svn: 78851
2009-08-12 22:34:12 +00:00
Fariborz Jahanian
de7d4c264a
Patch for synthesizing copy assignment operator.
...
WIP.
llvm-svn: 78841
2009-08-12 21:14:35 +00:00
Mike Stump
9deb22b850
Improve the secondary vtables to not include vbase offsets. WIP.
...
llvm-svn: 78831
2009-08-12 18:50:26 +00:00
Mike Stump
cecfe61cd1
Refine vtable building for the secondary vtables to exclude yet more
...
cases where a virtual base was already used as a primary base class.
WIP.
llvm-svn: 78820
2009-08-12 17:42:21 +00:00
Dan Gohman
b321039271
Use the new nsw form of add for signed integer addition.
...
llvm-svn: 78765
2009-08-12 01:16:29 +00:00
Dan Gohman
43b4484f87
Use the inbounds variant of getelementptr for common pointer arithmetic.
...
llvm-svn: 78756
2009-08-12 00:33:55 +00:00
Dan Gohman
1cebe56735
Remove the hack that turns sdiv by a power of 2 to ashr, and
...
use the new "exact" sdiv to allow LLVM optimization to perform
this transformation.
llvm-svn: 78739
2009-08-11 22:40:09 +00:00
Fariborz Jahanian
b2197042b8
ir-gen support for anonymous union data member
...
copying in copy constructors and used in
default constructor's initializer list.
llvm-svn: 78700
2009-08-11 18:49:54 +00:00
Benjamin Kramer
9cd050ab07
LLVMContext is a class now.
...
llvm-svn: 78691
2009-08-11 17:46:57 +00:00
Mike Stump
78696a70bf
Implement more of the inductive case for vtable layout involving
...
virtual base primaries and improve the layout of classes with virtual
bases. WIP.
Hey, I've decided I want a change to FileCheck, I need to ensure that
the group is together, nothing in between. Can we change it to check
the match line is from the line immediately following the last matched
line, if the source for the matched line is immediately after the
source for the previously matched line?
// CHECK: 1
// CHECK: 2
// CHECK: 3
// CHECK: 4
// CHECK: 5
// CHECK: 6
would require 1 2 and 3 to be continuous in the output, and 4 5 and 6
to be continuous.
llvm-svn: 78638
2009-08-11 04:03:59 +00:00
Fariborz Jahanian
296584b2a9
Support for anonymous union in ctor's initializer and
...
bunch of FIXMEs for their is-gen.
llvm-svn: 78623
2009-08-10 23:56:17 +00:00
Nate Begeman
5ec4b318e3
Take 2 on AltiVec-style vector initializers.
...
Fixes PR4704 problems
Addresses Eli's patch feedback re: ugly cast code
Updates all postfix operators to remove ParenListExprs. While this is awful,
no better solution (say, in the parser) is obvious to me. Better solutions
welcome.
llvm-svn: 78621
2009-08-10 23:49:36 +00:00
Fariborz Jahanian
9d3405ceab
minor refactoring. No change otherwise.
...
llvm-svn: 78582
2009-08-10 18:46:38 +00:00
Fariborz Jahanian
7cc52cf09f
ir-gen for generating copying of scalar data members in
...
a synthesized copy constructor.
llvm-svn: 78580
2009-08-10 18:34:26 +00:00
Fariborz Jahanian
2a26e351fc
Fixed a ir-gen bug in synthesizing copy constructors.
...
llvm-svn: 78570
2009-08-10 17:20:45 +00:00
Daniel Dunbar
481fe50903
Revert r78535, it is causing a number of failures to build projects.
...
--- Reverse-merging r78535 into '.':
D test/Sema/altivec-init.c
U include/clang/Basic/DiagnosticSemaKinds.td
U include/clang/AST/Expr.h
U include/clang/AST/StmtNodes.def
U include/clang/Parse/Parser.h
U include/clang/Parse/Action.h
U tools/clang-cc/clang-cc.cpp
U lib/Frontend/PrintParserCallbacks.cpp
U lib/CodeGen/CGExprScalar.cpp
U lib/Sema/SemaInit.cpp
U lib/Sema/Sema.h
U lib/Sema/SemaExpr.cpp
U lib/Sema/SemaTemplateInstantiateExpr.cpp
U lib/AST/StmtProfile.cpp
U lib/AST/Expr.cpp
U lib/AST/StmtPrinter.cpp
U lib/Parse/ParseExpr.cpp
U lib/Parse/ParseExprCXX.cpp
llvm-svn: 78551
2009-08-10 03:01:36 +00:00
Ryan Flynn
1f1fdc070e
map previously ignored __attribute((malloc)) to noalias attribute of llvm function's return
...
llvm-svn: 78541
2009-08-09 20:07:29 +00:00
Anders Carlsson
f48123b413
Improve handling of member pointers.
...
llvm-svn: 78536
2009-08-09 18:26:27 +00:00
Nate Begeman
a96114ed08
AltiVec-style vector initializer syntax, vec4 a = (vec4)(a, b, c, d);
...
In addition to being defined by the AltiVec PIM, this is also the vector
initializer syntax used by OpenCL, so that vector literals are compatible
with macro arguments.
llvm-svn: 78535
2009-08-09 17:55:44 +00:00
Benjamin Kramer
b57e5d2f4f
Older GCCs don't have vector::data().
...
llvm-svn: 78519
2009-08-08 23:43:26 +00:00
Fariborz Jahanian
24f38969d5
ir-gen for initialization, in synthesize copy constructor,
...
of base/field which have trivial copy constructor.
llvm-svn: 78516
2009-08-08 23:32:22 +00:00
Anders Carlsson
b8be93fc92
Add support for global initializers.
...
llvm-svn: 78515
2009-08-08 23:24:23 +00:00
Anders Carlsson
f40886acca
Refactor some code and implement support for global destructors for static variables.
...
llvm-svn: 78507
2009-08-08 21:45:14 +00:00
Anders Carlsson
28a5fa29f3
Take #pragma pack into account when laying out structs. Fixes rdar://problem/7095436.
...
llvm-svn: 78490
2009-08-08 19:38:24 +00:00
Fariborz Jahanian
f6bda5d61e
Refactoring of copy ctor ir-gen. No change in functionality.
...
llvm-svn: 78489
2009-08-08 19:31:03 +00:00
Anders Carlsson
68e0b68289
Introduce a new PragmaPack attribute, and use it for #pragma pack. The PackedAttr now only represents __attribute__((packed)).
...
This is necessary because #pragma pack and __attribute__((packed)) have different semantics. No functionality change yet, but this lays the groundwork for fixing a record layout bug.
llvm-svn: 78483
2009-08-08 18:23:56 +00:00
Anders Carlsson
453878bed4
Assert that the LLVM type has the same size as the RecordDecl size.
...
llvm-svn: 78481
2009-08-08 18:01:57 +00:00
Fariborz Jahanian
7c3d7f6c59
Remove use of uninitized variable.
...
llvm-svn: 78448
2009-08-08 00:59:58 +00:00
Fariborz Jahanian
59b3259284
Synthesize copying of non-static data members with
...
non-trivial copy constructors.
llvm-svn: 78445
2009-08-08 00:15:41 +00:00
Fariborz Jahanian
b68df0bc42
Synthesized copy constructor now generates code for
...
copying non-virtual base classes which have non-trivial
constructor. Work in progress.
llvm-svn: 78436
2009-08-07 23:51:33 +00:00
Anders Carlsson
8fc489da2a
Add a CK_ArrayToPointerDecay cast kind.
...
llvm-svn: 78434
2009-08-07 23:48:20 +00:00
Anders Carlsson
ec143777ba
Add CK_ToUnion and use it for aggregate expression codegen.
...
llvm-svn: 78429
2009-08-07 23:22:37 +00:00
Mike Stump
16644668cd
Add vbase offsets to the vtable. Wow, having an rbegin was so
...
fortuitous. WIP.
llvm-svn: 78413
2009-08-07 21:54:03 +00:00
Fariborz Jahanian
40134e71be
More synthesis of copy constructors. Work in progress.
...
llvm-svn: 78402
2009-08-07 20:22:40 +00:00
Mike Stump
a4d94b1a95
Fix typo.
...
llvm-svn: 78401
2009-08-07 20:14:05 +00:00
Mike Stump
c266c6d797
Add ability to generate vcall offsets for primary virtual base.
...
llvm-svn: 78396
2009-08-07 19:00:50 +00:00
Mike Stump
b93185d05a
Fix some const_cast issues. This is the beginning of the rabbit hole.
...
llvm-svn: 78393
2009-08-07 18:05:12 +00:00
Mike Stump
7c32eab164
Add support for vcall generation for vtables for virtual bases. WIP.
...
llvm-svn: 78357
2009-08-06 23:48:32 +00:00
Fariborz Jahanian
9301b24c0a
Patch toward synthesizing copy constructors.
...
Work in progress.
llvm-svn: 78355
2009-08-06 23:38:16 +00:00
Mike Stump
3e62d00271
Also generate the rtti field for virtual bases for vtables. Turn on
...
rtti so we can properly test it. Refactor code a little. Still a
work in progress.
llvm-svn: 78343
2009-08-06 21:49:36 +00:00
Fariborz Jahanian
001309371e
Set and use Elidable in elimination of copy ctors.
...
llvm-svn: 78331
2009-08-06 19:12:38 +00:00
Mike Stump
2d8d655922
Layout the primary base first in the vtable.
...
llvm-svn: 78327
2009-08-06 18:05:22 +00:00
Mike Stump
c255f3581a
More layout for virtual tables for virtual bases. Still in progress.
...
llvm-svn: 78314
2009-08-06 15:50:11 +00:00
Mike Stump
6b2556f829
Layout virtual bases. Work in progress.
...
llvm-svn: 78308
2009-08-06 13:41:24 +00:00
Daniel Dunbar
f1ad6b7064
Fix clang breakage, CGF can be null in this context.
...
llvm-svn: 78269
2009-08-06 01:24:27 +00:00
Fariborz Jahanian
eb869768f9
Patch to optimize away copy constructor call when
...
appropriate.
llvm-svn: 78267
2009-08-06 01:02:49 +00:00
Owen Anderson
758428f4e3
Update for LLVM API change.
...
llvm-svn: 78259
2009-08-05 23:18:46 +00:00
Mike Stump
a19718af5a
Refactor some bits.
...
llvm-svn: 78254
2009-08-05 22:59:44 +00:00
Mike Stump
d8fe7b2792
Calculate the primary base class better and use that when laying down
...
the vtable. Still a work in progress.
llvm-svn: 78252
2009-08-05 22:37:18 +00:00
Chris Lattner
c58e5699be
cgobjcgnu was making invalid common globals.
...
llvm-svn: 78161
2009-08-05 05:25:18 +00:00
Chris Lattner
f49573d1ee
weak globals that are const should get weak_odr linkage.
...
add a fixme about C++ const.
llvm-svn: 78159
2009-08-05 05:20:29 +00:00
Chris Lattner
c0693bc2ea
rdar://7119244 - globals with an explicit section specified don't get
...
common linkage.
llvm-svn: 78158
2009-08-05 04:56:58 +00:00
Mike Stump
9beac787c1
vtable building for simple inheritance. Still in progress.
...
llvm-svn: 78110
2009-08-04 21:58:42 +00:00
Mike Stump
7551d05358
Will I ever get used to CamelCase? Will I ever like capitols for
...
random variables?
--This line, and those below, will be ignored--
M lib/CodeGen/CGCXX.cpp
llvm-svn: 78094
2009-08-04 20:06:48 +00:00
Anders Carlsson
5638895b2a
Revert the fix for PR3800, it broke things.
...
llvm-svn: 78084
2009-08-04 18:18:36 +00:00
Anders Carlsson
19702bb054
Simplify alignment handling in the record builder.
...
llvm-svn: 78069
2009-08-04 16:29:15 +00:00
Daniel Dunbar
4d93a4f9d4
Make sure UTF-16 strings end with a 16-bit null (as opposed to 8-bit).
...
llvm-svn: 78001
2009-08-03 21:47:08 +00:00
Daniel Dunbar
a1d8bcd33e
When generating cleanup blocks for Obj-C @finally , mark them as catch all blocks
...
from the perspective of LLVM exception handling. Otherwise the C++ personality
function may decide not to run them, if it only detects cleanup handlers.
- Test case for this is exceptions.m in llvm-test.
llvm-svn: 77999
2009-08-03 21:20:07 +00:00
Fariborz Jahanian
d44bdb2926
assert(nyi) on attempt to destruct an array of objects.
...
llvm-svn: 77993
2009-08-03 20:51:29 +00:00
Fariborz Jahanian
18c062361d
ir-gen for destructor calls.
...
llvm-svn: 77991
2009-08-03 20:20:07 +00:00
Daniel Dunbar
59e476b1b9
Formatting fixes (trailing whitespace, 80-cols, indentation).
...
llvm-svn: 77972
2009-08-03 17:06:42 +00:00
Anders Carlsson
59a9468b22
Whoops, meant to delete this.
...
llvm-svn: 77916
2009-08-02 21:34:52 +00:00
Anders Carlsson
f18318cf4e
use CodeGenModule::EmitNullConstant in a couple of places.
...
llvm-svn: 77915
2009-08-02 21:18:22 +00:00
Anders Carlsson
44616ce317
Remove old code that was causing the new test to fail.
...
llvm-svn: 77862
2009-08-02 04:17:43 +00:00
Anders Carlsson
7df966e040
Don't evaluate inout constraints twice. Fixes PR3800.
...
llvm-svn: 77854
2009-08-02 03:40:19 +00:00
Daniel Dunbar
4074b93184
Use Twine instead of utostr
...
llvm-svn: 77848
2009-08-02 01:43:57 +00:00
Eli Friedman
62561fe9b0
Fix a minor issue with unions in the new struct building code.
...
llvm-svn: 77829
2009-08-01 23:11:24 +00:00
Eli Friedman
e480ce3d29
Don't error on C++ linkage; if we don't support that, there are
...
serious issues :)
llvm-svn: 77800
2009-08-01 20:48:04 +00:00
Mike Stump
183c3d2f59
Add beginnigs of rtti generation, wire up more of -fno-exceptions.
...
llvm-svn: 77751
2009-07-31 23:15:31 +00:00
Anders Carlsson
1726aaa4fc
Remove the old struct builder code.
...
llvm-svn: 77738
2009-07-31 21:48:56 +00:00
Mike Stump
67829f6493
And now we can generate a simple vtable. Still a work in progress...
...
llvm-svn: 77737
2009-07-31 21:43:43 +00:00
Anders Carlsson
d65ab045e8
Move code from EmitUnion directly into the function that handles cast-to-union.
...
llvm-svn: 77735
2009-07-31 21:38:39 +00:00
Anders Carlsson
0d5f37b81a
Use the struct builder for unions.
...
llvm-svn: 77732
2009-07-31 21:34:04 +00:00
Mike Stump
dd93a19ac6
Fixup spacing and 80-col violations.
...
llvm-svn: 77731
2009-07-31 21:31:32 +00:00
Owen Anderson
0b75f23b94
Update for LLVM API change.
...
llvm-svn: 77722
2009-07-31 20:28:54 +00:00
Mike Stump
bc78a728ee
Add code to setup the vtable pointer in the constructor. Work in progress.
...
llvm-svn: 77699
2009-07-31 18:25:34 +00:00
Mike Stump
f332516136
Fix spacing.
...
llvm-svn: 77688
2009-07-31 17:46:44 +00:00
Owen Anderson
fe4e34707c
Update for LLVM API change.
...
llvm-svn: 77686
2009-07-31 17:39:36 +00:00
Fariborz Jahanian
6f14c73087
Synthesize the default constructor which has not
...
been declared as needed.
llvm-svn: 77641
2009-07-30 23:22:00 +00:00
Owen Anderson
7ec07a573c
Update for LLVM API changes.
...
llvm-svn: 77638
2009-07-30 23:11:26 +00:00
Mike Stump
658fe02d17
Canonicalize else spacing.
...
llvm-svn: 77629
2009-07-30 22:28:39 +00:00
Mike Stump
a523b2d7a0
Note some other limitations.
...
llvm-svn: 77626
2009-07-30 21:47:44 +00:00
Fariborz Jahanian
aa01d2a532
Patch for future ir-gen for destructor calls.
...
llvm-svn: 77608
2009-07-30 17:49:11 +00:00
Eli Friedman
e8caa2a72f
Remove bogus "unsupported" case for vectors (which shouldn't
...
ever trigger). Add an "unsupported" case that triggers for C++ code.
It would be nice if someone would implement this properly... it
shouldn't be too hard, but I haven't looked closely at the relevant
code.
llvm-svn: 77562
2009-07-30 01:10:26 +00:00
Mike Stump
3dc7eb9440
Add ability to layout the vtable pointer in trivial cases. I noticed
...
that we would silently do bad things with virtual bases in the layout
code, so, we just turn them off. When people do better things with
them, we can turn them back on.
llvm-svn: 77556
2009-07-30 00:22:38 +00:00
Fariborz Jahanian
d375454dcf
ir-gen for nested non-virtual base member access
...
in current class.
llvm-svn: 77554
2009-07-30 00:10:25 +00:00
Douglas Gregor
716dabbb1b
Eliminate an unused-variable warning
...
llvm-svn: 77518
2009-07-29 22:40:58 +00:00
Owen Anderson
9793f0e4d7
Update for LLVM API change.
...
llvm-svn: 77514
2009-07-29 22:16:19 +00:00
Ted Kremenek
c23c7e6a51
Change uses of:
...
Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
Type::getAsRecordType() -> Type::getAs<RecordType>()
Type::getAsPointerType() -> Type::getAs<PointerType>()
Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>()
Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>()
Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>()
Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>()
Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
Type::getAsTagType() -> Type::getAs<TagType>()
And remove Type::getAsReferenceType(), etc.
This change is similar to one I made a couple weeks ago, but that was partly
reverted pending some additional design discussion. With Doug's pending smart
pointer changes for Types, it seemed natural to take this approach.
llvm-svn: 77510
2009-07-29 21:53:49 +00:00
Owen Anderson
ade90fd1ba
Update for LLVM API change.
...
llvm-svn: 77492
2009-07-29 18:54:39 +00:00
Fariborz Jahanian
7be1ad814b
No longer need to keep base class offsets in the offset
...
table as it has its own place now.
llvm-svn: 77491
2009-07-29 18:50:06 +00:00
Fariborz Jahanian
bb67b827d9
Patch to provide cast of objects in member access
...
excpression, if needed, and remove some ir-gen code
now unnencessary.
llvm-svn: 77490
2009-07-29 18:40:24 +00:00
Fariborz Jahanian
72b1f24bd2
Use the existing API for base offset. Use suitable llvm type
...
for offset ir-gen.
llvm-svn: 77458
2009-07-29 15:54:56 +00:00
Fariborz Jahanian
82e2874270
Code refactoring to define getCXXRecordDeclForPointerType
...
and use it in several places.
llvm-svn: 77411
2009-07-29 00:44:13 +00:00
Fariborz Jahanian
f17071580f
ir-gen derived-to-base conversion in implicit casts.
...
llvm-svn: 77374
2009-07-28 22:00:58 +00:00
Owen Anderson
3cc120a51e
Update for LLVM API change.
...
llvm-svn: 77368
2009-07-28 21:22:35 +00:00
Anders Carlsson
019f414261
Remove the old RecordOrganizer.
...
llvm-svn: 77365
2009-07-28 21:03:34 +00:00
Fariborz Jahanian
a399dfae19
More cleanup of data member access and then some.
...
llvm-svn: 77351
2009-07-28 18:54:57 +00:00
Owen Anderson
47034e1733
Update for LLVM API change.
...
llvm-svn: 77349
2009-07-28 18:33:04 +00:00
Chris Lattner
1d0f16f22a
add some fixme's
...
llvm-svn: 77343
2009-07-28 18:25:06 +00:00
Fariborz Jahanian
b77659f4ae
Some code cleanup.
...
llvm-svn: 77339
2009-07-28 18:09:28 +00:00
Anders Carlsson
d5d6413aa5
More CGRecordLayoutBuilder cleanup.
...
llvm-svn: 77335
2009-07-28 17:56:36 +00:00
Fariborz Jahanian
5142fbd02e
More work toward data member access ir-gen.
...
llvm-svn: 77332
2009-07-28 17:38:28 +00:00
John McCall
caa1945306
Allow functions to be marked "implicit return zero" and so mark main().
...
Codegen by initializing the return value with its LLVM type's null value.
llvm-svn: 77288
2009-07-28 01:00:58 +00:00
Fariborz Jahanian
e309b48a22
Patch for objc's zero-const exception to not assume
...
that @catch(...) cathces all exceptions (c++ objects
are not cought by that).
llvm-svn: 77270
2009-07-27 23:12:41 +00:00
Owen Anderson
0e0189d64d
Update for LLVM API change.
...
llvm-svn: 77267
2009-07-27 22:29:56 +00:00
Owen Anderson
e05f2ed478
Update for LLVM API change.
...
llvm-svn: 77249
2009-07-27 21:00:51 +00:00
Fariborz Jahanian
7b2b1ec6b1
Some minor changes toward support of data
...
member access in the presense of non-virtual bases.
llvm-svn: 77246
2009-07-27 20:57:45 +00:00
Devang Patel
6a3b3fe98a
Use DICompositeType->replaceAllUsesWith()
...
llvm-svn: 77228
2009-07-27 18:42:03 +00:00
Anders Carlsson
cabdeb4932
Use the CGRecordLayoutBuilder even if there are no fields, because in C++ an empty class will have a padding byte.
...
llvm-svn: 77205
2009-07-27 17:10:54 +00:00
Anders Carlsson
72fb384a65
Enable the new struct type builder now that the constant struct builder works. (The old code will still be there until we know that everything works well.
...
llvm-svn: 77190
2009-07-27 15:31:55 +00:00
Anders Carlsson
b97a3ec4e7
Fix a tail padding bug in the record layout builder code. The bug was found by an existing test.
...
llvm-svn: 77189
2009-07-27 14:55:54 +00:00
Anders Carlsson
b7130ed888
Enable the new constant struct builder by default. The old code is still in place but will be removed shortly. The new struct builder works on big endian systems.
...
llvm-svn: 77185
2009-07-27 05:54:15 +00:00
Anders Carlsson
bff6b49cd0
More work on the constant struct builder, fix a couple of thinkos and add support for inserting part of a bitfield in the previous byte.
...
llvm-svn: 77180
2009-07-27 02:56:37 +00:00
Anders Carlsson
ba4c6d1c91
More work on bitfield support in the new constant struct builder.
...
llvm-svn: 77177
2009-07-27 01:23:51 +00:00
Daniel Dunbar
e59313a298
Switch to getName()
...
llvm-svn: 77151
2009-07-26 09:28:40 +00:00
Daniel Dunbar
600dfac30a
Switch to using llvm::Value::getName()
...
llvm-svn: 77147
2009-07-26 08:32:30 +00:00
Fariborz Jahanian
dedf1e4b1a
ir-gen for non-virtual base class initialization
...
in constructors.
llvm-svn: 77087
2009-07-25 21:12:28 +00:00
Anders Carlsson
3b484b928d
More work on the constant struct builder. We can now convert the struct to a packed struct when necessary.
...
llvm-svn: 77038
2009-07-25 01:40:29 +00:00
Anders Carlsson
87a9a34e5b
More work on the constant struct builder. We now try to layout all constant structs but throw away the result.
...
llvm-svn: 77021
2009-07-25 00:24:56 +00:00
Owen Anderson
b7a2fe6f81
Update for LLVM API change.
...
llvm-svn: 77012
2009-07-24 23:12:58 +00:00
Anders Carlsson
5e66fb5d16
Fix a release build warning.
...
llvm-svn: 76985
2009-07-24 18:20:38 +00:00
Fariborz Jahanian
2a1b5af130
More work toward initialization of objects
...
in constructors.
llvm-svn: 76980
2009-07-24 17:57:02 +00:00
Anders Carlsson
e2c6baf629
Don't use getLLVMFieldNo for bitfields when constructing the ivar layout maps for GC.
...
llvm-svn: 76978
2009-07-24 17:23:54 +00:00
Anders Carlsson
e1d5ca583f
Check in a half finished new constant struct builder (Obviously not used yet).
...
llvm-svn: 76969
2009-07-24 15:20:52 +00:00
Daniel Dunbar
c46a079957
Fix declaration of obc_enumerationMutation function, for GNU runtime.
...
llvm-svn: 76959
2009-07-24 07:40:24 +00:00
Anders Carlsson
6e853bf2b7
Get rid of the size parameter to AppendField. No functionality change.
...
llvm-svn: 76931
2009-07-24 02:45:50 +00:00
Daniel Dunbar
91ade14197
Output UTF-16 string literals independent of host byte order.
...
- Steve, can you take a look at this? It seems like this code should live
elsewhere, and there is a FIXME about having Sema validates the UTF-8 to
UTF-16 conversion.
llvm-svn: 76915
2009-07-23 23:41:22 +00:00
Daniel Dunbar
64509b2765
Factor out map lookup for CFString constants.
...
llvm-svn: 76908
2009-07-23 22:52:48 +00:00
Anders Carlsson
085395426c
Don't just store the field/bit field info one field, do it for all fields in the union.
...
llvm-svn: 76907
2009-07-23 22:52:34 +00:00
Anders Carlsson
e2accf4404
Fix another thinko.
...
llvm-svn: 76903
2009-07-23 21:52:03 +00:00
Anders Carlsson
516e5e7835
Correct a thinko in bitfield layout code. Fixes PR4611.
...
llvm-svn: 76898
2009-07-23 21:16:33 +00:00
Daniel Dunbar
2a5b83c7e6
Simplify, NFC.
...
llvm-svn: 76897
2009-07-23 20:38:28 +00:00
Daniel Dunbar
635d481de0
Simplify.
...
llvm-svn: 76885
2009-07-23 17:33:49 +00:00
Anders Carlsson
d78fc89fcb
We don't need to keep track of the packed alignment, just whether the struct is packed or not. Fixes PR4610.
...
llvm-svn: 76884
2009-07-23 17:24:40 +00:00
Anders Carlsson
8af896c10a
Move the LLVM field number for bit fields into the BitFieldInfo structure, since it's meaning is completely different than for non-bit fields.
...
llvm-svn: 76882
2009-07-23 17:01:21 +00:00
Douglas Gregor
2aff97c9e6
Unbreak the CMake build
...
llvm-svn: 76878
2009-07-23 15:15:06 +00:00
Daniel Dunbar
7c02cf609d
Shield clang from LLVM API changes, until the dust settles.
...
llvm-svn: 76862
2009-07-23 05:30:36 +00:00
Anders Carlsson
f55922b8b8
Set field info for unions.
...
llvm-svn: 76856
2009-07-23 04:59:05 +00:00
Anders Carlsson
718a89a501
Use arrays as union padding. Also, since the resulting struct will always contain a single element and either a single i8 element or an array of i8s, there's no reason to use a packed struct.
...
llvm-svn: 76854
2009-07-23 04:50:01 +00:00
Anders Carlsson
f814ee6003
Handle zero width bit fields in unions correctly (by ignoring them).
...
llvm-svn: 76847
2009-07-23 04:00:39 +00:00
Anders Carlsson
697f65943d
Implement union layout support.
...
llvm-svn: 76846
2009-07-23 03:43:54 +00:00
Anders Carlsson
307846fe67
Check in CGRecordLayoutBuilder which is a reimplementation of the record layout code. (Yay, no more packed structs unless absolutely necessary). We currently don't use the layouts being built but that will change when the new code is mature enough :)
...
llvm-svn: 76845
2009-07-23 03:17:50 +00:00
Daniel Dunbar
a244814e6f
These IRgen improvements have been done.
...
Technically we could still do a bit more to avoid deferred generation of statics
which we know are used, but I seriously doubt this is important.
llvm-svn: 76844
2009-07-23 03:03:07 +00:00
Devang Patel
06cceef545
Use DICompositeType->replaceAllUsesWith().
...
This requires llvm rev. 76769 or higher.
llvm-svn: 76770
2009-07-22 18:57:00 +00:00
Steve Naroff
3de6b70730
Fix a couple recent ABI regressions noticed during code review (fallout from the ObjC type system rewrite).
...
It's unfortunate that the mangling includes the low-level structs. Nevertheless, we need this for binary compatibility with GCC.
llvm-svn: 76755
2009-07-22 17:14:51 +00:00
Eli Friedman
5ac69057c0
Make vectorized floating-point comparisons work without crashing.
...
llvm-svn: 76726
2009-07-22 06:07:16 +00:00
Mon P Wang
acedf7768f
Preserve address space information through member accesses, e.g.,
...
__attribute__((address_space(1))) struct {int arr[ 3 ]; } *p1;
... = p1->arr[2]; // load from address space 1
llvm-svn: 76717
2009-07-22 03:08:17 +00:00
Owen Anderson
a265a3876c
Update for LLVM API change.
...
llvm-svn: 76599
2009-07-21 18:06:41 +00:00
Owen Anderson
f319a7d6e7
Update for LLVM API change.
...
llvm-svn: 76534
2009-07-21 02:57:15 +00:00
Fariborz Jahanian
83381cc9a6
Move EmitCtorPrologue to CGCXX. Add an assert and FIXMEs.
...
llvm-svn: 76498
2009-07-20 23:18:55 +00:00
Fariborz Jahanian
127059c7ec
Early ir-gen for constructor prologue. This is on going.
...
llvm-svn: 76493
2009-07-20 22:35:22 +00:00
Mike Stump
94e12450aa
Remove an apparently unused header.
...
llvm-svn: 76473
2009-07-20 21:17:53 +00:00
Daniel Dunbar
ea3060a9e5
Catch another trivial case where we can avoid emitting a separate return blcok.
...
llvm-svn: 76365
2009-07-19 08:24:34 +00:00
Daniel Dunbar
c3ab4c6c98
Detect when the current generation point is unreachable after emitting
...
expressions.
- This generally catches the important case of noreturn functions.
- With the last two changes, we are down to 152 unreachable blocks emitted on
403.gcc, vs the 1805 we started with.
llvm-svn: 76364
2009-07-19 08:23:12 +00:00
Daniel Dunbar
669521c97c
Fix thinko.
...
llvm-svn: 76362
2009-07-19 07:03:11 +00:00
Daniel Dunbar
b6adc43f6e
Avoid generation of dead code in a few more situations.
...
- Emit variable declarations as "simple", we want to avoid forcing the creation
of a dummy basic block, but still need to make the variable available for
later use.
- With that, we can now skip IRgen for other unreachable statements (which
don't define a label).
- Anders, I added two fixmes on calls to EmitVLASize, can you check them?
llvm-svn: 76361
2009-07-19 06:58:07 +00:00
Anders Carlsson
27b50135ee
Rename NextOffset to DataSize, which better matches the Itanium C++ ABI
...
llvm-svn: 76339
2009-07-18 21:26:44 +00:00
Anders Carlsson
15b73deeea
Revert r75641.
...
llvm-svn: 76327
2009-07-18 19:43:29 +00:00
Steve Naroff
c277ad10f0
Remove ObjCQualifiedInterfaceType:-)
...
llvm-svn: 76321
2009-07-18 15:33:26 +00:00
Chris Lattner
f56501ce48
fix objc codegen to not have its own list of things that eventually get into llvm.used, just
...
populate CGM's list directly.
llvm-svn: 76266
2009-07-17 23:57:13 +00:00
Ted Kremenek
8a286fbdb9
Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methods
...
until Doug Gregor's Type smart pointer code lands (or more discussion occurs).
These methods just call the new Type::getAs<XXX> methods, so we still have
reduced implementation redundancy. Having explicit getAsXXXType() methods makes
it easier to set breakpoints in the debugger.
llvm-svn: 76193
2009-07-17 17:50:17 +00:00
Ted Kremenek
b825c0ddc5
Replaced Type::getAsLValueReferenceType(), Type::getAsRValueReferenceType(), Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents.
...
llvm-svn: 76139
2009-07-17 01:20:38 +00:00
Fariborz Jahanian
c3443a3bf3
ir-gen for --/++ operators of objc object pointers
...
in 32bit abi.
llvm-svn: 76109
2009-07-16 22:04:59 +00:00
Anton Korobeynikov
b5b703b2f7
Hook in s390x stuff into clang
...
llvm-svn: 76099
2009-07-16 20:09:57 +00:00
Ted Kremenek
e3fb4b6524
Add member template 'Type::getAs<T>', which converts a Type* to a respective T*.
...
This method is intended to eventually replace the individual
Type::getAsXXXType<> methods.
The motivation behind this change is twofold:
1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of
them are basically copy-and-paste.
2) By centralizing the implementation of the getAs<Type> logic we can more
smoothly move over to Doug Gregor's proposed canonical type smart pointer
scheme.
Along with this patch:
a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>.
b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>.
llvm-svn: 76098
2009-07-16 19:58:26 +00:00
Owen Anderson
a296c03430
Update for LLVM API change.
...
llvm-svn: 76090
2009-07-16 18:09:38 +00:00
Chris Lattner
aa64ca28cb
use CreateRuntimeVariable to get __CFConstantStringClassReference
...
instead of doing it manually (which might end up getting auto-renamed),
fixing a FIXME. rdar://7065446
llvm-svn: 76079
2009-07-16 16:48:25 +00:00
Steve Naroff
79d1215d83
Remove ASTContext::isObjCObjectPointerType().
...
Convert all clients to use the new predicate on Type.
llvm-svn: 76076
2009-07-16 15:41:00 +00:00
Chris Lattner
3afa3e1d91
codegen string literals using private linkage now like llvm-gcc, eliminating
...
some target hooks.
llvm-svn: 75895
2009-07-16 05:03:48 +00:00
Owen Anderson
9f98d37612
Update for LLVM API change.
...
llvm-svn: 75869
2009-07-16 00:14:12 +00:00
Ted Kremenek
3e808edac9
Lexically order files in CMakeLists.txt files.
...
llvm-svn: 75832
2009-07-15 21:08:41 +00:00
Steve Naroff
1329fa0ed9
Implement the ObjC pseudo built-in types as clang "BuiltinType's". I say pseudo built-in types, since Sema still injects a typedef for recognition (i.e. they aren't truly built-ins from a parser perspective).
...
This removes the static data/methods on ObjCObjectPointerType while preserving the nice API (no need to fiddle with ASTContext:-).
This patch also adds Type::isObjCBuiltinType().
This should be the last fairly large patch related to recrafting the ObjC type system. The follow-on patches should be fairly small.
llvm-svn: 75808
2009-07-15 18:40:39 +00:00
Owen Anderson
170229f68d
Update for LLVM API change, and contextify a bunch of related stuff.
...
llvm-svn: 75705
2009-07-14 23:10:40 +00:00
Devang Patel
9be7b20401
Revert 75648 for now. It is causing test failures.
...
llvm-svn: 75684
2009-07-14 21:31:22 +00:00
Steve Naroff
6b712a7ba1
Introduce Type::isAnyPointerType() and convert all clients (suggested by Chris).
...
I don't love the name, however it simplifies the code and is a worthwhile change. If/when we come up with a better name, we can do a search/replace.
llvm-svn: 75650
2009-07-14 18:25:06 +00:00
Chris Lattner
ff1ee0d7c9
[llvm up] adjust to match mainline.
...
llvm-svn: 75647
2009-07-14 18:18:16 +00:00