Fix inline assembler constraint validation
authorJoerg Sonnenberger <joerg@bec.de>
Wed, 27 Feb 2019 00:40:59 +0000 (00:40 +0000)
committerJoerg Sonnenberger <joerg@bec.de>
Wed, 27 Feb 2019 00:40:59 +0000 (00:40 +0000)
commit49ef2a4acdbba941d67d65b42d302191424c4119
tree5424e0077ccd79cc8a813f07e61437bc45c381da
parent7ad06a9319fdd54a890f75026049e3e4bcfa061e
Fix inline assembler constraint validation

The current constraint logic is both too lax and too strict. It fails
for input outside the [INT_MIN..INT_MAX] range, but it also implicitly
accepts 0 as value when it should not. Adjust logic to handle both
correctly.

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

llvm-svn: 354937
clang/include/clang/Basic/TargetInfo.h
clang/test/Sema/inline-asm-validate-x86.c