This is an archive of the discontinued LLVM Phabricator instance.

[Assembler] Improve diagnostics for inline assembly.
ClosedPublic

Authored by sanwou01 on Feb 9 2017, 9:07 AM.

Details

Summary

Keep a vector of LocInfos around; one for each call to EmitInlineAsm.
Since each call to EmitInlineAsm creates a new buffer in the inline asm
SourceMgr, we can use the buffer number to map to the right LocInfo.

Diff Detail

Repository
rL LLVM

Event Timeline

sanwou01 created this revision.Feb 9 2017, 9:07 AM

Unfortunately, there is no consumer of LocInfos or LocCookies in besides clang, which is why a test is missing. I'll upload a patch (test only) for clang separately.

sanwou01 updated this revision to Diff 87826.Feb 9 2017, 9:48 AM

Missed an off-by-one error...

rnk accepted this revision.Feb 9 2017, 9:56 AM

lgtm

This revision is now accepted and ready to land.Feb 9 2017, 9:56 AM
This revision was automatically updated to reflect the committed changes.