Author: jdevlieghere Date: Wed Feb 27 16:49:57 2019 New Revision: 355055 URL: http://llvm.org/viewvc/llvm-project?rev=355055&view=rev Log: [Reprodicuers] Check initialization
If the reproducer is not initialzied, the call to ::Instance() will result in an assertion. Modified: lldb/trunk/source/API/SBReproducerPrivate.h Modified: lldb/trunk/source/API/SBReproducerPrivate.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBReproducerPrivate.h?rev=355055&r1=355054&r2=355055&view=diff ============================================================================== --- lldb/trunk/source/API/SBReproducerPrivate.h (original) +++ lldb/trunk/source/API/SBReproducerPrivate.h Wed Feb 27 16:49:57 2019 @@ -58,10 +58,14 @@ private: }; inline InstrumentationData GetInstrumentationData() { + if (!lldb_private::repro::Reproducer::Initialized()) + return {}; + if (auto *g = lldb_private::repro::Reproducer::Instance().GetGenerator()) { auto &p = g->GetOrCreate<SBProvider>(); return {p.GetSerializer(), p.GetRegistry()}; } + return {}; } _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits