[TimeProfiler] Reset variable to nullptr
Otherwise we'll hit a spurious assert failure when we reset and then reinitialize TimeProfiler on the same thread, as can happen when e.g. using LLD as a library and running it multiple times in the same process. Makes `lld/test/MachO/time-trace.s` pass with `LLD_IN_TEST=2`, which runs the linker twice in the same process and exposed the issue. Reviewed By: MaskRay, mehdi_amini Differential Revision: https://reviews.llvm.org/D112880
Loading
Please sign in to comment