From cfca06d7963fa0909f90483b42a6d7d194d01e08 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 26 Jul 2020 19:36:28 +0000 Subject: Vendor import of llvm-project master 2e10b7a39b9, the last commit before the llvmorg-12-init tag, from which release/11.x was branched. --- lldb/source/Interpreter/OptionValue.cpp | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'lldb/source/Interpreter/OptionValue.cpp') diff --git a/lldb/source/Interpreter/OptionValue.cpp b/lldb/source/Interpreter/OptionValue.cpp index bc929aa9dabf..198be85a7b47 100644 --- a/lldb/source/Interpreter/OptionValue.cpp +++ b/lldb/source/Interpreter/OptionValue.cpp @@ -1,4 +1,4 @@ -//===-- OptionValue.cpp -----------------------------------------*- C++ -*-===// +//===-- OptionValue.cpp ---------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -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; } -- cgit v1.2.3