Owen Anderson
b7a2fe6f81
Update for LLVM API change.
...
llvm-svn: 77012
2009-07-24 23:12:58 +00:00
Fariborz Jahanian
2a1b5af130
More work toward initialization of objects
...
in constructors.
llvm-svn: 76980
2009-07-24 17:57:02 +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
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
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
Owen Anderson
ae86c19e68
Update for LLVM API change.
...
llvm-svn: 75446
2009-07-13 04:10:07 +00:00
Owen Anderson
c10c8d3e2b
Update for LLVM API change.
...
llvm-svn: 75028
2009-07-08 19:05:04 +00:00
Owen Anderson
9f211fb4fa
Update for LLVM API change.
...
llvm-svn: 74986
2009-07-08 01:29:18 +00:00
Argyrios Kyrtzidis
cfbfe78e9e
De-ASTContext-ify DeclContext.
...
Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating".
Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit.
llvm-svn: 74506
2009-06-30 02:36:12 +00:00
Anders Carlsson
82aea737a7
Move code generation of C++ temporaries into a new file.
...
llvm-svn: 72792
2009-06-03 18:40:21 +00:00
Anders Carlsson
fa7c608ecc
Fix a thinko.
...
llvm-svn: 72679
2009-06-01 00:26:14 +00:00
Anders Carlsson
ca50119a31
Check for null correctly for new expressions.
...
llvm-svn: 72678
2009-06-01 00:05:16 +00:00
Anders Carlsson
cba81fc4de
Improve irgen of 'new' further.
...
llvm-svn: 72677
2009-05-31 21:53:59 +00:00
Anders Carlsson
96c012ff8b
...and aggregate POD types.
...
llvm-svn: 72676
2009-05-31 21:12:26 +00:00
Anders Carlsson
60d0c2c1c2
Support for complex types.
...
llvm-svn: 72675
2009-05-31 21:07:58 +00:00
Anders Carlsson
ec71f61608
Better support for scalar POD types in 'new' expressions.
...
llvm-svn: 72674
2009-05-31 20:56:36 +00:00
Anders Carlsson
1832f52b10
Very basic irgen support for new expressions.
...
llvm-svn: 72672
2009-05-31 20:21:44 +00:00
Anders Carlsson
4a7b49b56a
Add a new function for emitting new functions.
...
llvm-svn: 72656
2009-05-31 01:40:14 +00:00
Anders Carlsson
8eb93e72f7
Emit destructors correctly for temporaries.
...
llvm-svn: 72655
2009-05-31 00:34:10 +00:00
Anders Carlsson
3be22e27b6
More temporary support.
...
llvm-svn: 72648
2009-05-30 23:23:33 +00:00
Anders Carlsson
0a63741a3f
Add code for emitting C++ destructors. Not used yet.
...
llvm-svn: 72591
2009-05-29 21:03:38 +00:00
Anders Carlsson
4034a95dc8
Handle operator call expressions where the callee is a member function.
...
llvm-svn: 72458
2009-05-27 04:18:27 +00:00
Anders Carlsson
6f5a015bd9
Add EmitReferenceBindingToExpr. Have EmitCallArg use it for now. Doesn't support anything but at least we don't crash ;)
...
llvm-svn: 72147
2009-05-20 00:24:07 +00:00
Mike Stump
18bb9284ff
Reflow some comments.
...
llvm-svn: 71937
2009-05-16 07:57:57 +00:00
Chris Lattner
e0be0dfced
push GlobalDecl through enough of the CodeGenModule interfaces
...
to allow us to support generation of deferred ctors/dtors.
It looks like codegen isn't emitting a call to the dtor in
member-functions.cpp:test2, but when it does, its body should
get emitted.
llvm-svn: 71594
2009-05-12 21:21:08 +00:00
Anders Carlsson
bd7d11f770
Factor code that's common to EmitCXXMemberCallExpr and EmitCXXConstructorCall out into a EmitCXXMemberCall function.
...
llvm-svn: 71514
2009-05-11 23:37:08 +00:00
Anders Carlsson
dae1abc7ac
Refactor global decls to hold either a regular Decl or a CXXConstructorDecl + ctor type or a CXXDestructorDecl + dtor type.
...
llvm-svn: 70962
2009-05-05 04:44:02 +00:00
Anders Carlsson
1619a5041c
Make codegen for constructors work again.
...
llvm-svn: 70785
2009-05-03 17:47:16 +00:00
Anders Carlsson
4ac533dc90
We can now call member functions where the base is a pointer.
...
llvm-svn: 70579
2009-05-01 21:55:16 +00:00
Anders Carlsson
eaa28f7e18
Add support for generating (very basic) C++ destructors. These aren't called by anything yet.
...
llvm-svn: 69343
2009-04-17 01:58:57 +00:00
Anders Carlsson
b7f8f594f3
Implement basic code generation of constructor calls. We can now compile:
...
struct S {
S(int, int);
};
void f() {
S s(10, 10);
}
llvm-svn: 69330
2009-04-17 00:06:03 +00:00
Anders Carlsson
e8eeffdf16
Add GetAddrOfCXXConstructor and use it.
...
llvm-svn: 69328
2009-04-16 23:57:24 +00:00
Anders Carlsson
617482c666
Actually generate code for the simple constructors we know we can generate code for.
...
llvm-svn: 69222
2009-04-15 21:02:13 +00:00
Anders Carlsson
f747524819
Start attempting to generate code for C++ ctors.
...
llvm-svn: 69168
2009-04-15 15:55:24 +00:00
Anders Carlsson
a5d077df73
Support code generation of 'this' exprs
...
llvm-svn: 69050
2009-04-14 16:58:56 +00:00
Anders Carlsson
1235bbce7e
Use the new guard variable mangling function and get rid of the old code.
...
llvm-svn: 68971
2009-04-13 18:03:33 +00:00
Anders Carlsson
479e6fc7a7
Use the new EmitCallArgs function. No indented functionality change.
...
llvm-svn: 68652
2009-04-08 23:13:16 +00:00
Anders Carlsson
03a409feda
We weren't generating correct code for calls to variadic member functions.
...
llvm-svn: 68635
2009-04-08 20:31:57 +00:00
Anders Carlsson
2266e244b5
Simplify C++ member function calls.
...
llvm-svn: 68451
2009-04-06 17:45:20 +00:00
Anders Carlsson
e5fd6f2227
Add support for calling C++ member functions.
...
llvm-svn: 68412
2009-04-03 22:50:24 +00:00
Daniel Dunbar
22a87f94a9
Pull COdeGenFunction::CreateStaticBlockVarDecl (just for creating the
...
global variable) out of GenerateStaticBlockVarDecl.
- No intended functionality change.
- Prep for some mild cleanups and PR3662.
llvm-svn: 65466
2009-02-25 19:24: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
Eli Friedman
c8a590dda3
Warning fixes to operator precedence warnings.
...
Someone should double-check that I didn't somehow break ObjC
serialization; I think the change there actually changes the semantics.
llvm-svn: 61098
2008-12-16 20:06:41 +00:00
Chris Lattner
e4b95698df
Rename Selector::getName() to Selector::getAsString(), and add
...
a new NamedDecl::getAsString() method.
Change uses of Selector::getName() to just pass in a Selector
where possible (e.g. to diagnostics) instead of going through
an std::string.
This also adds new formatters for objcinstance and objcclass
as described in the dox.
llvm-svn: 59933
2008-11-24 03:33:13 +00:00
Daniel Dunbar
a612e79be4
Normalize many BasicBlock names.
...
- Use dotted notation for blocks related to a particular statement
type.
- Use .end for landing pads.
No functionality change in NDEBUG mode. :)
llvm-svn: 59210
2008-11-13 01:38:36 +00:00
Daniel Dunbar
75283ff38a
Centralize basic block creation in CodeGenFunction::createBasicBlock.
...
- No functionality change.
llvm-svn: 59017
2008-11-11 02:29:29 +00:00
Anders Carlsson
131be8b4f4
Handle static initializers in Objective-C++ methods.
...
llvm-svn: 55250
2008-08-23 19:42:54 +00:00
Anders Carlsson
87fc5a5e6b
Add preliminary (and probably broken) codegen support for C++ static initializers.
...
llvm-svn: 55180
2008-08-22 16:00:37 +00:00