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