[LLVMdev] EH and C++ intergation

Chris Lattner sabre at nondot.org
Tue Nov 21 09:50:34 PST 2006


On Tue, 21 Nov 2006, [ISO-8859-2] Žiga Osolin wrote:
> I was going through documentation and source lately, and I decided how to
> make llvm bytecode more compatible to C++:
> 1) thiscall sould be introduced, which would take N arguments and the
> first argument would always be the C++ "this" argument. This would
> abstract llvm compiler dependant C++ code emittion.

Sure.  Anton can give you ideas for this.

> 2) the ret instruction should be able to return structs (as Chris has
> already written on his page).

This won't help C++ or C.

> 3) the EH could be done at code emission and would leave bytecodes
> portable. Each backend would emit code compatible (if possible) with the
> compiler it is compiled with; if llvm is compiled with VC8, it would emit
> code compatible with VC8.

I agree for unwind tables, this is what the invoke/unwind abstraction are 
for.  For RTTI, there is nothing the compiler can do to shield you from 
front-end dependencies.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/


More information about the llvm-dev mailing list