This is an archive of the discontinued LLVM Phabricator instance.

[Assembler] Allow buffer id to be passed to MCAsmParser
AbandonedPublic

Authored by sanwou01 on Feb 1 2017, 11:31 AM.

Details

Summary

The MCAsmParser assumes that the buffer it should parse is the one
containing the Main File. Generalize the AsmParser constructor to pass
in a buffer id.

Event Timeline

sanwou01 created this revision.Feb 1 2017, 11:31 AM
sanwou01 added a subscriber: llvm-commits.
rengolin edited edge metadata.Feb 1 2017, 2:12 PM

Hum, this sounds nasty. What kind of errors did you see? Could you devise a test?

compnerd requested changes to this revision.Feb 1 2017, 7:06 PM

The inline assembly uses a local buffer (which is the "main" buffer). The SLoc is tracked for where the inline assembly was instantiated for provenance. This seems conflicting with the description. Furthermore, a test case is absolutely needed.

This revision now requires changes to proceed.Feb 1 2017, 7:06 PM
sanwou01 abandoned this revision.Feb 8 2017, 1:43 AM

@compnerd, this is part of a larger set of patches that changes the inline asm SourceMgr to be used multiple times. It will land as part of D29441.