[inline asm] Add a check in InlineAsm::ConstraintInfo::Parse to make sure '{'
authorAkira Hatanaka <ahatanaka@apple.com>
Fri, 5 Sep 2014 22:30:32 +0000 (22:30 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Fri, 5 Sep 2014 22:30:32 +0000 (22:30 +0000)
commitcbbae7f41d3f10316c17731b35c3aafd7db2d6be
treef1a52dfdc7395eafc19259537791fb9870d5f9cc
parent52af82df95e656434b89638bbd095cd4252b880e
[inline asm] Add a check in InlineAsm::ConstraintInfo::Parse to make sure '{'
follows '~' in a clobber constraint string.

Previously llc would hit an llvm_unreachable when compiling an inline-asm
instruction with malformed constraint string "~x{21}". This commit enables
LLParser to catch the error earlier and print a more helpful diagnostic.

rdar://problem/14206559

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217288 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/InlineAsm.cpp
test/Assembler/inline-asm-clobber.ll [new file with mode: 0644]