[llvm-commits] [PATCH] Revised LandingPadInst Patch
Chris Lattner
clattner at apple.com
Fri Aug 12 13:30:07 PDT 2011
On Aug 12, 2011, at 1:27 PM, Bill Wendling wrote:
>>
>> Since there are only two clause types, it seems much more convenient to have "addFilter" and "addCatch" methods. Likewise, instead of getClause() have isFilter(...)/isCatch(..) methods. Providing the Enum APIs in addition to these is fine of course.
>>
>> Instead of "getClause" returning the value by-reference, please have it return the Value* and require the client to use isCatch/isFilter.
>>
> I made these changes. I actually kept the "getClause" method because both "getCatch" and "getFilter" were identical.
Keeping getClause() is fine, but make it return the clause! (the value*)
> Perhaps we should encode the clause type into the OperandList? Maybe something like:
>
> void addCatch(Value *Val) {
> // Grow OperandList if needed.
> OperandList[n ] = ConstantInt::get(LandingPadInst::Catch);
> OperandList[n+1] = Val;
> }
>
> What do you think?
I don't see how it would add value.
-Chris
More information about the llvm-commits
mailing list