HomePhabricator

[CodeGen]: fix error message for "=r" asm constraint

Authored by glider on Aug 30 2019, 1:58 AM.

Description

[CodeGen]: fix error message for "=r" asm constraint

Summary:
Nico Weber reported that the following code:

char buf[9];
asm("" : "=r" (buf));

yields the "impossible constraint in asm: can't store struct into a register"
error message, although |buf| is not a struct (see
http://crbug.com/999160).

Make the error message more generic and add a test for it.
Also make sure other tests in x86_64-PR42672.c check for the full error
message.

Reviewers: eli.friedman, thakis

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 370444

Details

Committed
gliderAug 30 2019, 1:58 AM
Differential Revision
D66948: [CodeGen]: fix error message for "=r" asm constraint
Parents
rGfd66c8bf072d: vim: add `immarg` keyword
Branches
Unknown
Tags
Unknown