Skip to content

Commit 28455b0

Browse files
authored
Merge pull request #2196 from apple/lldb-Remove-default-argument-from-IsFunctionType-calls-NFC
[lldb] Remove default argument from IsFunctionType calls (NFC)
2 parents c5eae9d + 85615d0 commit 28455b0

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lldb/source/Target/SwiftLanguageRuntimeDynamicTypeResolution.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ CompilerType SwiftLanguageRuntimeImpl::GetChildCompilerTypeAtIndex(
11241124
CompilerType result =
11251125
tuple ? tuple->element_type : GetTypeFromTypeRef(*ts, field.TR);
11261126
// Bug-for-bug compatibility. See comment in SwiftASTContext::GetBitSize().
1127-
if (result.IsFunctionType(nullptr))
1127+
if (result.IsFunctionType())
11281128
child_byte_size = ts->GetPointerByteSize();
11291129
return result;
11301130
};

lldb/unittests/Symbol/TestTypeSystemSwiftTypeRef.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ TEST_F(TestTypeSystemSwiftTypeRef, Function) {
124124
b.Node(Node::Kind::ReturnType,
125125
b.Node(Node::Kind::Type, b.Node(Node::Kind::Tuple)))));
126126
CompilerType void_void = GetCompilerType(b.Mangle(n));
127-
ASSERT_TRUE(void_void.IsFunctionType(nullptr));
127+
ASSERT_TRUE(void_void.IsFunctionType());
128128
ASSERT_TRUE(void_void.IsFunctionPointerType());
129129
ASSERT_EQ(void_void.GetNumberOfFunctionArguments(), 0UL);
130130
}
@@ -133,7 +133,7 @@ TEST_F(TestTypeSystemSwiftTypeRef, Function) {
133133
b.Node(Node::Kind::ImplFunctionType, b.Node(Node::Kind::ImplEscaping),
134134
b.Node(Node::Kind::ImplConvention, "@callee_guaranteed")));
135135
CompilerType impl_void_void = GetCompilerType(b.Mangle(n));
136-
ASSERT_TRUE(impl_void_void.IsFunctionType(nullptr));
136+
ASSERT_TRUE(impl_void_void.IsFunctionType());
137137
ASSERT_EQ(impl_void_void.GetNumberOfFunctionArguments(), 0UL);
138138
}
139139
{
@@ -146,7 +146,7 @@ TEST_F(TestTypeSystemSwiftTypeRef, Function) {
146146
b.Node(Node::Kind::ImplConvention, "@unowned"),
147147
b.Node(Node::Kind::Tuple))));
148148
CompilerType impl_two_args = GetCompilerType(b.Mangle(n));
149-
ASSERT_TRUE(impl_two_args.IsFunctionType(nullptr));
149+
ASSERT_TRUE(impl_two_args.IsFunctionType());
150150
ASSERT_EQ(impl_two_args.GetNumberOfFunctionArguments(), 2UL);
151151
ASSERT_EQ(impl_two_args.GetFunctionArgumentAtIndex(0), int_type);
152152
ASSERT_EQ(impl_two_args.GetFunctionArgumentAtIndex(1), void_type);
@@ -166,7 +166,7 @@ TEST_F(TestTypeSystemSwiftTypeRef, Function) {
166166
b.Node(Node::Kind::ReturnType,
167167
b.Node(Node::Kind::Type, b.Node(Node::Kind::Tuple)))));
168168
CompilerType two_args = GetCompilerType(b.Mangle(n));
169-
ASSERT_TRUE(two_args.IsFunctionType(nullptr));
169+
ASSERT_TRUE(two_args.IsFunctionType());
170170
ASSERT_EQ(two_args.GetNumberOfFunctionArguments(), 2UL);
171171
ASSERT_EQ(two_args.GetFunctionArgumentAtIndex(0), int_type);
172172
ASSERT_EQ(two_args.GetFunctionArgumentAtIndex(1), void_type);
@@ -181,7 +181,7 @@ TEST_F(TestTypeSystemSwiftTypeRef, Function) {
181181
b.Node(Node::Kind::Type, b.Node(Node::Kind::Tuple))),
182182
b.Node(Node::Kind::ReturnType, b.Node(Node::Kind::Type, b.IntType()))));
183183
CompilerType void_int = GetCompilerType(b.Mangle(n));
184-
ASSERT_TRUE(void_int.IsFunctionType(nullptr));
184+
ASSERT_TRUE(void_int.IsFunctionType());
185185
ASSERT_EQ(void_int.GetFunctionReturnType(), int_type);
186186
}
187187
{
@@ -191,7 +191,7 @@ TEST_F(TestTypeSystemSwiftTypeRef, Function) {
191191
b.Node(Node::Kind::ImplResult,
192192
b.Node(Node::Kind::ImplConvention, "@unowned"), b.IntType())));
193193
CompilerType impl_void_int = GetCompilerType(b.Mangle(n));
194-
ASSERT_TRUE(impl_void_int.IsFunctionType(nullptr));
194+
ASSERT_TRUE(impl_void_int.IsFunctionType());
195195
ASSERT_EQ(impl_void_int.GetFunctionReturnType(), int_type);
196196
}
197197
}

0 commit comments

Comments
 (0)