mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +00:00
Introduce needsCleanup() for APFloat and APInt.
This is needed in clang so one can check if the object needs the destructor called after its memory was freed. This is useful when creating many APInt/APFloat objects with placement new, where the overhead of tracking the pointers for cleanup is significant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183100 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -580,7 +580,7 @@ APFloat::initialize(const fltSemantics *ourSemantics)
|
||||
void
|
||||
APFloat::freeSignificand()
|
||||
{
|
||||
if (partCount() > 1)
|
||||
if (needsCleanup())
|
||||
delete [] significand.parts;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user