This is an archive of the discontinued LLVM Phabricator instance.

[Diagnostics][Inline-Asm]Allow targets to provide elaborations regarding failures resulted from (GNU-inline-asm) modifiers' apply
Needs ReviewPublic

Authored by coby on Jul 26 2017, 7:15 AM.

Details

Summary

Currently, when a machine-dependent GNU-inline-asm modifier cannot be applied due to whatever error - a rather general error message is emitted.
This patch provides infrastructure for a target to supply a more detailed diagnostics regarding such a failure.
As a result - diagnostics for the case where X86's 'H' modifier apply is erroneous is added, which aligns Clang's diagnostics with GCC.

Diff Detail

Repository
rL LLVM

Event Timeline

coby created this revision.Jul 26 2017, 7:15 AM
coby added a comment.Jul 26 2017, 7:16 AM

Please add whatever reviewers you see as fit :)
thx

Any tests checking new diagnostics?

coby added a comment.Jul 26 2017, 7:36 AM

Any tests checking new diagnostics?

blimey
forgot to add it, thanks for mentioning it, will upload right away

coby updated this revision to Diff 108277.Jul 26 2017, 7:43 AM

Added forgotten test

arsenm added inline comments.Aug 9 2017, 1:00 PM
lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
13–14

I would expect this does the right thing anyway if you just << ErrorMsg even when empty

asb added a subscriber: asb.Aug 10 2017, 1:01 AM
coby added inline comments.Aug 14 2017, 11:39 AM
lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
13–14

You right, thx.
will update