Skip to content

Commit cdf6ef5

Browse files
bors[bot]vext01
andauthored
87: Serialise the pointer type. r=ltratt a=vext01 Co-authored-by: Edd Barrett <[email protected]>
2 parents 07152d2 + cde66e5 commit cdf6ef5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/YkIR/YkIRWriter.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ enum OperandKind {
5757
enum TypeKind {
5858
Void = 0,
5959
Integer,
60+
Ptr,
6061
UnimplementedType = 255, // YKFIXME: Will eventually be deleted.
6162
};
6263

@@ -238,6 +239,8 @@ class YkIRWriter {
238239
void serialiseType(Type *Ty) {
239240
if (Ty->isVoidTy()) {
240241
OutStreamer.emitInt8(TypeKind::Void);
242+
} else if (Ty->isPointerTy()) {
243+
OutStreamer.emitInt8(TypeKind::Ptr);
241244
} else if (IntegerType *ITy = dyn_cast<IntegerType>(Ty)) {
242245
OutStreamer.emitInt8(TypeKind::Integer);
243246
OutStreamer.emitInt32(ITy->getBitWidth());

0 commit comments

Comments
 (0)