diff --git a/lldb/source/Interpreter/OptionValue.cpp b/lldb/source/Interpreter/OptionValue.cpp index e127ad9550ea..198be85a7b47 100644 --- a/lldb/source/Interpreter/OptionValue.cpp +++ b/lldb/source/Interpreter/OptionValue.cpp @@ -7,10 +7,11 @@ //===----------------------------------------------------------------------===// #include "lldb/Interpreter/OptionValue.h" - #include "lldb/Interpreter/OptionValues.h" #include "lldb/Utility/StringList.h" +#include + using namespace lldb; using namespace lldb_private; @@ -505,37 +506,37 @@ lldb::OptionValueSP OptionValue::CreateValueFromCStringForTypeMask( lldb::OptionValueSP value_sp; switch (type_mask) { case 1u << eTypeArch: - value_sp.reset(new OptionValueArch()); + value_sp = std::make_shared(); break; case 1u << eTypeBoolean: - value_sp.reset(new OptionValueBoolean(false)); + value_sp = std::make_shared(false); break; case 1u << eTypeChar: - value_sp.reset(new OptionValueChar('\0')); + value_sp = std::make_shared('\0'); break; case 1u << eTypeFileSpec: - value_sp.reset(new OptionValueFileSpec()); + value_sp = std::make_shared(); break; case 1u << eTypeFormat: - value_sp.reset(new OptionValueFormat(eFormatInvalid)); + value_sp = std::make_shared(eFormatInvalid); break; case 1u << eTypeFormatEntity: - value_sp.reset(new OptionValueFormatEntity(nullptr)); + value_sp = std::make_shared(nullptr); break; case 1u << eTypeLanguage: - value_sp.reset(new OptionValueLanguage(eLanguageTypeUnknown)); + value_sp = std::make_shared(eLanguageTypeUnknown); break; case 1u << eTypeSInt64: - value_sp.reset(new OptionValueSInt64()); + value_sp = std::make_shared(); break; case 1u << eTypeString: - value_sp.reset(new OptionValueString()); + value_sp = std::make_shared(); break; case 1u << eTypeUInt64: - value_sp.reset(new OptionValueUInt64()); + value_sp = std::make_shared(); break; case 1u << eTypeUUID: - value_sp.reset(new OptionValueUUID()); + value_sp = std::make_shared(); break; } diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp index 90dfbe288767..08b1ae0ccde2 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp @@ -161,8 +161,9 @@ public: DiagnosticOptions *m_options = new DiagnosticOptions(opts); m_options->ShowPresumedLoc = true; m_options->ShowLevel = false; - m_os.reset(new llvm::raw_string_ostream(m_output)); - m_passthrough.reset(new clang::TextDiagnosticPrinter(*m_os, m_options)); + m_os = std::make_shared(m_output); + m_passthrough = + std::make_shared(*m_os, m_options); } void ResetManager(DiagnosticManager *manager = nullptr) { diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp index e003de519884..f915a699a8e2 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp @@ -6,8 +6,6 @@ // //===----------------------------------------------------------------------===// -#include - #include "clang/Basic/TargetInfo.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Frontend/FrontendActions.h" @@ -38,6 +36,9 @@ #include "lldb/Utility/Reproducer.h" #include "lldb/Utility/StreamString.h" +#include +#include + using namespace lldb_private; namespace { @@ -130,8 +131,9 @@ StoringDiagnosticConsumer::StoringDiagnosticConsumer() { m_log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS); clang::DiagnosticOptions *m_options = new clang::DiagnosticOptions(); - m_os.reset(new llvm::raw_string_ostream(m_output)); - m_diag_printer.reset(new clang::TextDiagnosticPrinter(*m_os, m_options)); + m_os = std::make_shared(m_output); + m_diag_printer = + std::make_shared(*m_os, m_options); } void StoringDiagnosticConsumer::HandleDiagnostic( diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h index 310d9127f6db..5e3726548369 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h @@ -428,7 +428,8 @@ protected: void InitSearchFilter(lldb::TargetSP target) { if (!m_filtersp) - m_filtersp.reset(new SearchFilterForUnconstrainedSearches(target)); + m_filtersp = + std::make_shared(target); } void FixupScriptDetails(lldb_renderscript::RSModuleDescriptorSP rsmodule_sp);