TheDan64 / inkwell

It's a New Kind of Wrapper for Exposing LLVM (Safely)
https://thedan64.github.io/inkwell/
Apache License 2.0
2.38k stars 229 forks source link

Marked const_float_from_string as unsafe. Fixes #513 #519

Closed TheDan64 closed 3 months ago

TheDan64 commented 3 months ago

Description

Marks the const_float_from_string method as unsafe and adds an assertion that the string isn't empty

Related Issue

513

How This Has Been Tested

Locally w/ LLVM 17

Option\<Breaking Changes>

The method is now unsafe, an assertion triggers on empty string rather than UB.

Checklist