Fix alignment problem

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8707 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-09-24 22:34:17 +00:00
parent 03f252f1eb
commit 4eed793d5a

View File

@ -97,7 +97,7 @@ BytecodeBufferReader::BytecodeBufferReader(const unsigned char *Buf,
const unsigned char *ParseBegin = 0;
if ((intptr_t)Buf & 3) {
Buffer = new unsigned char[Length+4];
unsigned Offset = 4 - ((intptr_t)Buf & 3); // Make sure it's aligned
unsigned Offset = 4 - ((intptr_t)Buffer & 3); // Make sure it's aligned
ParseBegin = Buffer + Offset;
memcpy((unsigned char*)ParseBegin, Buf, Length); // Copy it over
MustDelete = true;