[cfe-commits] r95190 - in /cfe/trunk: include/clang/AST/StmtCXX.h lib/AST/Stmt.cpp lib/Sema/SemaStmt.cpp
Sam Weinig
weinig at apple.com
Tue Feb 2 18:59:43 PST 2010
On Feb 2, 2010, at 6:18 PM, Douglas Gregor wrote:
>
> On Feb 2, 2010, at 6:09 PM, Sam Weinig wrote:
>
>> Author: weinig
>> Date: Tue Feb 2 20:09:59 2010
>> New Revision: 95190
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=95190&view=rev
>> Log:
>> Remove the SmallVector from CXXTryStmt.
>
> Thanks!
>
>> Modified:
>> cfe/trunk/include/clang/AST/StmtCXX.h
>> cfe/trunk/lib/AST/Stmt.cpp
>> cfe/trunk/lib/Sema/SemaStmt.cpp
>>
>> Modified: cfe/trunk/include/clang/AST/StmtCXX.h
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/StmtCXX.h?rev=95190&r1=95189&r2=95190&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/include/clang/AST/StmtCXX.h (original)
>> +++ cfe/trunk/include/clang/AST/StmtCXX.h Tue Feb 2 20:09:59 2010
>> @@ -59,12 +59,16 @@
>> ///
>> class CXXTryStmt : public Stmt {
>> SourceLocation TryLoc;
>> +
>> // First place is the guarded CompoundStatement. Subsequent are the handlers.
>> - // More than three handlers should be rare.
>> - llvm::SmallVector<Stmt*, 4> Stmts;
>> + Stmt **Stmts;
>> + unsigned NumHandlers;
>> +
>> +protected:
>> + virtual void DoDestroy(ASTContext &Ctx);
>
> If you're feeling really crazy, you could eliminate the Stmts pointer and instead allocate of the statements after the CXXTryStmt object.
Sure. Do you mean something like this.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CXXTryStmtInline.diff
Type: application/octet-stream
Size: 4908 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20100202/a5adc16b/attachment.obj>
-------------- next part --------------
-Sam
More information about the cfe-commits
mailing list