On Apr 11, 2011, at 10:22 AM, John McCall wrote:
> On Apr 11, 2011, at 7:13 AM, Anders Carlsson wrote:
>
>> +static void EmitBadTypeidCall(CodeGenFunction &CGF) {
>> + llvm::Value *F = getBadTypeidFn(CGF);
>> + if (llvm::BasicBlock *InvokeDest = CGF.getInvokeDest()) {
>> + llvm::BasicBlock *Cont = CGF.createBasicBlock("invoke.cont");
>> + CGF.Builder.CreateInvoke(F, Cont, InvokeDest)->setDoesNotReturn();
>> + CGF.EmitBlock(Cont);
>> + } else
>> + CGF.Builder.CreateCall(F)->setDoesNotReturn();
>> +
>> + CGF.Builder.CreateUnreachable();
>> +}
>> +
>
> CGF.EmitCallOrInvoke(...).setDoesNotReturn();
> CGF.Builder.CreateUnreachable();
>
I was thinking about adding an "emit call or invoke" function, but now I don't
need to!
- Anders
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits