Anders Carlsson
fbfb5e6530
When emitting blocks, keep track of which cleanup scope they have. Minor fixes and cleanup.
...
llvm-svn: 64053
2009-02-08 00:16:35 +00:00
Anders Carlsson
be0f76a712
Add support for emitting cleanup blocks. Make EmitCompoundStatement emit cleanup blocks if necessary
...
llvm-svn: 64051
2009-02-07 23:50:39 +00:00
Anders Carlsson
15cb75a20c
Add plumbing for the cleanup stack.
...
llvm-svn: 64043
2009-02-07 22:53:43 +00:00
Mike Stump
1d91dd98ad
Fixup goto codegen in and around VLAs.
...
llvm-svn: 64014
2009-02-07 12:52:26 +00:00
Anders Carlsson
31f8649f83
Follow Eli's advice and store the VLA size with the native size_t type. Fixes PR3491.
...
llvm-svn: 63879
2009-02-05 19:43:10 +00:00
Daniel Dunbar
ee3da87ce7
Add CodeGenFunction::ConvertTypeForMem forwarding function.
...
llvm-svn: 63678
2009-02-03 23:03:55 +00:00
Daniel Dunbar
bf8c24ad89
Thread CGFunctionInfo construction through CodeGenTypes.
...
- Inefficient & leaks memory currently, will be cleaned up subsequently.
llvm-svn: 63567
2009-02-02 23:23:47 +00:00
Daniel Dunbar
d931a87f90
More ABI API cleanup.
...
- Lift CGFunctionInfo creation above ReturnTypeUsesSret and
EmitFunction{Epi,Pro}log.
llvm-svn: 63553
2009-02-02 22:03:45 +00:00
Daniel Dunbar
fd346a3644
Pull EmitReturnBlock out of FinishFunction and catch unified return
...
case correctly.
llvm-svn: 63068
2009-01-26 23:27:52 +00:00
Daniel Dunbar
336dbba387
Skip emission of final return block if possible (e.g., functions with
...
a unified return).
llvm-svn: 63038
2009-01-26 21:25:20 +00:00
Eli Friedman
ddea0ade30
Slight cleanup, and fix for va_arg on architectures where va_list is a
...
struct.
llvm-svn: 62585
2009-01-20 17:46:04 +00:00
Daniel Dunbar
9b21e63251
Block pointer types are not aggregate types.
...
llvm-svn: 61973
2009-01-09 02:44:18 +00:00
Anders Carlsson
5d985f5f16
Handle typedefs to VLAs (Emit the size expr when we encounter the typedef
...
llvm-svn: 61290
2008-12-20 21:51:53 +00:00
Anders Carlsson
c20879a6e4
Make sure to generate code for arguments that have a variably modified type.
...
llvm-svn: 61288
2008-12-20 21:28:43 +00:00
Anders Carlsson
8a01b79274
Change EmitVLASize to take a QualType that must be a variably modified type.
...
Emit the size even if the declared type is a variably modified type. This lets us handle
void f(int n) {
int (*a)[n];
printf("size: %d\n", sizeof(*a));
}
llvm-svn: 61285
2008-12-20 20:46:34 +00:00
Anders Carlsson
e388a5bf44
Split up emitting of VLA sizes and getting the size of a VLA.
...
llvm-svn: 61284
2008-12-20 20:27:15 +00:00
Anders Carlsson
ccbe9200f9
Add map of VLA types and their sizes
...
llvm-svn: 60939
2008-12-12 07:19:02 +00:00
Anders Carlsson
8628645e94
Change more code over to using the new Expr::Evaluate
...
llvm-svn: 60324
2008-12-01 02:46:24 +00:00
Chris Lattner
86d7d91366
Rename NamedDecl::getIdentifierName() to ::getNameAsCString() and make it
...
assert if the name is not an identifier. Update callers to do the right
thing and avoid this method in unsafe cases. This also fixes an objc
warning that was missing a space, and migrates a couple more to taking
IdentifierInfo and QualTypes instead of std::strings.
llvm-svn: 59936
2008-11-24 03:54:41 +00:00
Anders Carlsson
4046e65b27
An expression is not foldable if it can't be fully evaluated. Fixes PR3060
...
llvm-svn: 59887
2008-11-22 22:32:07 +00:00
Douglas Gregor
77324f3854
Introduction the DeclarationName class, as a single, general method of
...
representing the names of declarations in the C family of
languages. DeclarationName is used in NamedDecl to store the name of
the declaration (naturally), and ObjCMethodDecl is now a NamedDecl.
llvm-svn: 59441
2008-11-17 14:58:09 +00:00
Chris Lattner
67d7b9204c
rename Expr::tryEvaluate to Expr::Evaluate.
...
llvm-svn: 59426
2008-11-16 21:24:15 +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
f32443cdcd
Quick fix for crash in IRgen when we can tryEvaluate a condition to
...
something that is not an int.
- Ignore these cases for now, added FIXME that we should also boolize
them.
llvm-svn: 59184
2008-11-12 22:37:10 +00:00
Daniel Dunbar
bf3c22e51d
Handle ?: in EmitBranchOnBoolExpr.
...
llvm-svn: 59129
2008-11-12 10:30:32 +00:00