This is an archive of the discontinued LLVM Phabricator instance.

Don't generate crash report when inline asm can't be parsed
AbandonedPublic

Authored by steven_wu on Feb 6 2015, 3:27 PM.

Details

Reviewers
echristo
Summary

Crash report is currently generated when inline asm can't be parsed
and no DiagnosticHandler is registered. However, clang doesn't set up
DiagnosticHandle for inline asm when the input is bitcode and
compiling invalid asm from bitcode shouldn't be a compiler crash.

Diff Detail

Event Timeline

steven_wu updated this revision to Diff 19516.Feb 6 2015, 3:27 PM
steven_wu retitled this revision from to Don't generate crash report when inline asm can't be parsed.
steven_wu updated this object.
steven_wu edited the test plan for this revision. (Show Details)
steven_wu added a subscriber: Unknown Object (MLST).
echristo added a subscriber: echristo.

Not sure I agree with this - it changes the behavior (crash or not) based on whether or not there's bitcode as the input. There are lots of places that the behavior will continue as crashing. I think what should happen if you don't want this type of behavior is to avoid setting a global error handler via clang.

Thoughts? More explanation on your logic?

-eric

I think my patch only disable the crash report when Parser->run returns error in EmitInlineAsm. It is not related to what input type is. Is there any circumstance when it is a compiler crash when Parser->run returns error?
I thought about putting a error handler in clang but I don’t think clang can emit any diagnostics that is more helpful than backend.

steven_wu abandoned this revision.Dec 8 2015, 1:34 PM