r180874 - [inline asm] Add a test case for r180873. Test case needs to be on the clang
Eric Christopher
echristo at gmail.com
Tue May 7 15:21:12 PDT 2013
On Tue, May 7, 2013 at 3:18 PM, Chad Rosier <mcrosier at apple.com> wrote:
>
> On May 7, 2013, at 3:14 PM, Eric Christopher <echristo at gmail.com> wrote:
>
> I saw that. The original testcase for that code has a .ll input.
> What's different?
>
>
> From LLVMContext:
>
> void LLVMContext::emitError(unsigned LocCookie, const Twine &ErrorStr) {
> 00116 // If there is no error handler installed, just print the error and
> exit.
> 00117 if (pImpl->InlineAsmDiagHandler == 0) {
> 00118 errs() << "error: " << ErrorStr << "\n";
> 00119 exit(1);
> 00120 }
> 00121
> 00122 // If we do have an error handler, we can report the error and keep
> going.
> 00123 SMDiagnostic Diag("", SourceMgr::DK_Error, ErrorStr.str());
> 00124
> 00125 pImpl->InlineAsmDiagHandler(Diag, pImpl->InlineAsmDiagContext,
> LocCookie);
> 00126 }
>
>
> If we test directly with a .ll file the InlineAsmDiagHandler will be NULL.
> Thus, only the first error will be emitted and llc will exit.
> Alternatively, if we invoke clang the diagnostic handler will be in place,
> so we can report multiple errors and then exit, which is in fact the very
> fix in r180874.
> Hope that makes sense.
>
So it does. Hrm. Annoying :)
I still think this stuff is better to check in the front end though.
Any hope of checking for valid conversions there instead of waiting
for the backend to fail?
-eric
More information about the cfe-commits
mailing list