Files
clang-p2996/clang/lib/AST/Interp/Disasm.cpp
Timm Bäder cf10061da7 [clang][Interp] Fully serialize Floating values to bytes
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
2023-08-17 12:41:39 +02:00

2.3 KiB