[cfe-commits] r129273 - in /cfe/trunk: lib/CodeGen/CGExprCXX.cpp test/CodeGenCXX/typeid.cpp
Anders Carlsson
andersca at mac.com
Mon Apr 11 10:28:18 PDT 2011
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110411/9c181f54/attachment.html>
More information about the cfe-commits
mailing list