aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/lldb/source/Interpreter/CommandAlias.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-09-02 21:17:18 +0000
committerDimitry Andric <dim@FreeBSD.org>2023-12-08 17:34:50 +0000
commit06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e (patch)
tree62f873df87c7c675557a179e0c4c83fe9f3087bc /contrib/llvm-project/lldb/source/Interpreter/CommandAlias.cpp
parentcf037972ea8863e2bab7461d77345367d2c1e054 (diff)
parent7fa27ce4a07f19b07799a767fc29416f3b625afb (diff)
Diffstat (limited to 'contrib/llvm-project/lldb/source/Interpreter/CommandAlias.cpp')
-rw-r--r--contrib/llvm-project/lldb/source/Interpreter/CommandAlias.cpp7
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};
}