diff options
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 34 | ||||
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 15 |
2 files changed, 0 insertions, 49 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index e85cf4d8ebd..210ffd8d912 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -4484,40 +4484,6 @@ std::error_code BitcodeReader::parseFunctionBody(Function *F) { InstructionList.push_back(I); break; } - case bitc::FUNC_CODE_INST_TERMINATEPAD: { // TERMINATEPAD: [tok,bb#,num,(ty,val)*] - // We must have, at minimum, the outer scope and the number of arguments. - if (Record.size() < 2) - return error("Invalid record"); - - unsigned Idx = 0; - - Value *ParentPad = - getValue(Record, Idx++, NextValueNo, Type::getTokenTy(Context)); - - unsigned NumArgOperands = Record[Idx++]; - - SmallVector<Value *, 2> Args; - for (unsigned Op = 0; Op != NumArgOperands; ++Op) { - Value *Val; - if (getValueTypePair(Record, Idx, NextValueNo, Val)) - return error("Invalid record"); - Args.push_back(Val); - } - - BasicBlock *UnwindDest = nullptr; - if (Idx + 1 == Record.size()) { - UnwindDest = getBasicBlock(Record[Idx++]); - if (!UnwindDest) - return error("Invalid record"); - } - - if (Record.size() != Idx) - return error("Invalid record"); - - I = TerminatePadInst::Create(ParentPad, UnwindDest, Args); - InstructionList.push_back(I); - break; - } case bitc::FUNC_CODE_INST_CATCHPAD: case bitc::FUNC_CODE_INST_CLEANUPPAD: { // [tok,num,(ty,val)*] // We must have, at minimum, the outer scope and the number of arguments. diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index bc6f0edafac..dd4a16d985f 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -2025,21 +2025,6 @@ static void WriteInstruction(const Instruction &I, unsigned InstID, Vals.push_back(VE.getValueID(CatchSwitch.getUnwindDest())); break; } - case Instruction::TerminatePad: { - Code = bitc::FUNC_CODE_INST_TERMINATEPAD; - const auto &TPI = cast<TerminatePadInst>(I); - - pushValue(TPI.getParentPad(), InstID, Vals, VE); - - unsigned NumArgOperands = TPI.getNumArgOperands(); - Vals.push_back(NumArgOperands); - for (unsigned Op = 0; Op != NumArgOperands; ++Op) - PushValueAndType(TPI.getArgOperand(Op), InstID, Vals, VE); - - if (TPI.hasUnwindDest()) - Vals.push_back(VE.getValueID(TPI.getUnwindDest())); - break; - } case Instruction::Unreachable: Code = bitc::FUNC_CODE_INST_UNREACHABLE; AbbrevToUse = FUNCTION_INST_UNREACHABLE_ABBREV; |