summaryrefslogtreecommitdiffstats
path: root/lldb/source/API
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-02-28 00:49:57 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-02-28 00:49:57 +0000
commit95bb3c3cc3f74d2448e6a495c6989f988c24770c (patch)
treefc49a7b56305d1cdbd32927cf580d5a4376efd4b /lldb/source/API
parent53e43f4d9e8e4f3fd1bd2ed1a81af1b8870b92a7 (diff)
downloadbcm5719-llvm-95bb3c3cc3f74d2448e6a495c6989f988c24770c.tar.gz
bcm5719-llvm-95bb3c3cc3f74d2448e6a495c6989f988c24770c.zip
[Reprodicuers] Check initialization
If the reproducer is not initialzied, the call to ::Instance() will result in an assertion. llvm-svn: 355055
Diffstat (limited to 'lldb/source/API')
-rw-r--r--lldb/source/API/SBReproducerPrivate.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/source/API/SBReproducerPrivate.h b/lldb/source/API/SBReproducerPrivate.h
index c99faff9a21..7927ba56813 100644
--- a/lldb/source/API/SBReproducerPrivate.h
+++ b/lldb/source/API/SBReproducerPrivate.h
@@ -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 {};
}
OpenPOWER on IntegriCloud