diff options
Diffstat (limited to 'contrib/llvm-project/lldb/source/Interpreter/CommandAlias.cpp')
-rw-r--r-- | contrib/llvm-project/lldb/source/Interpreter/CommandAlias.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/llvm-project/lldb/source/Interpreter/CommandAlias.cpp b/contrib/llvm-project/lldb/source/Interpreter/CommandAlias.cpp index e36edcac15a5..f6eaeacff81e 100644 --- a/contrib/llvm-project/lldb/source/Interpreter/CommandAlias.cpp +++ b/contrib/llvm-project/lldb/source/Interpreter/CommandAlias.cpp @@ -8,6 +8,7 @@ #include "lldb/Interpreter/CommandAlias.h" +#include "llvm/ADT/STLExtras.h" #include "llvm/Support/ErrorHandling.h" #include "lldb/Interpreter/CommandInterpreter.h" @@ -211,9 +212,9 @@ std::pair<lldb::CommandObjectSP, OptionArgVectorSP> CommandAlias::Desugar() { // FIXME: This doesn't work if the original alias fills a slot in the // underlying alias, since this just appends the two lists. auto desugared = ((CommandAlias *)underlying.get())->Desugar(); - auto options = GetOptionArguments(); - options->insert(options->begin(), desugared.second->begin(), - desugared.second->end()); + OptionArgVectorSP options = std::make_shared<OptionArgVector>(); + llvm::append_range(*options, *desugared.second); + llvm::append_range(*options, *GetOptionArguments()); return {desugared.first, options}; } |