Skip to content

Commit 6eca31c

Browse files
[llvm-debuginfo-analyzer] Fix crash with WebAssembly dead code
#136772 Incorrect handling of 'tombstone' value for WebAssembly. Address reviewes comments: - Discard the changes done to 'LVRange.h'.
1 parent a93d7f6 commit 6eca31c

File tree

1 file changed

+3
-6
lines changed
  • llvm/include/llvm/DebugInfo/LogicalView/Core

1 file changed

+3
-6
lines changed

llvm/include/llvm/DebugInfo/LogicalView/Core/LVRange.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,11 @@ class LLVM_ABI LVRange final : public LVObject {
5555
LVAllocator Allocator;
5656
LVRangesTree RangesTree;
5757
LVRangeEntries RangeEntries;
58-
std::optional<LVAddress> TombstoneAddress;
59-
LVAddress Lower = 0;
58+
LVAddress Lower = MaxAddress;
6059
LVAddress Upper = 0;
6160

6261
public:
63-
LVRange(std::optional<LVAddress> Address = std::nullopt)
64-
: LVObject(), RangesTree(Allocator), TombstoneAddress(Address),
65-
Lower(Address ? Address.value() : MaxAddress) {}
62+
LVRange() : LVObject(), RangesTree(Allocator) {}
6663
LVRange(const LVRange &) = delete;
6764
LVRange &operator=(const LVRange &) = delete;
6865
~LVRange() = default;
@@ -79,7 +76,7 @@ class LLVM_ABI LVRange final : public LVObject {
7976

8077
void clear() {
8178
RangeEntries.clear();
82-
Lower = TombstoneAddress ? TombstoneAddress.value() : MaxAddress;
79+
Lower = MaxAddress;
8380
Upper = 0;
8481
}
8582
bool empty() const { return RangeEntries.empty(); }

0 commit comments

Comments
 (0)