Exception Handling upgrade

Hi all,

Is it too soon to start porting EH code to the new C++ API? Are there sample implementations? llvm.org/demo still uses the old
EH gizmos. should we wait for 3.0 release?

Is it too soon to start porting EH code to the new C++ API? Are there sample implementations? llvm.org/demo still uses the old
EH gizmos.

llvm.org/demo uses the 2.9 release, not ToT/3.0

should we wait for 3.0 release?

Depends what version of LLVM you’re coding against. If you’re running against ToT, you should be using the new exception handling APIs (LandingPad, et al) - Bill’s been porting Clang over recently (see http://llvm.org/viewvc/llvm-project?rev=140049&view=rev and a couple of other checkins by Bill into the clang tree).

  • David

Hi all,

Is it too soon to start porting EH code to the new C++ API?

Nope! :slight_smile:

Are there sample implementations? llvm.org/demo still uses the old
EH gizmos. should we wait for 3.0 release?

If you're using the LLVM APIs, then looking at how it's implemented in clang is a good start:

  clang/lib/CodeGen/CGException.cpp

If you're upgrading your bitcode files, then just (re)compile with top-of-tree clang, and you should get the new EH stuff automatically.

-bw

Although not exhaustive in terms of the options available, the
llvm/examples/ExceptionDemo has been ported to the new 3.0 exception API.

Garrison

Hi Charllls,

Is it too soon to start porting EH code to the new C++ API? Are there sample
implementations? llvm.org/demo still uses the old
EH gizmos. should we wait for 3.0 release?

dragonegg has been using it for a while. If you are not familiar with the new
scheme, my EuroLLVM talk explains a bit:
http://llvm.org/devmtg/2011-09-16/EuroLLVM2011-ExceptionHandling.pdf

Ciao, Duncan.