The Floating class wraps a APFloat, which might heap allocate memory to represent large floating values. When writing those to bytecode, we would free() the heap allocation after writing, when destroying the actual APFloat we wrote. Fix this by seralizing a Floating as Semantics + APInt. This will be neccessary in more cases later, when we support arbitrary-precision integers or _BitInt. Differential Revision: https://reviews.llvm.org/D155165
2.3 KiB
2.3 KiB