On Feb 11, 2009, at 4:39 PM, Anders Carlsson wrote:
> Author: andersca
> Date: Wed Feb 11 18:39:25 2009
> New Revision: 64346
>
> URL: http://llvm.org/viewvc/llvm-project?rev=64346&view=rev
> Log:
> Add support for generating block call expressions.
nice!
> +static const llvm::Type *getBlockDescriptorType(CodeGenFunction
> &CGF) {
> + static const llvm::Type *Ty = 0;
> +
> + if (!Ty) {
Please make this an instance variable in CGF (similar for other
routines). Global variables (including function statics) are
verboten. Also, please use early exit to avoid nesting:
if (Ty) return Ty;
Thanks Anders!
-Chris
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits