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