[cfe-commits] r95190 - in /cfe/trunk: include/clang/AST/StmtCXX.h lib/AST/Stmt.cpp lib/Sema/SemaStmt.cpp
Douglas Gregor
dgregor at apple.com
Tue Feb 2 19:16:36 PST 2010
On Feb 2, 2010, at 6:59 PM, Sam Weinig wrote:
>
> 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.
> <CXXTryStmtInline.diff>
Yes, exactly!
- Doug
More information about the cfe-commits
mailing list