mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-23 17:28:54 +00:00
Implement constant pointers, and null specifically in the parser, bytecode writer, and
bytecode reader. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@668 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -250,7 +250,7 @@ bool BytecodeParser::parseConstPoolValue(const uchar *&Buf,
|
||||
}
|
||||
|
||||
case Type::StructTyID: {
|
||||
const StructType *ST = (const StructType*)Ty;
|
||||
const StructType *ST = Ty->castStructType();
|
||||
const StructType::ElementTypes &ET = ST->getElementTypes();
|
||||
|
||||
vector<ConstPoolVal *> Elements;
|
||||
@@ -267,6 +267,17 @@ bool BytecodeParser::parseConstPoolValue(const uchar *&Buf,
|
||||
break;
|
||||
}
|
||||
|
||||
case Type::PointerTyID: {
|
||||
const PointerType *PT = Ty->castPointerType();
|
||||
unsigned SubClass;
|
||||
if (read_vbr(Buf, EndBuf, SubClass)) return failure(true);
|
||||
if (SubClass != 0) return failure(true);
|
||||
|
||||
|
||||
V = ConstPoolPointer::getNullPointer(PT);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
cerr << __FILE__ << ":" << __LINE__
|
||||
<< ": Don't know how to deserialize constant value of type '"
|
||||
|
Reference in New Issue
Block a user