Skip to content

Commit 1cc1222

Browse files
committed
[lldb][Swift] Adjust IsFloatingPointType to upstream changes
1 parent d03c2e4 commit 1cc1222

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwift.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,9 @@ void TypeSystemSwift::Dump(llvm::raw_ostream &output, llvm::StringRef filter) {
120120
}
121121

122122
bool TypeSystemSwift::IsFloatingPointType(opaque_compiler_type_t type,
123-
uint32_t &count, bool &is_complex) {
124-
count = 0;
123+
bool &is_complex) {
125124
is_complex = false;
126125
if (GetTypeInfo(type, nullptr) & eTypeIsFloat) {
127-
count = 1;
128126
return true;
129127
}
130128
return false;

lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwift.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ class TypeSystemSwift : public TypeSystem {
237237
return true;
238238
}
239239
bool IsConst(lldb::opaque_compiler_type_t type) override { return false; }
240-
bool IsFloatingPointType(lldb::opaque_compiler_type_t type, uint32_t &count,
240+
bool IsFloatingPointType(lldb::opaque_compiler_type_t type,
241241
bool &is_complex) override;
242242
bool IsIntegerType(lldb::opaque_compiler_type_t type,
243243
bool &is_signed) override;

lldb/unittests/Symbol/TestTypeSystemSwiftTypeRef.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -406,10 +406,8 @@ TEST_F(TestTypeSystemSwiftTypeRef, Scalar) {
406406
{
407407
NodePointer int_node = b.GlobalTypeMangling(b.IntType());
408408
CompilerType int_type = GetCompilerType(b.Mangle(int_node));
409-
uint32_t count = 99;
410409
bool is_complex = true;
411-
ASSERT_FALSE(int_type.IsFloatingPointType(count, is_complex));
412-
ASSERT_EQ(count, 0UL);
410+
ASSERT_FALSE(int_type.IsFloatingPointType(is_complex));
413411
ASSERT_EQ(is_complex, false);
414412
bool is_signed = true;
415413
ASSERT_TRUE(int_type.IsIntegerType(is_signed));
@@ -418,10 +416,8 @@ TEST_F(TestTypeSystemSwiftTypeRef, Scalar) {
418416
{
419417
NodePointer float_node = b.GlobalTypeMangling(b.FloatType());
420418
CompilerType float_type = GetCompilerType(b.Mangle(float_node));
421-
uint32_t count = 99;
422419
bool is_complex = true;
423-
ASSERT_TRUE(float_type.IsFloatingPointType(count, is_complex));
424-
ASSERT_EQ(count, 1UL);
420+
ASSERT_TRUE(float_type.IsFloatingPointType(is_complex));
425421
ASSERT_EQ(is_complex, false);
426422
bool is_signed = true;
427423
ASSERT_FALSE(float_type.IsIntegerType(is_signed));

0 commit comments

Comments
 (0)