summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-12-14 18:34:23 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-12-14 18:34:23 +0000
commitbbfc7219ef121d345784b0c080a268beb051c736 (patch)
treedf2b7b2e6f57615a58d0d86aef7fa03081649176 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parentfeeefb214dfa398df4cec92b1e9f3e3219d3944f (diff)
downloadbcm5719-llvm-bbfc7219ef121d345784b0c080a268beb051c736.tar.gz
bcm5719-llvm-bbfc7219ef121d345784b0c080a268beb051c736.zip
[IR] Remove terminatepad
It turns out that terminatepad gives little benefit over a cleanuppad which calls the termination function. This is not sufficient to implement fully generic filters but MSVC doesn't support them which makes terminatepad a little over-designed. Depends on D15478. Differential Revision: http://reviews.llvm.org/D15479 llvm-svn: 255522
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp34
1 files changed, 0 insertions, 34 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.
OpenPOWER on IntegriCloud