mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +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:
parent
10e412ec6b
commit
dac2953e3b
@ -443,11 +443,8 @@ bool AsmParser::ProcessIncbinFile(const std::string &Filename) {
|
||||
return true;
|
||||
|
||||
// Pick up the bytes from the file and emit them.
|
||||
const char *BufferStart = SrcMgr.getMemoryBuffer(NewBuf)->getBufferStart();
|
||||
size_t BufferSize = SrcMgr.getMemoryBuffer(NewBuf)->getBufferSize();
|
||||
std::string Data(BufferStart, BufferSize);
|
||||
getStreamer().EmitBytes(Data, DEFAULT_ADDRSPACE);
|
||||
|
||||
getStreamer().EmitBytes(SrcMgr.getMemoryBuffer(NewBuf)->getBuffer(),
|
||||
DEFAULT_ADDRSPACE);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user