Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotate the LLVM preset with NoException #1052

Merged
merged 5 commits into from
Jun 3, 2021

Conversation

junlarsen
Copy link
Member

The LLVM/clang project does not use C++ exceptions. We're also only mapping the C interface, so it's safe to assume there will be no exceptions thrown here.

junlarsen added 2 commits June 1, 2021 20:28
The LLVM/clang project does not use C++ exceptions. We're also only mapping the C interface, so it's safe to assume there will be no exceptions thrown here.
@saudet
Copy link
Member

saudet commented Jun 1, 2021

The C++ API used in the following files probably throws exceptions but maybe not. Could you confirm?
https://github.com/bytedeco/javacpp-presets/tree/master/llvm/src/main/resources/org/bytedeco/llvm/include

@junlarsen
Copy link
Member Author

The C++ API used in the following files probably throws exceptions but maybe not. Could you confirm?
https://github.com/bytedeco/javacpp-presets/tree/master/llvm/src/main/resources/org/bytedeco/llvm/include

You're right, the code in FullOptimization.h makes use of exceptions. Seeing as both functions return void, we could return an LLVMErrorRef instead and drop the exceptions, similar to how LLVM does error handling.

Another option would be to enable exception handling for these functions.

Thoughts?
/cc @yukoba

@saudet
Copy link
Member

saudet commented Jun 2, 2021 via email

@yukoba
Copy link
Contributor

yukoba commented Jun 2, 2021

@supergrecko

You're right, the code in FullOptimization.h makes use of exceptions. Seeing as both functions return void, we could return an LLVMErrorRef instead and drop the exceptions, similar to how LLVM does error handling.

Please change it.

@saudet saudet merged commit 88236a4 into bytedeco:master Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants