diff options
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 339fae04..26994b1 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -1052,6 +1052,18 @@ void ModuleBitcodeWriter::writeTypeTable() { TypeVals.push_back(true); break; } + case Type::TargetExtTyID: { + TargetExtType *TET = cast<TargetExtType>(T); + Code = bitc::TYPE_CODE_TARGET_TYPE; + writeStringRecord(Stream, bitc::TYPE_CODE_STRUCT_NAME, TET->getName(), + StructNameAbbrev); + TypeVals.push_back(TET->getNumTypeParameters()); + for (Type *InnerTy : TET->type_params()) + TypeVals.push_back(VE.getTypeID(InnerTy)); + for (unsigned IntParam : TET->int_params()) + TypeVals.push_back(IntParam); + break; + } case Type::TypedPointerTyID: llvm_unreachable("Typed pointers cannot be added to IR modules"); } |