[LLParser] Simplify type checking in ParseArithmetic and ParseUnaryOp.
authorCraig Topper <craig.topper@intel.com>
Sun, 5 May 2019 17:19:19 +0000 (17:19 +0000)
committerCraig Topper <craig.topper@intel.com>
Sun, 5 May 2019 17:19:19 +0000 (17:19 +0000)
commit8279695d666d582877bd4329f090bbacf152c8ee
tree2f4e2fdf8d4b97b189bf01df506b48fb0ba027be
parent41c999bcf5e7654f3b7098907377a786c301b606
[LLParser] Simplify type checking in ParseArithmetic and ParseUnaryOp.

Summary:
These methods previously took a 0, 1, or 2 to indicate what types were allowed, but the 0 encoding which meant both fp and integer types has been unused for years. Its leftover from when add/sub/mul used to be shared between int and fp

Simplify it by changing it to just a bool to distinquish int and fp.

Reviewers: spatel, dblaikie, jyknight, arsenm

Reviewed By: spatel

Subscribers: wdng, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D61561

llvm-svn: 359986
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/AsmParser/LLParser.h