This is an archive of the discontinued LLVM Phabricator instance.

Add LLVM-C interface for Windows x64 SEH instructions
Needs RevisionPublic

Authored by NickBarnes on Dec 9 2016, 4:18 AM.

Details

Summary

The LLVM-C interface provides no means to construct catchswitch, catchpad, catchret, cleanuppad, or cleanupret instructions, or to attach a funclet operand bundle to call or invoke instructions (which is required in cleanuppad blocks).

This patch provides the most basic functionality, and is sufficient for the project I'm working on. More could be done, but this much is required to get anywhere.

See https://llvm.org/bugs/show_bug.cgi?id=30785

Diff Detail

Event Timeline

NickBarnes updated this revision to Diff 80889.Dec 9 2016, 4:18 AM
NickBarnes retitled this revision from to Add LLVM-C interface for Windows x64 SEH instructions.
NickBarnes updated this object.
NickBarnes added a reviewer: llvm-commits.
NickBarnes updated this object.Dec 9 2016, 4:21 AM
NickBarnes edited edge metadata.
deadalnix edited edge metadata.Dec 9 2016, 2:01 PM

A few things here.

1/ Please add a test for this. You can use the echo facility to do so. You can grep for 'llvm-c-test --echo' in the test folder to find some examples of this. This will ensure you can read/write this IR properly.
2/ The formatting is off all over the place. Please follow the usual formatting. You can use clang-format to help you do so.

deadalnix requested changes to this revision.Dec 9 2016, 2:01 PM
deadalnix edited edge metadata.
This revision now requires changes to proceed.Dec 9 2016, 2:01 PM

Any news here ? This is a pretty good patch if we put aside the lack of tests. With a test on it, I'd merge.

Wallbraker requested changes to this revision.Feb 15 2017, 4:35 AM
Wallbraker added a subscriber: Wallbraker.
Wallbraker added inline comments.
include/llvm-c/Core.h
1526

We probably also want one that takes a Context for those of us that manages those ourselves.

Wallbraker resigned from this revision.Aug 9 2018, 3:18 AM

This can be closed, as changes has landed in a different review. See D45100.