mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 06:29:05 +00:00
Another improvement to the implementation of .incbin directive by avoiding a
buffer copy. Suggestion by Chris Lattner! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146614 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -443,11 +443,8 @@ bool AsmParser::ProcessIncbinFile(const std::string &Filename) {
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Pick up the bytes from the file and emit them.
|
// Pick up the bytes from the file and emit them.
|
||||||
const char *BufferStart = SrcMgr.getMemoryBuffer(NewBuf)->getBufferStart();
|
getStreamer().EmitBytes(SrcMgr.getMemoryBuffer(NewBuf)->getBuffer(),
|
||||||
size_t BufferSize = SrcMgr.getMemoryBuffer(NewBuf)->getBufferSize();
|
DEFAULT_ADDRSPACE);
|
||||||
std::string Data(BufferStart, BufferSize);
|
|
||||||
getStreamer().EmitBytes(Data, DEFAULT_ADDRSPACE);
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user