summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/include/lldb/Utility/ReproducerInstrumentation.h6
-rw-r--r--lldb/source/Utility/ReproducerInstrumentation.cpp2
-rw-r--r--lldb/tools/driver/Driver.cpp4
3 files changed, 4 insertions, 8 deletions
diff --git a/lldb/include/lldb/Utility/ReproducerInstrumentation.h b/lldb/include/lldb/Utility/ReproducerInstrumentation.h
index aca58335a8b..37192b43eb7 100644
--- a/lldb/include/lldb/Utility/ReproducerInstrumentation.h
+++ b/lldb/include/lldb/Utility/ReproducerInstrumentation.h
@@ -431,13 +431,13 @@ struct invoke<void (Class::*)(Args...)> {
class ObjectToIndex {
public:
template <typename T> unsigned GetIndexForObject(T *t) {
- return GetIndexForObjectImpl((void *)t);
+ return GetIndexForObjectImpl(static_cast<const void *>(t));
}
private:
- unsigned GetIndexForObjectImpl(void *object);
+ unsigned GetIndexForObjectImpl(const void *object);
- llvm::DenseMap<void *, unsigned> m_mapping;
+ llvm::DenseMap<const void *, unsigned> m_mapping;
};
/// Serializes functions, their arguments and their return type to a stream.
diff --git a/lldb/source/Utility/ReproducerInstrumentation.cpp b/lldb/source/Utility/ReproducerInstrumentation.cpp
index 984540d1c0b..f4ae7e89cf9 100644
--- a/lldb/source/Utility/ReproducerInstrumentation.cpp
+++ b/lldb/source/Utility/ReproducerInstrumentation.cpp
@@ -68,7 +68,7 @@ unsigned Registry::GetID(uintptr_t addr) {
return id;
}
-unsigned ObjectToIndex::GetIndexForObjectImpl(void *object) {
+unsigned ObjectToIndex::GetIndexForObjectImpl(const void *object) {
unsigned index = m_mapping.size() + 1;
auto it = m_mapping.find(object);
if (it == m_mapping.end())
diff --git a/lldb/tools/driver/Driver.cpp b/lldb/tools/driver/Driver.cpp
index 59bfca6f2ff..2aaaa05d751 100644
--- a/lldb/tools/driver/Driver.cpp
+++ b/lldb/tools/driver/Driver.cpp
@@ -888,9 +888,6 @@ main(int argc, char const *argv[])
<< '\n';
}
- // Remember if we're in replay mode for later.
- bool replay = false;
-
SBInitializerOptions options;
if (auto *arg = input_args.getLastArg(OPT_capture)) {
auto arg_value = arg->getValue();
@@ -902,7 +899,6 @@ main(int argc, char const *argv[])
auto arg_value = arg->getValue();
options.SetReplayReproducer(true);
options.SetReproducerPath(arg_value);
- replay = true;
}
SBError error = SBDebugger::Initialize(options);
OpenPOWER on IntegriCloud