aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/CppBackend/CPPBackend.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-07-31 01:26:24 +0000
committerEric Christopher <echristo@gmail.com>2013-07-31 01:26:24 +0000
commite6656ac870cd76465a544d44489b27a552b24e5d (patch)
treeaa58321efc990b7211b75ad9fbd4829e0e1272c6 /llvm/lib/Target/CppBackend/CPPBackend.cpp
parentd6445686a9a723e02b0584dc00951e16512e7484 (diff)
downloadllvm-e6656ac870cd76465a544d44489b27a552b24e5d.zip
llvm-e6656ac870cd76465a544d44489b27a552b24e5d.tar.gz
llvm-e6656ac870cd76465a544d44489b27a552b24e5d.tar.bz2
Fix crashing on invalid inline asm with matching constraints.
For a testcase like the following: typedef unsigned long uint64_t; typedef struct { uint64_t lo; uint64_t hi; } blob128_t; void add_128_to_128(const blob128_t *in, blob128_t *res) { asm ("PAND %1, %0" : "+Q"(*res) : "Q"(*in)); } where we'll fail to allocate the register for the output constraint, our matching input constraint will not find a register to match, and could try to search past the end of the current operands array. On the idea that we'd like to attempt to keep compilation going to find more errors in the module, change the error cases when we're visiting inline asm IR to return immediately and avoid trying to create a node in the DAG. This leaves us with only a single error message per inline asm instruction, but allows us to safely keep going in the general case. llvm-svn: 187470
Diffstat (limited to 'llvm/lib/Target/CppBackend/CPPBackend.cpp')
0 files changed, 0 insertions, 0 deletions