[TableGen] Fix line wrapping logic for the autogenerated header to use math that...
authorCraig Topper <craig.topper@gmail.com>
Tue, 26 May 2015 08:07:56 +0000 (08:07 +0000)
committerCraig Topper <craig.topper@gmail.com>
Tue, 26 May 2015 08:07:56 +0000 (08:07 +0000)
commit7b0f8fc600aea7f453c494e50cb3e53893c89769
treee4c074933fb4d39de032ba6099b47c997c25e4c9
parentc9739ec212365e5197eb87cb3a50d256df626dc4
[TableGen] Fix line wrapping logic for the autogenerated header to use math that makes more sense (at least to me).

The old code had a bug if the description was between 75 and 85 characters or so as it substracted PSLen from Desc.size() instead of MAX_LINE_LEN in the compare. It also calculated odd values for PosE on the last split and just let StringRef::slice take care of it being larger than the description string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238187 91177308-0d34-0410-b5e6-96231b3b80d8
lib/TableGen/TableGenBackend.cpp