diff options
author | David Majnemer <david.majnemer@gmail.com> | 2015-12-14 18:34:23 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2015-12-14 18:34:23 +0000 |
commit | bbfc7219ef121d345784b0c080a268beb051c736 (patch) | |
tree | df2b7b2e6f57615a58d0d86aef7fa03081649176 /llvm/lib/AsmParser/LLParser.cpp | |
parent | feeefb214dfa398df4cec92b1e9f3e3219d3944f (diff) | |
download | bcm5719-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/AsmParser/LLParser.cpp')
-rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index 2e411733e27..3d43f81f49a 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -4723,7 +4723,6 @@ int LLParser::ParseInstruction(Instruction *&Inst, BasicBlock *BB, case lltok::kw_catchret: return ParseCatchRet(Inst, PFS); case lltok::kw_catchswitch: return ParseCatchSwitch(Inst, PFS); case lltok::kw_catchpad: return ParseCatchPad(Inst, PFS); - case lltok::kw_terminatepad:return ParseTerminatePad(Inst, PFS); case lltok::kw_cleanuppad: return ParseCleanupPad(Inst, PFS); // Binary Operators. case lltok::kw_add: @@ -5285,43 +5284,6 @@ bool LLParser::ParseCatchPad(Instruction *&Inst, PerFunctionState &PFS) { return false; } -/// ParseTerminatePad -/// ::= 'terminatepad' within Parent ParamList 'to' TypeAndValue -bool LLParser::ParseTerminatePad(Instruction *&Inst, PerFunctionState &PFS) { - Value *ParentPad = nullptr; - - if (ParseToken(lltok::kw_within, "expected 'within' after terminatepad")) - return true; - - if (Lex.getKind() != lltok::kw_none && Lex.getKind() != lltok::LocalVar && - Lex.getKind() != lltok::LocalVarID) - return TokError("expected scope value for terminatepad"); - - if (ParseValue(Type::getTokenTy(Context), ParentPad, PFS)) - return true; - - SmallVector<Value *, 8> Args; - if (ParseExceptionArgs(Args, PFS)) - return true; - - if (ParseToken(lltok::kw_unwind, "expected 'unwind' in terminatepad")) - return true; - - BasicBlock *UnwindBB = nullptr; - if (Lex.getKind() == lltok::kw_to) { - Lex.Lex(); - if (ParseToken(lltok::kw_caller, "expected 'caller' in terminatepad")) - return true; - } else { - if (ParseTypeAndBasicBlock(UnwindBB, PFS)) { - return true; - } - } - - Inst = TerminatePadInst::Create(ParentPad, UnwindBB, Args); - return false; -} - /// ParseCleanupPad /// ::= 'cleanuppad' within Parent ParamList bool LLParser::ParseCleanupPad(Instruction *&Inst, PerFunctionState &PFS) { |