OSDN Git Service

[mips] Fix crash on recursive using of .set
authorSimon Atanasyan <simon@atanasyan.com>
Tue, 19 Mar 2019 15:15:35 +0000 (15:15 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Tue, 19 Mar 2019 15:15:35 +0000 (15:15 +0000)
commitc9b864d3c6e6046b0d956044912b53077f88c067
tree4d6227135e1d026fbc7e4c288e0ae200667faab5
parent9de7d754365ebdf970da5bc5b7187cc923b7ad79
[mips] Fix crash on recursive using of .set

Switch to the `MCParserUtils::parseAssignmentExpression` for parsing
assignment expressions in the `.set` directive reduces code and allows
to print an error message instead of crashing in case of incorrect
recursive using of the `.set`.

Fix for the bug https://bugs.llvm.org/show_bug.cgi?id=41053.

Differential Revision: http://reviews.llvm.org/D59452

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356461 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/AsmParser/MipsAsmParser.cpp
test/MC/Mips/set-sym-recursive.s [new file with mode: 0644]