mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-29 16:41:27 +00:00
Change the error message when -split-input-file
is used with mlir-opt to make it recognizable by IDEs
By adding the line number of the split point immediately after the file name (separated by `:`) this is recognized by various tool as a proper location. Ideally we would want to point to the line of the error, but that would require some very invasive changes I suspect. Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D93363
This commit is contained in:
parent
2da13f1246
commit
a6d76cf610
@ -37,8 +37,9 @@ mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer> originalBuffer,
|
||||
auto splitLoc = llvm::SMLoc::getFromPointer(subBuffer.data());
|
||||
unsigned splitLine = fileSourceMgr.getLineAndColumn(splitLoc).first;
|
||||
auto subMemBuffer = llvm::MemoryBuffer::getMemBufferCopy(
|
||||
subBuffer, origMemBuffer->getBufferIdentifier() +
|
||||
Twine(" split at line #") + Twine(splitLine));
|
||||
subBuffer, Twine("within split at ") +
|
||||
origMemBuffer->getBufferIdentifier() + ":" +
|
||||
Twine(splitLine) + " offset ");
|
||||
if (failed(processChunkBuffer(std::move(subMemBuffer), os)))
|
||||
hadFailure = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user