-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlldb.patch
22 lines (20 loc) · 844 Bytes
/
lldb.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff --git a/lldb/source/Symbol/SwiftASTContext.cpp b/lldb/source/Symbol/SwiftASTContext.cpp
index 732389a6fcd..610e726df5a 100644
--- a/lldb/source/Symbol/SwiftASTContext.cpp
+++ b/lldb/source/Symbol/SwiftASTContext.cpp
@@ -596,12 +596,11 @@ public:
size_t discriminator = 0;
size_t power_of_2 = 1;
- auto enumerator = m_tag_bits.enumerateSetBits();
- for (llvm::Optional<size_t> next = enumerator.findNext(); next.hasValue();
- next = enumerator.findNext()) {
- discriminator =
- discriminator + (current_payload[next.getValue()] ? power_of_2 : 0);
- power_of_2 <<= 1;
+ for (size_t i = 0; i < m_tag_bits.size(); ++i) {
+ if (m_tag_bits[i]) {
+ discriminator |= current_payload[i] ? power_of_2 : 0;
+ power_of_2 <<= 1;
+ }
}
// The discriminator is too large?