Lines Matching refs:Stream
121 unsigned AbbrevToUse, BitstreamWriter &Stream) { in WriteStringRecord() argument
132 Stream.EmitRecord(Code, Vals, AbbrevToUse); in WriteStringRecord()
137 BitstreamWriter &Stream) { in WriteAttributeTable() argument
141 Stream.EnterSubblock(bitc::PARAMATTR_BLOCK_ID, 3); in WriteAttributeTable()
152 Stream.EmitRecord(bitc::PARAMATTR_CODE_ENTRY_OLD, Record); in WriteAttributeTable()
156 Stream.ExitBlock(); in WriteAttributeTable()
160 BitstreamWriter &Stream) { in WriteTypeSymbolTable() argument
162 Stream.EnterSubblock(TYPE_SYMTAB_BLOCK_ID_OLD_3_0, 3); in WriteTypeSymbolTable()
171 unsigned V7Abbrev = Stream.EmitAbbrev(Abbv); in WriteTypeSymbolTable()
199 Stream.EmitRecord(bitc::VST_CODE_ENTRY, NameVals, is7Bit ? V7Abbrev : 0); in WriteTypeSymbolTable()
208 Stream.ExitBlock(); in WriteTypeSymbolTable()
213 BitstreamWriter &Stream) { in WriteTypeTable() argument
216 Stream.EnterSubblock(TYPE_BLOCK_ID_OLD_3_0, 4 /*count from # abbrevs */); in WriteTypeTable()
226 unsigned PtrAbbrev = Stream.EmitAbbrev(Abbv); in WriteTypeTable()
235 unsigned FunctionAbbrev = Stream.EmitAbbrev(Abbv); in WriteTypeTable()
244 unsigned StructAbbrev = Stream.EmitAbbrev(Abbv); in WriteTypeTable()
252 unsigned ArrayAbbrev = Stream.EmitAbbrev(Abbv); in WriteTypeTable()
256 Stream.EmitRecord(bitc::TYPE_CODE_NUMENTRY, TypeVals); in WriteTypeTable()
335 Stream.EmitRecord(Code, TypeVals, AbbrevToUse); in WriteTypeTable()
339 Stream.ExitBlock(); in WriteTypeTable()
341 WriteTypeSymbolTable(VE, Stream); in WriteTypeTable()
385 BitstreamWriter &Stream) { in WriteModuleInfo() argument
389 0/*TODO*/, Stream); in WriteModuleInfo()
392 WriteStringRecord(bitc::MODULE_CODE_DATALAYOUT, DL, 0 /*TODO*/, Stream); in WriteModuleInfo()
395 0/*TODO*/, Stream); in WriteModuleInfo()
411 0/*TODO*/, Stream); in WriteModuleInfo()
423 0/*TODO*/, Stream); in WriteModuleInfo()
432 0/*TODO*/, Stream); in WriteModuleInfo()
462 SimpleGVarAbbrev = Stream.EmitAbbrev(Abbv); in WriteModuleInfo()
490 Stream.EmitRecord(bitc::MODULE_CODE_GLOBALVAR, Vals, AbbrevToUse); in WriteModuleInfo()
510 Stream.EmitRecord(bitc::MODULE_CODE_FUNCTION, Vals, AbbrevToUse); in WriteModuleInfo()
521 Stream.EmitRecord(bitc::MODULE_CODE_ALIAS_OLD, Vals, AbbrevToUse); in WriteModuleInfo()
544 BitstreamWriter &Stream, in WriteValueAsMetadata() argument
550 Stream.EmitRecord(METADATA_NODE_2_7, Record, 0); in WriteValueAsMetadata()
555 BitstreamWriter &Stream, in WriteMDTuple() argument
574 Stream.EmitRecord(METADATA_NODE_2_7, Record, Abbrev); in WriteMDTuple()
600 BitstreamWriter &Stream) { in WriteModuleMetadata() argument
606 Stream.EnterSubblock(bitc::METADATA_BLOCK_ID, 3); in WriteModuleMetadata()
615 MDSAbbrev = Stream.EmitAbbrev(Abbv); in WriteModuleMetadata()
632 MDLocationAbbrev = Stream.EmitAbbrev(Abbv); in WriteModuleMetadata()
642 NameAbbrev = Stream.EmitAbbrev(Abbv); in WriteModuleMetadata()
656 Write##CLASS(cast<CLASS>(N), VE, Stream, Record, CLASS##Abbrev); \ in WriteModuleMetadata()
662 WriteValueAsMetadata(MDC, VE, Stream, Record); in WriteModuleMetadata()
670 Stream.EmitRecord(bitc::METADATA_STRING_OLD, Record, MDSAbbrev); in WriteModuleMetadata()
679 Stream.EmitRecord(bitc::METADATA_NAME, Record, NameAbbrev); in WriteModuleMetadata()
685 Stream.EmitRecord(METADATA_NAMED_NODE_2_7, Record, 0); in WriteModuleMetadata()
689 Stream.ExitBlock(); in WriteModuleMetadata()
694 BitstreamWriter &Stream) { in WriteFunctionLocalMetadata() argument
702 Stream.EnterSubblock(bitc::METADATA_BLOCK_ID, 3); in WriteFunctionLocalMetadata()
705 WriteValueAsMetadata(MDs[i], VE, Stream, Record); in WriteFunctionLocalMetadata()
709 Stream.ExitBlock(); in WriteFunctionLocalMetadata()
714 BitstreamWriter &Stream) { in WriteMetadataAttachment() argument
715 Stream.EnterSubblock(bitc::METADATA_ATTACHMENT_ID, 3); in WriteMetadataAttachment()
738 Stream.EmitRecord(METADATA_ATTACHMENT_2_7, Record, 0); in WriteMetadataAttachment()
742 Stream.ExitBlock(); in WriteMetadataAttachment()
745 static void WriteModuleMetadataStore(const Module *M, BitstreamWriter &Stream) { in WriteModuleMetadataStore() argument
755 Stream.EnterSubblock(bitc::METADATA_BLOCK_ID, 3); in WriteModuleMetadataStore()
762 Stream.EmitRecord(bitc::METADATA_KIND, Record, 0); in WriteModuleMetadataStore()
766 Stream.ExitBlock(); in WriteModuleMetadataStore()
771 BitstreamWriter &Stream, bool isGlobal) { in WriteConstants() argument
774 Stream.EnterSubblock(bitc::CONSTANTS_BLOCK_ID, 4); in WriteConstants()
787 AggregateAbbrev = Stream.EmitAbbrev(Abbv); in WriteConstants()
794 String8Abbrev = Stream.EmitAbbrev(Abbv); in WriteConstants()
800 CString7Abbrev = Stream.EmitAbbrev(Abbv); in WriteConstants()
806 CString6Abbrev = Stream.EmitAbbrev(Abbv); in WriteConstants()
819 Stream.EmitRecord(bitc::CST_CODE_SETTYPE, Record, in WriteConstants()
839 Stream.EmitRecord(bitc::CST_CODE_INLINEASM, Record); in WriteConstants()
1020 Stream.EmitRecord(Code, Record, AbbrevToUse); in WriteConstants()
1024 Stream.ExitBlock(); in WriteConstants()
1028 BitstreamWriter &Stream) { in WriteModuleConstants() argument
1035 WriteConstants(i, Vals.size(), VE, Stream, true); in WriteModuleConstants()
1064 BitstreamWriter &Stream, in WriteInstruction() argument
1291 Stream.EmitRecord(Code, Vals, AbbrevToUse); in WriteInstruction()
1298 BitstreamWriter &Stream) { in WriteValueSymbolTable() argument
1300 Stream.EnterSubblock(bitc::VALUE_SYMTAB_BLOCK_ID, 4); in WriteValueSymbolTable()
1347 Stream.EmitRecord(Code, NameVals, AbbrevToUse); in WriteValueSymbolTable()
1350 Stream.ExitBlock(); in WriteValueSymbolTable()
1355 BitstreamWriter &Stream) { in WriteFunction() argument
1356 Stream.EnterSubblock(bitc::FUNCTION_BLOCK_ID, 4); in WriteFunction()
1364 Stream.EmitRecord(bitc::FUNC_CODE_DECLAREBLOCKS, Vals); in WriteFunction()
1370 WriteConstants(CstStart, CstEnd, VE, Stream, false); in WriteFunction()
1373 WriteFunctionLocalMetadata(F, VE, Stream); in WriteFunction()
1386 WriteInstruction(*I, InstID, VE, Stream, Vals); in WriteFunction()
1401 Stream.EmitRecord(bitc::FUNC_CODE_DEBUG_LOC_AGAIN, Vals); in WriteFunction()
1409 Stream.EmitRecord(FUNC_CODE_DEBUG_LOC_2_7, Vals); in WriteFunction()
1416 WriteValueSymbolTable(F.getValueSymbolTable(), VE, Stream); in WriteFunction()
1419 WriteMetadataAttachment(F, VE, Stream); in WriteFunction()
1421 Stream.ExitBlock(); in WriteFunction()
1426 BitstreamWriter &Stream) { in WriteBlockInfo() argument
1430 Stream.EnterBlockInfoBlock(2); in WriteBlockInfo()
1438 if (Stream.EmitBlockInfoAbbrev(bitc::VALUE_SYMTAB_BLOCK_ID, in WriteBlockInfo()
1449 if (Stream.EmitBlockInfoAbbrev(bitc::VALUE_SYMTAB_BLOCK_ID, in WriteBlockInfo()
1459 if (Stream.EmitBlockInfoAbbrev(bitc::VALUE_SYMTAB_BLOCK_ID, in WriteBlockInfo()
1469 if (Stream.EmitBlockInfoAbbrev(bitc::VALUE_SYMTAB_BLOCK_ID, in WriteBlockInfo()
1481 if (Stream.EmitBlockInfoAbbrev(bitc::CONSTANTS_BLOCK_ID, in WriteBlockInfo()
1490 if (Stream.EmitBlockInfoAbbrev(bitc::CONSTANTS_BLOCK_ID, in WriteBlockInfo()
1503 if (Stream.EmitBlockInfoAbbrev(bitc::CONSTANTS_BLOCK_ID, in WriteBlockInfo()
1510 if (Stream.EmitBlockInfoAbbrev(bitc::CONSTANTS_BLOCK_ID, in WriteBlockInfo()
1523 if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, in WriteBlockInfo()
1533 if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, in WriteBlockInfo()
1544 if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, in WriteBlockInfo()
1555 if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, in WriteBlockInfo()
1563 if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, in WriteBlockInfo()
1571 if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, in WriteBlockInfo()
1578 if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID, in WriteBlockInfo()
1583 Stream.ExitBlock(); in WriteBlockInfo()
1587 static void WriteModule(const Module *M, BitstreamWriter &Stream) { in WriteModule() argument
1588 Stream.EnterSubblock(bitc::MODULE_BLOCK_ID, 3); in WriteModule()
1594 Stream.EmitRecord(bitc::MODULE_CODE_VERSION, Vals); in WriteModule()
1601 WriteBlockInfo(VE, Stream); in WriteModule()
1604 WriteAttributeTable(VE, Stream); in WriteModule()
1607 WriteTypeTable(VE, Stream); in WriteModule()
1611 WriteModuleInfo(M, VE, Stream); in WriteModule()
1614 WriteModuleConstants(VE, Stream); in WriteModule()
1617 WriteModuleMetadata(M, VE, Stream); in WriteModule()
1622 WriteFunction(*F, VE, Stream); in WriteModule()
1625 WriteModuleMetadataStore(M, Stream); in WriteModule()
1628 WriteValueSymbolTable(M->getValueSymbolTable(), VE, Stream); in WriteModule()
1630 Stream.ExitBlock(); in WriteModule()
1720 BitstreamWriter Stream(Buffer); in WriteBitcodeToFile() local
1723 Stream.Emit((unsigned)'B', 8); in WriteBitcodeToFile()
1724 Stream.Emit((unsigned)'C', 8); in WriteBitcodeToFile()
1725 Stream.Emit(0x0, 4); in WriteBitcodeToFile()
1726 Stream.Emit(0xC, 4); in WriteBitcodeToFile()
1727 Stream.Emit(0xE, 4); in WriteBitcodeToFile()
1728 Stream.Emit(0xD, 4); in WriteBitcodeToFile()
1731 WriteModule(M, Stream); in WriteBitcodeToFile()