Skip to content

Commit 4bd5d15

Browse files
committed
use StringRef and MutableArrayRef in new API
1 parent 0a86741 commit 4bd5d15

File tree

4 files changed

+21
-13
lines changed

4 files changed

+21
-13
lines changed

lldb/include/lldb/Target/SwiftLanguageRuntime.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,11 @@ class SwiftLanguageRuntime : public LanguageRuntime {
256256
llvm::Optional<unsigned> GetNumChildren(CompilerType type,
257257
ValueObject *valobj);
258258

259-
llvm::Optional<size_t> GetIndexOfChildMemberWithName(
260-
CompilerType type, const char *name, ExecutionContext *exe_ctx,
261-
bool omit_empty_base_classes, std::vector<uint32_t> &child_indexes);
259+
llvm::Optional<size_t>
260+
GetIndexOfChildMemberWithName(CompilerType type, llvm::StringRef name,
261+
ExecutionContext *exe_ctx,
262+
bool omit_empty_base_classes,
263+
llvm::MutableArrayRef<uint32_t> child_indexes);
262264

263265
/// Ask Remote Mirrors about a child of a composite type.
264266
CompilerType GetChildCompilerTypeAtIndex(

lldb/source/Target/SwiftLanguageRuntime.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,11 @@ class SwiftLanguageRuntimeStub {
257257
return {};
258258
}
259259

260-
llvm::Optional<size_t> GetIndexOfChildMemberWithName(
261-
CompilerType type, const char *name, ExecutionContext *exe_ctx,
262-
bool omit_empty_base_classes, std::vector<uint32_t> &child_indexes) {
260+
llvm::Optional<size_t>
261+
GetIndexOfChildMemberWithName(CompilerType type, llvm::StringRef name,
262+
ExecutionContext *exe_ctx,
263+
bool omit_empty_base_classes,
264+
llvm::MutableArrayRef<uint32_t> child_indexes) {
263265
STUB_LOG();
264266
return {};
265267
}
@@ -2152,8 +2154,9 @@ SwiftLanguageRuntime::GetNumChildren(CompilerType type, ValueObject *valobj) {
21522154
}
21532155

21542156
llvm::Optional<size_t> SwiftLanguageRuntime::GetIndexOfChildMemberWithName(
2155-
CompilerType type, const char *name, ExecutionContext *exe_ctx,
2156-
bool omit_empty_base_classes, std::vector<uint32_t> &child_indexes) {
2157+
CompilerType type, llvm::StringRef name, ExecutionContext *exe_ctx,
2158+
bool omit_empty_base_classes,
2159+
llvm::MutableArrayRef<uint32_t> child_indexes) {
21572160
FORWARD(GetIndexOfChildMemberWithName, type, name, exe_ctx,
21582161
omit_empty_base_classes, child_indexes);
21592162
}

lldb/source/Target/SwiftLanguageRuntimeDynamicTypeResolution.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,8 +1143,9 @@ GetTypeFromTypeRef(TypeSystemSwiftTypeRef &ts,
11431143
}
11441144

11451145
llvm::Optional<size_t> SwiftLanguageRuntimeImpl::GetIndexOfChildMemberWithName(
1146-
CompilerType type, const char *name, ExecutionContext *exe_ctx,
1147-
bool omit_empty_base_classes, std::vector<uint32_t> &child_indexes) {
1146+
CompilerType type, llvm::StringRef name, ExecutionContext *exe_ctx,
1147+
bool omit_empty_base_classes,
1148+
llvm::MutableArrayRef<uint32_t> child_indexes) {
11481149
return {};
11491150
}
11501151

lldb/source/Target/SwiftLanguageRuntimeImpl.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,11 @@ class SwiftLanguageRuntimeImpl {
120120
llvm::Optional<unsigned> GetNumChildren(CompilerType type,
121121
ValueObject *valobj);
122122

123-
llvm::Optional<size_t> GetIndexOfChildMemberWithName(
124-
CompilerType type, const char *name, ExecutionContext *exe_ctx,
125-
bool omit_empty_base_classes, std::vector<uint32_t> &child_indexes);
123+
llvm::Optional<size_t>
124+
GetIndexOfChildMemberWithName(CompilerType type, llvm::StringRef name,
125+
ExecutionContext *exe_ctx,
126+
bool omit_empty_base_classes,
127+
llvm::MutableArrayRef<uint32_t> child_indexes);
126128

127129
CompilerType GetChildCompilerTypeAtIndex(
128130
CompilerType type, size_t idx, bool transparent_pointers,

0 commit comments

Comments
 (0)