mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Clean-up of memory buffer and object ownership model in MCJIT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165053 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -295,8 +295,10 @@ void RuntimeDyldMachO::processRelocationRef(const ObjRelocationInfo &Rel,
|
||||
|
||||
|
||||
bool RuntimeDyldMachO::isCompatibleFormat(
|
||||
const MemoryBuffer *InputBuffer) const {
|
||||
StringRef Magic = InputBuffer->getBuffer().slice(0, 4);
|
||||
const ObjectBuffer *InputBuffer) const {
|
||||
if (InputBuffer->getBufferSize() < 4)
|
||||
return false;
|
||||
StringRef Magic(InputBuffer->getBufferStart(), 4);
|
||||
if (Magic == "\xFE\xED\xFA\xCE") return true;
|
||||
if (Magic == "\xCE\xFA\xED\xFE") return true;
|
||||
if (Magic == "\xFE\xED\xFA\xCF") return true;
|
||||
|
Reference in New Issue
Block a user