OSDN Git Service

[ARM, Asm] Fix ubsan failure caused by out-of-range enum value
authorOliver Stannard <oliver.stannard@arm.com>
Tue, 3 Oct 2017 12:45:18 +0000 (12:45 +0000)
committerOliver Stannard <oliver.stannard@arm.com>
Tue, 3 Oct 2017 12:45:18 +0000 (12:45 +0000)
commita22fcf205ad22a13c646649f2701afe6feafc523
tree6824cf7bd7d14ae67da1c37004d43b9aad0d4fda
parentcacf9441bd73957c86f4b753ef6b9179b3fb2c87
[ARM, Asm] Fix ubsan failure caused by out-of-range enum value

In this code, we use ~0U as a sentinel value for any operand class that doesn't
have a user-friendly error message, but this value isn't in range of the
MatchClassKind enum, so we need to ensure it does not get passed to isSubclass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314793 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/AsmParser/ARMAsmParser.cpp