Index: docs/BitCodeFormat.rst =================================================================== --- docs/BitCodeFormat.rst +++ docs/BitCodeFormat.rst @@ -741,7 +741,7 @@ MODULE_CODE_FUNCTION Record ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -``[FUNCTION, type, callingconv, isproto, linkage, paramattr, alignment, section, visibility, gc, prologuedata, dllstorageclass, comdat, prefixdata]`` +``[FUNCTION, type, callingconv, isproto, linkage, paramattr, alignment, section, visibility, gc, prologuedata, dllstorageclass, comdat, prefixdata, personalityfn]`` The ``FUNCTION`` record (code 8) marks the declaration or definition of a function. The operand fields are: @@ -795,6 +795,8 @@ * *prefixdata*: If non-zero, the value index of the prefix data for this function, plus 1. +* *personalityfn*: If non-zero, the value index of the personality function for this function, + plus 1. MODULE_CODE_ALIAS Record ^^^^^^^^^^^^^^^^^^^^^^^^ Index: docs/LangRef.rst =================================================================== --- docs/LangRef.rst +++ docs/LangRef.rst @@ -635,8 +635,9 @@ an optional section, an optional alignment, an optional :ref:`comdat <langref_comdats>`, an optional :ref:`garbage collector name <gc>`, an optional :ref:`prefix <prefixdata>`, -an optional :ref:`prologue <prologuedata>`, an opening -curly brace, a list of basic blocks, and a closing curly brace. +an optional :ref:`prologue <prologuedata>`, +an optional :ref:`personality <personalityfn>`, +an opening curly brace, a list of basic blocks, and a closing curly brace. LLVM function declarations consist of the "``declare``" keyword, an optional :ref:`linkage type <linkage>`, an optional :ref:`visibility @@ -646,7 +647,8 @@ :ref:`parameter attribute <paramattrs>` for the return type, a function name, a possibly empty list of arguments, an optional alignment, an optional :ref:`garbage collector name <gc>`, an optional :ref:`prefix <prefixdata>`, -and an optional :ref:`prologue <prologuedata>`. +an optional :ref:`prologue <prologuedata>`, +and an optional :ref:`personality <personalityfn>`. A function definition contains a list of basic blocks, forming the CFG (Control Flow Graph) for the function. Each basic block may optionally start with a label @@ -683,7 +685,8 @@ [cconv] [ret attrs] <ResultType> @<FunctionName> ([argument list]) [unnamed_addr] [fn Attrs] [section "name"] [comdat [($name)]] - [align N] [gc] [prefix Constant] [prologue Constant] { ... } + [align N] [gc] [prefix Constant] [prologue Constant] + [personality Constant] { ... } The argument list is a comma seperated sequence of arguments where each argument is of the following form @@ -1130,6 +1133,14 @@ to the ``available_externally`` linkage in that the data may be used by the optimizers but will not be emitted in the object file. +.. _personalityfn: + +Personality Function +------------- + +The ``personality`` attribute permits functions to specify what function +to use for exception handling. + .. _attrgrp: Attribute Groups @@ -7274,8 +7285,8 @@ :: - <resultval> = landingpad <resultty> personality <type> <pers_fn> <clause>+ - <resultval> = landingpad <resultty> personality <type> <pers_fn> cleanup <clause>* + <resultval> = landingpad <resultty> <clause>+ + <resultval> = landingpad <resultty> cleanup <clause>* <clause> := catch <type> <value> <clause> := filter <array constant type> <array constant> @@ -7287,14 +7298,13 @@ system <ExceptionHandling.html#overview>`_ to specify that a basic block is a landing pad --- one where the exception lands, and corresponds to the code found in the ``catch`` portion of a ``try``/``catch`` sequence. It -defines values supplied by the personality function (``pers_fn``) upon +defines values supplied by the personality function upon re-entry to the function. The ``resultval`` has the type ``resultty``. Arguments: """""""""" -This instruction takes a ``pers_fn`` value. This is the personality -function associated with the unwinding mechanism. The optional +The optional ``cleanup`` flag indicates that the landing pad block is a cleanup. A ``clause`` begins with the clause type --- ``catch`` or ``filter`` --- and Index: include/llvm/Analysis/LibCallSemantics.h =================================================================== --- include/llvm/Analysis/LibCallSemantics.h +++ include/llvm/Analysis/LibCallSemantics.h @@ -207,7 +207,7 @@ llvm_unreachable("invalid enum"); } - bool canSimplifyInvokeNoUnwind(const InvokeInst *II); + bool canSimplifyInvokeNoUnwind(const Function *F); } // end namespace llvm Index: include/llvm/Bitcode/LLVMBitCodes.h =================================================================== --- include/llvm/Bitcode/LLVMBitCodes.h +++ include/llvm/Bitcode/LLVMBitCodes.h @@ -342,7 +342,7 @@ // align, vol, // ordering, synchscope] FUNC_CODE_INST_RESUME = 39, // RESUME: [opval] - FUNC_CODE_INST_LANDINGPAD = 40, // LANDINGPAD: [ty,val,val,num,id0,val0...] + FUNC_CODE_INST_LANDINGPAD_OLD = 40, // LANDINGPAD: [ty,val,val,num,id0,val0...] FUNC_CODE_INST_LOADATOMIC = 41, // LOAD: [opty, op, align, vol, // ordering, synchscope] FUNC_CODE_INST_STOREATOMIC_OLD = 42, // STORE: [ptrty,ptr,val, align, vol @@ -352,6 +352,7 @@ FUNC_CODE_INST_STOREATOMIC = 45, // STORE: [ptrty,ptr,val, align, vol FUNC_CODE_INST_CMPXCHG = 46, // CMPXCHG: [ptrty,ptr,valty,cmp,new, align, // vol,ordering,synchscope] + FUNC_CODE_INST_LANDINGPAD = 47, // LANDINGPAD: [ty,val,num,id0,val0...] }; enum UseListCodes { Index: include/llvm/IR/Function.h =================================================================== --- include/llvm/IR/Function.h +++ include/llvm/IR/Function.h @@ -25,6 +25,7 @@ #include "llvm/IR/BasicBlock.h" #include "llvm/IR/CallingConv.h" #include "llvm/IR/GlobalObject.h" +#include "llvm/IR/OperandTraits.h" #include "llvm/Support/Compiler.h" namespace llvm { @@ -119,11 +120,22 @@ public: static Function *Create(FunctionType *Ty, LinkageTypes Linkage, const Twine &N = "", Module *M = nullptr) { - return new(0) Function(Ty, Linkage, N, M); + return new(1) Function(Ty, Linkage, N, M); } ~Function() override; + /// \brief Provide fast operand accessors + DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); + + /// \brief Get the personality function associated with this function. + bool hasPersonalityFn() const { return getNumOperands() != 0; } + Constant *getPersonalityFn() const { + assert(hasPersonalityFn()); + return cast<Constant>(Op<0>()); + } + void setPersonalityFn(Constant *C); + Type *getReturnType() const; // Return the type of the ret val FunctionType *getFunctionType() const; // Return the FunctionType for me @@ -601,6 +613,11 @@ return F ? &F->getValueSymbolTable() : nullptr; } +template <> +struct OperandTraits<Function> : public OptionalOperandTraits<Function> {}; + +DEFINE_TRANSPARENT_OPERAND_ACCESSORS(Function, Value) + } // End llvm namespace #endif Index: include/llvm/IR/IRBuilder.h =================================================================== --- include/llvm/IR/IRBuilder.h +++ include/llvm/IR/IRBuilder.h @@ -1556,9 +1556,9 @@ return Insert(InsertValueInst::Create(Agg, Val, Idxs), Name); } - LandingPadInst *CreateLandingPad(Type *Ty, Value *PersFn, unsigned NumClauses, + LandingPadInst *CreateLandingPad(Type *Ty, unsigned NumClauses, const Twine &Name = "") { - return Insert(LandingPadInst::Create(Ty, PersFn, NumClauses), Name); + return Insert(LandingPadInst::Create(Ty, NumClauses), Name); } //===--------------------------------------------------------------------===// Index: include/llvm/IR/Instructions.h =================================================================== --- include/llvm/IR/Instructions.h +++ include/llvm/IR/Instructions.h @@ -2437,34 +2437,27 @@ return User::operator new(s); } void growOperands(unsigned Size); - void init(Value *PersFn, unsigned NumReservedValues, const Twine &NameStr); + void init(unsigned NumReservedValues, const Twine &NameStr); + + explicit LandingPadInst(Type *RetTy, unsigned NumReservedValues, + const Twine &NameStr, Instruction *InsertBefore); + explicit LandingPadInst(Type *RetTy, unsigned NumReservedValues, + const Twine &NameStr, BasicBlock *InsertAtEnd); - explicit LandingPadInst(Type *RetTy, Value *PersonalityFn, - unsigned NumReservedValues, const Twine &NameStr, - Instruction *InsertBefore); - explicit LandingPadInst(Type *RetTy, Value *PersonalityFn, - unsigned NumReservedValues, const Twine &NameStr, - BasicBlock *InsertAtEnd); protected: LandingPadInst *clone_impl() const override; public: /// Constructors - NumReservedClauses is a hint for the number of incoming /// clauses that this landingpad will have (use 0 if you really have no idea). - static LandingPadInst *Create(Type *RetTy, Value *PersonalityFn, - unsigned NumReservedClauses, + static LandingPadInst *Create(Type *RetTy, unsigned NumReservedClauses, const Twine &NameStr = "", Instruction *InsertBefore = nullptr); - static LandingPadInst *Create(Type *RetTy, Value *PersonalityFn, - unsigned NumReservedClauses, + static LandingPadInst *Create(Type *RetTy, unsigned NumReservedClauses, const Twine &NameStr, BasicBlock *InsertAtEnd); /// Provide fast operand accessors DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - /// getPersonalityFn - Get the personality function associated with this - /// landing pad. - Value *getPersonalityFn() const { return getOperand(0); } - /// isCleanup - Return 'true' if this landingpad instruction is a /// cleanup. I.e., it should be run when unwinding even if its landing pad /// doesn't catch the exception. @@ -2482,21 +2475,21 @@ /// Get the value of the clause at index Idx. Use isCatch/isFilter to /// determine what type of clause this is. Constant *getClause(unsigned Idx) const { - return cast<Constant>(getOperandList()[Idx + 1]); + return cast<Constant>(getOperandList()[Idx]); } /// isCatch - Return 'true' if the clause and index Idx is a catch clause. bool isCatch(unsigned Idx) const { - return !isa<ArrayType>(getOperandList()[Idx + 1]->getType()); + return !isa<ArrayType>(getOperandList()[Idx]->getType()); } /// isFilter - Return 'true' if the clause and index Idx is a filter clause. bool isFilter(unsigned Idx) const { - return isa<ArrayType>(getOperandList()[Idx + 1]->getType()); + return isa<ArrayType>(getOperandList()[Idx]->getType()); } /// getNumClauses - Get the number of clauses for this landing pad. - unsigned getNumClauses() const { return getNumOperands() - 1; } + unsigned getNumClauses() const { return getNumOperands(); } /// reserveClauses - Grow the size of the operand list to accommodate the new /// number of clauses. @@ -2512,7 +2505,7 @@ }; template <> -struct OperandTraits<LandingPadInst> : public HungoffOperandTraits<2> { +struct OperandTraits<LandingPadInst> : public HungoffOperandTraits<1> { }; DEFINE_TRANSPARENT_OPERAND_ACCESSORS(LandingPadInst, Value) Index: include/llvm/IR/User.h =================================================================== --- include/llvm/IR/User.h +++ include/llvm/IR/User.h @@ -149,6 +149,19 @@ NumUserOperands = NumOps; } + /// Set the number of operands on a Function. + /// + /// Function always allocates space for a single operands, but + /// doesn't always use it. + /// + /// FIXME: As that the number of operands is used to find the start of + /// the allocated memory in operator delete, we need to always think we have + /// 1 operand before delete. + void setFunctionNumOperands(unsigned NumOps) { + assert(NumOps <= 1 && "Function can only have 0 or 1 operands"); + NumUserOperands = NumOps; + } + /// \brief Subclasses with hung off uses need to manage the operand count /// themselves. In these instances, the operand count isn't used to find the /// OperandList, so there's no issue in having the operand count change. Index: lib/Analysis/LibCallSemantics.cpp =================================================================== --- lib/Analysis/LibCallSemantics.cpp +++ lib/Analysis/LibCallSemantics.cpp @@ -80,9 +80,8 @@ .Default(EHPersonality::Unknown); } -bool llvm::canSimplifyInvokeNoUnwind(const InvokeInst *II) { - const LandingPadInst *LP = II->getLandingPadInst(); - EHPersonality Personality = classifyEHPersonality(LP->getPersonalityFn()); +bool llvm::canSimplifyInvokeNoUnwind(const Function *F) { + EHPersonality Personality = classifyEHPersonality(F->getPersonalityFn()); // We can't simplify any invokes to nounwind functions if the personality // function wants to catch asynch exceptions. The nounwind attribute only // implies that the function does not throw synchronous exceptions. Index: lib/AsmParser/LLParser.cpp =================================================================== --- lib/AsmParser/LLParser.cpp +++ lib/AsmParser/LLParser.cpp @@ -4051,7 +4051,7 @@ /// FunctionHeader /// ::= OptionalLinkage OptionalVisibility OptionalCallingConv OptRetAttrs /// OptUnnamedAddr Type GlobalName '(' ArgList ')' OptFuncAttrs OptSection -/// OptionalAlign OptGC OptionalPrefix OptionalPrologue +/// OptionalAlign OptGC OptionalPrefix OptionalPrologue OptPersonalityFn bool LLParser::ParseFunctionHeader(Function *&Fn, bool isDefine) { // Parse the linkage. LocTy LinkageLoc = Lex.getLoc(); @@ -4133,6 +4133,7 @@ LocTy UnnamedAddrLoc; Constant *Prefix = nullptr; Constant *Prologue = nullptr; + Constant *PersonalityFn = nullptr; Comdat *C; if (ParseArgumentList(ArgList, isVarArg) || @@ -4149,7 +4150,9 @@ (EatIfPresent(lltok::kw_prefix) && ParseGlobalTypeAndValue(Prefix)) || (EatIfPresent(lltok::kw_prologue) && - ParseGlobalTypeAndValue(Prologue))) + ParseGlobalTypeAndValue(Prologue)) || + (EatIfPresent(lltok::kw_personality) && + ParseGlobalTypeAndValue(PersonalityFn))) return true; if (FuncAttrs.contains(Attribute::Builtin)) @@ -4248,6 +4251,7 @@ Fn->setAlignment(Alignment); Fn->setSection(Section); Fn->setComdat(C); + Fn->setPersonalityFn(PersonalityFn); if (!GC.empty()) Fn->setGC(GC.c_str()); Fn->setPrefixData(Prefix); Fn->setPrologueData(Prologue); @@ -5099,14 +5103,11 @@ /// ::= 'filter' TypeAndValue ( ',' TypeAndValue )* bool LLParser::ParseLandingPad(Instruction *&Inst, PerFunctionState &PFS) { Type *Ty = nullptr; LocTy TyLoc; - Value *PersFn; LocTy PersFnLoc; - if (ParseType(Ty, TyLoc) || - ParseToken(lltok::kw_personality, "expected 'personality'") || - ParseTypeAndValue(PersFn, PersFnLoc, PFS)) + if (ParseType(Ty, TyLoc)) return true; - std::unique_ptr<LandingPadInst> LP(LandingPadInst::Create(Ty, PersFn, 0)); + std::unique_ptr<LandingPadInst> LP(LandingPadInst::Create(Ty, 0)); LP->setCleanup(EatIfPresent(lltok::kw_cleanup)); while (Lex.getKind() == lltok::kw_catch || Lex.getKind() == lltok::kw_filter){ Index: lib/Bitcode/Reader/BitcodeReader.cpp =================================================================== --- lib/Bitcode/Reader/BitcodeReader.cpp +++ lib/Bitcode/Reader/BitcodeReader.cpp @@ -150,6 +150,7 @@ std::vector<std::pair<GlobalAlias*, unsigned> > AliasInits; std::vector<std::pair<Function*, unsigned> > FunctionPrefixes; std::vector<std::pair<Function*, unsigned> > FunctionPrologues; + std::vector<std::pair<Function*, unsigned> > FunctionPersonalityFns; SmallVector<Instruction*, 64> InstsWithTBAATag; @@ -2040,11 +2041,13 @@ std::vector<std::pair<GlobalAlias*, unsigned> > AliasInitWorklist; std::vector<std::pair<Function*, unsigned> > FunctionPrefixWorklist; std::vector<std::pair<Function*, unsigned> > FunctionPrologueWorklist; + std::vector<std::pair<Function*, unsigned> > FunctionPersonalityFnWorklist; GlobalInitWorklist.swap(GlobalInits); AliasInitWorklist.swap(AliasInits); FunctionPrefixWorklist.swap(FunctionPrefixes); FunctionPrologueWorklist.swap(FunctionPrologues); + FunctionPersonalityFnWorklist.swap(FunctionPersonalityFns); while (!GlobalInitWorklist.empty()) { unsigned ValID = GlobalInitWorklist.back().second; @@ -2102,6 +2105,19 @@ FunctionPrologueWorklist.pop_back(); } + while (!FunctionPersonalityFnWorklist.empty()) { + unsigned ValID = FunctionPersonalityFnWorklist.back().second; + if (ValID >= ValueList.size()) { + FunctionPersonalityFns.push_back(FunctionPersonalityFnWorklist.back()); + } else { + if (Constant *C = dyn_cast_or_null<Constant>(ValueList[ValID])) + FunctionPersonalityFnWorklist.back().first->setPersonalityFn(C); + else + return Error("Expected a constant"); + } + FunctionPersonalityFnWorklist.pop_back(); + } + return std::error_code(); } @@ -3033,6 +3049,9 @@ if (Record.size() > 13 && Record[13] != 0) FunctionPrefixes.push_back(std::make_pair(Func, Record[13]-1)); + if (Record.size() > 14 && Record[14] != 0) + FunctionPersonalityFns.push_back(std::make_pair(Func, Record[14] - 1)); + ValueList.push_back(Func); // If this is a function with a body, remember the prototype we are @@ -4021,21 +4040,32 @@ break; } - case bitc::FUNC_CODE_INST_LANDINGPAD: { + case bitc::FUNC_CODE_INST_LANDINGPAD: + case bitc::FUNC_CODE_INST_LANDINGPAD_OLD: { // LANDINGPAD: [ty, val, val, num, (id0,val0 ...)?] unsigned Idx = 0; - if (Record.size() < 4) - return Error("Invalid record"); + if (BitCode == bitc::FUNC_CODE_INST_LANDINGPAD) { + if (Record.size() < 3) + return Error("Invalid record"); + } else { + assert(BitCode == bitc::FUNC_CODE_INST_LANDINGPAD_OLD); + if (Record.size() < 4) + return Error("Invalid record"); + } Type *Ty = getTypeByID(Record[Idx++]); if (!Ty) return Error("Invalid record"); - Value *PersFn = nullptr; - if (getValueTypePair(Record, Idx, NextValueNo, PersFn)) - return Error("Invalid record"); + if (BitCode == bitc::FUNC_CODE_INST_LANDINGPAD_OLD) { + Value *PersFn = nullptr; + if (getValueTypePair(Record, Idx, NextValueNo, PersFn)) + return Error("Invalid record"); + + F->setPersonalityFn(cast<Constant>(PersFn)); + } bool IsCleanup = !!Record[Idx++]; unsigned NumClauses = Record[Idx++]; - LandingPadInst *LP = LandingPadInst::Create(Ty, PersFn, NumClauses); + LandingPadInst *LP = LandingPadInst::Create(Ty, NumClauses); LP->setCleanup(IsCleanup); for (unsigned J = 0; J != NumClauses; ++J) { LandingPadInst::ClauseType CT = Index: lib/Bitcode/Writer/BitcodeWriter.cpp =================================================================== --- lib/Bitcode/Writer/BitcodeWriter.cpp +++ lib/Bitcode/Writer/BitcodeWriter.cpp @@ -693,7 +693,7 @@ for (const Function &F : *M) { // FUNCTION: [type, callingconv, isproto, linkage, paramattrs, alignment, // section, visibility, gc, unnamed_addr, prologuedata, - // dllstorageclass, comdat, prefixdata] + // dllstorageclass, comdat, prefixdata, personalityfn] Vals.push_back(VE.getTypeID(F.getFunctionType())); Vals.push_back(F.getCallingConv()); Vals.push_back(F.isDeclaration()); @@ -710,6 +710,8 @@ Vals.push_back(F.hasComdat() ? VE.getComdatID(F.getComdat()) : 0); Vals.push_back(F.hasPrefixData() ? (VE.getValueID(F.getPrefixData()) + 1) : 0); + Vals.push_back( + F.hasPersonalityFn() ? (VE.getValueID(F.getPersonalityFn()) + 1) : 0); unsigned AbbrevToUse = 0; Stream.EmitRecord(bitc::MODULE_CODE_FUNCTION, Vals, AbbrevToUse); @@ -1857,7 +1859,6 @@ const LandingPadInst &LP = cast<LandingPadInst>(I); Code = bitc::FUNC_CODE_INST_LANDINGPAD; Vals.push_back(VE.getTypeID(LP.getType())); - PushValueAndType(LP.getPersonalityFn(), InstID, Vals, VE); Vals.push_back(LP.isCleanup()); Vals.push_back(LP.getNumClauses()); for (unsigned I = 0, E = LP.getNumClauses(); I != E; ++I) { Index: lib/Bitcode/Writer/ValueEnumerator.cpp =================================================================== --- lib/Bitcode/Writer/ValueEnumerator.cpp +++ lib/Bitcode/Writer/ValueEnumerator.cpp @@ -93,6 +93,9 @@ if (F.hasPrologueData()) if (!isa<GlobalValue>(F.getPrologueData())) orderValue(F.getPrologueData(), OM); + if (F.hasPersonalityFn()) + if (!isa<GlobalValue>(F.getPersonalityFn())) + orderValue(F.getPersonalityFn(), OM); } OM.LastGlobalConstantID = OM.size(); @@ -274,6 +277,8 @@ predictValueUseListOrder(F.getPrefixData(), nullptr, OM, Stack); if (F.hasPrologueData()) predictValueUseListOrder(F.getPrologueData(), nullptr, OM, Stack); + if (F.hasPersonalityFn()) + predictValueUseListOrder(F.getPersonalityFn(), nullptr, OM, Stack); } return Stack; @@ -326,6 +331,11 @@ if (F.hasPrologueData()) EnumerateValue(F.getPrologueData()); + // Enumerate the personality functions. + for (Module::const_iterator I = M.begin(), E = M.end(); I != E; ++I) + if (I->hasPersonalityFn()) + EnumerateValue(I->getPersonalityFn()); + // Enumerate the metadata type. // // TODO: Move this to ValueEnumerator::EnumerateOperandType() once bitcode Index: lib/CodeGen/AsmPrinter/AsmPrinter.cpp =================================================================== --- lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -547,6 +547,10 @@ if (F->hasPrefixData()) EmitGlobalConstant(F->getPrefixData()); + // Emit the personality function. + if (F->hasPersonalityFn()) + EmitGlobalConstant(F->getPersonalityFn()); + // Emit the CurrentFnSym. This is a virtual function to allow targets to // do their wild and crazy things as required. EmitFunctionEntryLabel(); Index: lib/CodeGen/DwarfEHPrepare.cpp =================================================================== --- lib/CodeGen/DwarfEHPrepare.cpp +++ lib/CodeGen/DwarfEHPrepare.cpp @@ -181,27 +181,22 @@ bool DwarfEHPrepare::InsertUnwindResumeCalls(Function &Fn) { SmallVector<ResumeInst*, 16> Resumes; SmallVector<LandingPadInst*, 16> CleanupLPads; - bool FoundLP = false; for (BasicBlock &BB : Fn) { if (auto *RI = dyn_cast<ResumeInst>(BB.getTerminator())) Resumes.push_back(RI); - if (auto *LP = BB.getLandingPadInst()) { + if (auto *LP = BB.getLandingPadInst()) if (LP->isCleanup()) CleanupLPads.push_back(LP); - // Check the personality on the first landingpad. Don't do anything if - // it's for MSVC. - if (!FoundLP) { - FoundLP = true; - EHPersonality Pers = classifyEHPersonality(LP->getPersonalityFn()); - if (isMSVCEHPersonality(Pers)) - return false; - } - } } if (Resumes.empty()) return false; + // Check the personality, don't do anything if it's for MSVC. + EHPersonality Pers = classifyEHPersonality(Fn.getPersonalityFn()); + if (isMSVCEHPersonality(Pers)) + return false; + LLVMContext &Ctx = Fn.getContext(); size_t ResumesLeft = pruneUnreachableResumes(Fn, Resumes, CleanupLPads); Index: lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp =================================================================== --- lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp +++ lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp @@ -259,8 +259,8 @@ // If this is an MSVC EH personality, we need to do a bit more work. EHPersonality Personality = EHPersonality::Unknown; - if (!LPads.empty()) - Personality = classifyEHPersonality(LPads.back()->getPersonalityFn()); + if (Fn->hasPersonalityFn()) + Personality = classifyEHPersonality(Fn->getPersonalityFn()); if (!isMSVCEHPersonality(Personality)) return; @@ -546,8 +546,10 @@ /// landingpad instruction and add them to the specified machine module info. void llvm::AddLandingPadInfo(const LandingPadInst &I, MachineModuleInfo &MMI, MachineBasicBlock *MBB) { - MMI.addPersonality(MBB, - cast<Function>(I.getPersonalityFn()->stripPointerCasts())); + MMI.addPersonality( + MBB, + cast<Function>( + I.getParent()->getParent()->getPersonalityFn()->stripPointerCasts())); if (I.isCleanup()) MMI.addCleanup(MBB); Index: lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp =================================================================== --- lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -938,8 +938,10 @@ // pad into several BBs. const BasicBlock *LLVMBB = MBB->getBasicBlock(); const LandingPadInst *LPadInst = LLVMBB->getLandingPadInst(); - MF->getMMI().addPersonality( - MBB, cast<Function>(LPadInst->getPersonalityFn()->stripPointerCasts())); + MF->getMMI().addPersonality(MBB, cast<Function>(LPadInst->getParent() + ->getParent() + ->getPersonalityFn() + ->stripPointerCasts())); EHPersonality Personality = MF->getMMI().getPersonalityType(); if (isMSVCEHPersonality(Personality)) { Index: lib/CodeGen/ShadowStackGCLowering.cpp =================================================================== --- lib/CodeGen/ShadowStackGCLowering.cpp +++ lib/CodeGen/ShadowStackGCLowering.cpp @@ -144,10 +144,14 @@ BasicBlock *CleanupBB = BasicBlock::Create(C, CleanupBBName, &F); Type *ExnTy = StructType::get(Type::getInt8PtrTy(C), Type::getInt32Ty(C), nullptr); - Constant *PersFn = F.getParent()->getOrInsertFunction( - "__gcc_personality_v0", FunctionType::get(Type::getInt32Ty(C), true)); + if (!F.hasPersonalityFn()) { + Constant *PersFn = F.getParent()->getOrInsertFunction( + "__gcc_personality_v0", + FunctionType::get(Type::getInt32Ty(C), true)); + F.setPersonalityFn(PersFn); + } LandingPadInst *LPad = - LandingPadInst::Create(ExnTy, PersFn, 1, "cleanup.lpad", CleanupBB); + LandingPadInst::Create(ExnTy, 1, "cleanup.lpad", CleanupBB); LPad->setCleanup(true); ResumeInst *RI = ResumeInst::Create(LPad, CleanupBB); Index: lib/CodeGen/SjLjEHPrepare.cpp =================================================================== --- lib/CodeGen/SjLjEHPrepare.cpp +++ lib/CodeGen/SjLjEHPrepare.cpp @@ -227,7 +227,7 @@ // Personality function IRBuilder<> Builder(EntryBB->getTerminator()); if (!PersonalityFn) - PersonalityFn = LPads[0]->getPersonalityFn(); + PersonalityFn = F.getPersonalityFn(); Value *PersonalityFieldPtr = Builder.CreateConstGEP2_32( FunctionContextTy, FuncCtx, 0, 3, "pers_fn_gep"); Builder.CreateStore( Index: lib/CodeGen/WinEHPrepare.cpp =================================================================== --- lib/CodeGen/WinEHPrepare.cpp +++ lib/CodeGen/WinEHPrepare.cpp @@ -111,7 +111,7 @@ bool outlineHandler(ActionHandler *Action, Function *SrcFn, LandingPadInst *LPad, BasicBlock *StartBB, FrameVarInfoMap &VarInfo); - void addStubInvokeToHandlerIfNeeded(Function *Handler, Value *PersonalityFn); + void addStubInvokeToHandlerIfNeeded(Function *Handler); void mapLandingPadBlocks(LandingPadInst *LPad, LandingPadActions &Actions); CatchHandler *findCatchHandler(BasicBlock *BB, BasicBlock *&NextBB, @@ -379,7 +379,7 @@ return false; // Classify the personality to see what kind of preparation we need. - Personality = classifyEHPersonality(LPads.back()->getPersonalityFn()); + Personality = classifyEHPersonality(Fn.getPersonalityFn()); // Do nothing if this is not an MSVC personality. if (!isMSVCEHPersonality(Personality)) @@ -1265,8 +1265,7 @@ return false; } -static BasicBlock *createStubLandingPad(Function *Handler, - Value *PersonalityFn) { +static BasicBlock *createStubLandingPad(Function *Handler) { // FIXME: Finish this! LLVMContext &Context = Handler->getContext(); BasicBlock *StubBB = BasicBlock::Create(Context, "stub"); @@ -1275,7 +1274,7 @@ LandingPadInst *LPad = Builder.CreateLandingPad( llvm::StructType::get(Type::getInt8PtrTy(Context), Type::getInt32Ty(Context), nullptr), - PersonalityFn, 0); + 0); // Insert a call to llvm.eh.actions so that we don't try to outline this lpad. Function *ActionIntrin = Intrinsic::getDeclaration(Handler->getParent(), Intrinsic::eh_actions); @@ -1290,8 +1289,7 @@ // landing pad if none is found. The code that generates the .xdata tables for // the handler needs at least one landing pad to identify the parent function's // personality. -void WinEHPrepare::addStubInvokeToHandlerIfNeeded(Function *Handler, - Value *PersonalityFn) { +void WinEHPrepare::addStubInvokeToHandlerIfNeeded(Function *Handler) { ReturnInst *Ret = nullptr; UnreachableInst *Unreached = nullptr; for (BasicBlock &BB : *Handler) { @@ -1323,7 +1321,7 @@ // parent block. We want to replace that with an invoke call, so we can // erase it now. OldRetBB->getTerminator()->eraseFromParent(); - BasicBlock *StubLandingPad = createStubLandingPad(Handler, PersonalityFn); + BasicBlock *StubLandingPad = createStubLandingPad(Handler); Function *F = Intrinsic::getDeclaration(Handler->getParent(), Intrinsic::donothing); InvokeInst::Create(F, NewRetBB, StubLandingPad, None, "", OldRetBB); @@ -1379,6 +1377,7 @@ Handler = createHandlerFunc(Type::getVoidTy(Context), SrcFn->getName() + ".cleanup", M, ParentFP); } + Handler->setPersonalityFn(SrcFn->getPersonalityFn()); HandlerToParentFP[Handler] = ParentFP; Handler->addFnAttr("wineh-parent", SrcFn->getName()); BasicBlock *Entry = &Handler->getEntryBlock(); @@ -1456,7 +1455,7 @@ ClonedEntryBB->eraseFromParent(); // Make sure we can identify the handler's personality later. - addStubInvokeToHandlerIfNeeded(Handler, LPad->getPersonalityFn()); + addStubInvokeToHandlerIfNeeded(Handler); if (auto *CatchAction = dyn_cast<CatchHandler>(Action)) { WinEHCatchDirector *CatchDirector = Index: lib/IR/AsmWriter.cpp =================================================================== --- lib/IR/AsmWriter.cpp +++ lib/IR/AsmWriter.cpp @@ -109,6 +109,10 @@ if (!isa<GlobalValue>(F.getPrologueData())) orderValue(F.getPrologueData(), OM); + if (F.hasPersonalityFn()) + if (!isa<GlobalValue>(F.getPersonalityFn())) + orderValue(F.getPersonalityFn(), OM); + orderValue(&F, OM); if (F.isDeclaration()) @@ -2544,6 +2548,10 @@ Out << " prologue "; writeOperand(F->getPrologueData(), true); } + if (F->hasPersonalityFn()) { + Out << " personality "; + writeOperand(F->getPersonalityFn(), /*PrintType=*/true); + } SmallVector<std::pair<unsigned, MDNode *>, 4> MDs; F->getAllMetadata(MDs); @@ -2786,8 +2794,8 @@ } else if (const LandingPadInst *LPI = dyn_cast<LandingPadInst>(&I)) { Out << ' '; TypePrinter.print(I.getType(), Out); - Out << " personality "; - writeOperand(I.getOperand(0), true); Out << '\n'; + if (LPI->isCleanup() || LPI->getNumClauses() != 0) + Out << '\n'; if (LPI->isCleanup()) Out << " cleanup"; Index: lib/IR/Core.cpp =================================================================== --- lib/IR/Core.cpp +++ lib/IR/Core.cpp @@ -2249,11 +2249,8 @@ } LLVMValueRef LLVMBuildLandingPad(LLVMBuilderRef B, LLVMTypeRef Ty, - LLVMValueRef PersFn, unsigned NumClauses, - const char *Name) { - return wrap(unwrap(B)->CreateLandingPad(unwrap(Ty), - cast<Function>(unwrap(PersFn)), - NumClauses, Name)); + unsigned NumClauses, const char *Name) { + return wrap(unwrap(B)->CreateLandingPad(unwrap(Ty), NumClauses, Name)); } LLVMValueRef LLVMBuildResume(LLVMBuilderRef B, LLVMValueRef Exn) { Index: lib/IR/Function.cpp =================================================================== --- lib/IR/Function.cpp +++ lib/IR/Function.cpp @@ -248,8 +248,8 @@ Function::Function(FunctionType *Ty, LinkageTypes Linkage, const Twine &name, Module *ParentModule) - : GlobalObject(PointerType::getUnqual(Ty), Value::FunctionVal, nullptr, 0, - Linkage, name), + : GlobalObject(PointerType::getUnqual(Ty), Value::FunctionVal, + OperandTraits<Function>::op_begin(this), 0, Linkage, name), Ty(Ty) { assert(FunctionType::isValidReturnType(getReturnType()) && "invalid return type"); @@ -279,6 +279,9 @@ // Remove the function from the on-the-side GC table. clearGC(); + + // FIXME: needed by operator delete + setFunctionNumOperands(1); } void Function::BuildLazyArguments() const { @@ -331,6 +334,8 @@ // Metadata is stored in a side-table. clearMetadata(); + + setPersonalityFn(nullptr); } void Function::addAttribute(unsigned i, Attribute::AttrKind attr) { @@ -426,6 +431,10 @@ setPrologueData(SrcF->getPrologueData()); else setPrologueData(nullptr); + if (SrcF->hasPersonalityFn()) + setPersonalityFn(SrcF->getPersonalityFn()); + else + setPersonalityFn(nullptr); } /// \brief This does the actual lookup of an intrinsic ID which @@ -976,3 +985,22 @@ } return None; } + +void Function::setPersonalityFn(Constant *C) { + if (!C) { + if (hasPersonalityFn()) { + // Note, the num operands is used to compute the offset of the operand, so + // the order here matters. Clearing the operand then clearing the num + // operands ensures we have the correct offset to the operand. + Op<0>().set(nullptr); + setFunctionNumOperands(0); + } + } else { + // Note, the num operands is used to compute the offset of the operand, so + // the order here matters. We need to set num operands to 1 first so that + // we get the correct offset to the first operand when we set it. + if (!hasPersonalityFn()) + setFunctionNumOperands(1); + Op<0>().set(C); + } +} Index: lib/IR/Instructions.cpp =================================================================== --- lib/IR/Instructions.cpp +++ lib/IR/Instructions.cpp @@ -153,18 +153,16 @@ // LandingPadInst Implementation //===----------------------------------------------------------------------===// -LandingPadInst::LandingPadInst(Type *RetTy, Value *PersonalityFn, - unsigned NumReservedValues, const Twine &NameStr, - Instruction *InsertBefore) - : Instruction(RetTy, Instruction::LandingPad, nullptr, 0, InsertBefore) { - init(PersonalityFn, 1 + NumReservedValues, NameStr); +LandingPadInst::LandingPadInst(Type *RetTy, unsigned NumReservedValues, + const Twine &NameStr, Instruction *InsertBefore) + : Instruction(RetTy, Instruction::LandingPad, nullptr, 0, InsertBefore) { + init(1 + NumReservedValues, NameStr); } -LandingPadInst::LandingPadInst(Type *RetTy, Value *PersonalityFn, - unsigned NumReservedValues, const Twine &NameStr, - BasicBlock *InsertAtEnd) - : Instruction(RetTy, Instruction::LandingPad, nullptr, 0, InsertAtEnd) { - init(PersonalityFn, 1 + NumReservedValues, NameStr); +LandingPadInst::LandingPadInst(Type *RetTy, unsigned NumReservedValues, + const Twine &NameStr, BasicBlock *InsertAtEnd) + : Instruction(RetTy, Instruction::LandingPad, nullptr, 0, InsertAtEnd) { + init(1 + NumReservedValues, NameStr); } LandingPadInst::LandingPadInst(const LandingPadInst &LP) @@ -180,28 +178,22 @@ setCleanup(LP.isCleanup()); } -LandingPadInst *LandingPadInst::Create(Type *RetTy, Value *PersonalityFn, - unsigned NumReservedClauses, +LandingPadInst *LandingPadInst::Create(Type *RetTy, unsigned NumReservedClauses, const Twine &NameStr, Instruction *InsertBefore) { - return new LandingPadInst(RetTy, PersonalityFn, NumReservedClauses, NameStr, - InsertBefore); + return new LandingPadInst(RetTy, NumReservedClauses, NameStr, InsertBefore); } -LandingPadInst *LandingPadInst::Create(Type *RetTy, Value *PersonalityFn, - unsigned NumReservedClauses, +LandingPadInst *LandingPadInst::Create(Type *RetTy, unsigned NumReservedClauses, const Twine &NameStr, BasicBlock *InsertAtEnd) { - return new LandingPadInst(RetTy, PersonalityFn, NumReservedClauses, NameStr, - InsertAtEnd); + return new LandingPadInst(RetTy, NumReservedClauses, NameStr, InsertAtEnd); } -void LandingPadInst::init(Value *PersFn, unsigned NumReservedValues, - const Twine &NameStr) { +void LandingPadInst::init(unsigned NumReservedValues, const Twine &NameStr) { ReservedSpace = NumReservedValues; - setNumHungOffUseOperands(1); + setNumHungOffUseOperands(0); allocHungoffUses(ReservedSpace); - Op<0>() = PersFn; setName(NameStr); setCleanup(false); } @@ -211,7 +203,7 @@ void LandingPadInst::growOperands(unsigned Size) { unsigned e = getNumOperands(); if (ReservedSpace >= e + Size) return; - ReservedSpace = (e + Size / 2) * 2; + ReservedSpace = (std::max(e, 1U) + Size / 2) * 2; growHungoffUses(ReservedSpace); } Index: lib/IR/TypeFinder.cpp =================================================================== --- lib/IR/TypeFinder.cpp +++ lib/IR/TypeFinder.cpp @@ -50,6 +50,9 @@ if (FI->hasPrologueData()) incorporateValue(FI->getPrologueData()); + if (FI->hasPersonalityFn()) + incorporateValue(FI->getPersonalityFn()); + // First incorporate the arguments. for (Function::const_arg_iterator AI = FI->arg_begin(), AE = FI->arg_end(); AI != AE; ++AI) Index: lib/IR/Verifier.cpp =================================================================== --- lib/IR/Verifier.cpp +++ lib/IR/Verifier.cpp @@ -181,11 +181,6 @@ /// \brief Track unresolved string-based type references. SmallDenseMap<const MDString *, const MDNode *, 32> UnresolvedTypeRefs; - /// \brief The personality function referenced by the LandingPadInsts. - /// All LandingPadInsts within the same function must use the same - /// personality function. - const Value *PersonalityFn; - /// \brief Whether we've seen a call to @llvm.frameescape in this function /// already. bool SawFrameEscape; @@ -196,8 +191,7 @@ public: explicit Verifier(raw_ostream &OS) - : VerifierSupport(OS), Context(nullptr), PersonalityFn(nullptr), - SawFrameEscape(false) {} + : VerifierSupport(OS), Context(nullptr), SawFrameEscape(false) {} bool verify(const Function &F) { M = F.getParent(); @@ -231,7 +225,6 @@ // FIXME: We strip const here because the inst visitor strips const. visit(const_cast<Function &>(F)); InstsInThisBlock.clear(); - PersonalityFn = nullptr; SawFrameEscape = false; return !Broken; @@ -2795,22 +2788,16 @@ &LPI); } + Function *F = LPI.getParent()->getParent(); + Assert(F->hasPersonalityFn(), + "LandingPadInst needs to be in a function with a personality.", &LPI); + // The landingpad instruction must be the first non-PHI instruction in the // block. Assert(LPI.getParent()->getLandingPadInst() == &LPI, "LandingPadInst not the first non-PHI instruction in the block.", &LPI); - // The personality functions for all landingpad instructions within the same - // function should match. - if (PersonalityFn) - Assert(LPI.getPersonalityFn() == PersonalityFn, - "Personality function doesn't match others in function", &LPI); - PersonalityFn = LPI.getPersonalityFn(); - - // All operands must be constants. - Assert(isa<Constant>(PersonalityFn), "Personality function is not constant!", - &LPI); for (unsigned i = 0, e = LPI.getNumClauses(); i < e; ++i) { Constant *Clause = LPI.getClause(i); if (LPI.isCatch(i)) { Index: lib/Linker/LinkModules.cpp =================================================================== --- lib/Linker/LinkModules.cpp +++ lib/Linker/LinkModules.cpp @@ -1194,6 +1194,11 @@ Dst.setPrologueData(MapValue(Src.getPrologueData(), ValueMap, RF_None, &TypeMap, &ValMaterializer)); + // Link in the personality function. + if (Src.hasPersonalityFn()) + Dst.setPersonalityFn(MapValue(Src.getPersonalityFn(), ValueMap, RF_None, + &TypeMap, &ValMaterializer)); + // Go through and convert function arguments over, remembering the mapping. Function::arg_iterator DI = Dst.arg_begin(); for (Argument &Arg : Src.args()) { Index: lib/Target/X86/X86WinEHState.cpp =================================================================== --- lib/Target/X86/X86WinEHState.cpp +++ lib/Target/X86/X86WinEHState.cpp @@ -146,16 +146,10 @@ return false; // Check the personality. Do nothing if this is not an MSVC personality. - LandingPadInst *LP = nullptr; - for (BasicBlock &BB : F) { - LP = BB.getLandingPadInst(); - if (LP) - break; - } - if (!LP) + if (!F.hasPersonalityFn()) return false; PersonalityFn = - dyn_cast<Function>(LP->getPersonalityFn()->stripPointerCasts()); + dyn_cast<Function>(F.getPersonalityFn()->stripPointerCasts()); if (!PersonalityFn) return false; Personality = classifyEHPersonality(PersonalityFn); Index: lib/Transforms/IPO/GlobalDCE.cpp =================================================================== --- lib/Transforms/IPO/GlobalDCE.cpp +++ lib/Transforms/IPO/GlobalDCE.cpp @@ -228,6 +228,9 @@ if (F->hasPrologueData()) MarkUsedGlobalsAsNeeded(F->getPrologueData()); + if (F->hasPersonalityFn()) + MarkUsedGlobalsAsNeeded(F->getPersonalityFn()); + for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB) for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) for (User::op_iterator U = I->op_begin(), E = I->op_end(); U != E; ++U) Index: lib/Transforms/IPO/PruneEH.cpp =================================================================== --- lib/Transforms/IPO/PruneEH.cpp +++ lib/Transforms/IPO/PruneEH.cpp @@ -177,7 +177,7 @@ bool MadeChange = false; for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB) { if (InvokeInst *II = dyn_cast<InvokeInst>(BB->getTerminator())) - if (II->doesNotThrow() && canSimplifyInvokeNoUnwind(II)) { + if (II->doesNotThrow() && canSimplifyInvokeNoUnwind(F)) { SmallVector<Value*, 8> Args(II->op_begin(), II->op_end() - 3); // Insert a call instruction before the invoke. CallInst *Call = CallInst::Create(II->getCalledValue(), Args, "", II); Index: lib/Transforms/InstCombine/InstructionCombining.cpp =================================================================== --- lib/Transforms/InstCombine/InstructionCombining.cpp +++ lib/Transforms/InstCombine/InstructionCombining.cpp @@ -2353,7 +2353,8 @@ // The logic here should be correct for any real-world personality function. // However if that turns out not to be true, the offending logic can always // be conditioned on the personality function, like the catch-all logic is. - EHPersonality Personality = classifyEHPersonality(LI.getPersonalityFn()); + EHPersonality Personality = + classifyEHPersonality(LI.getParent()->getParent()->getPersonalityFn()); // Simplify the list of clauses, eg by removing repeated catch clauses // (these are often created by inlining). @@ -2620,7 +2621,6 @@ // with a new one. if (MakeNewInstruction) { LandingPadInst *NLI = LandingPadInst::Create(LI.getType(), - LI.getPersonalityFn(), NewClauses.size()); for (unsigned i = 0, e = NewClauses.size(); i != e; ++i) NLI->addClause(NewClauses[i]); @@ -2691,7 +2691,8 @@ } // Instruction isn't dead, see if we can constant propagate it. - if (!I->use_empty() && isa<Constant>(I->getOperand(0))) { + if (!I->use_empty() && + (I->getNumOperands() == 0 || isa<Constant>(I->getOperand(0)))) { if (Constant *C = ConstantFoldInstruction(I, DL, TLI)) { DEBUG(dbgs() << "IC: ConstFold to: " << *C << " from: " << *I << '\n'); @@ -2846,7 +2847,8 @@ } // ConstantProp instruction if trivially constant. - if (!Inst->use_empty() && isa<Constant>(Inst->getOperand(0))) + if (!Inst->use_empty() && + (Inst->getNumOperands() == 0 || isa<Constant>(Inst->getOperand(0)))) if (Constant *C = ConstantFoldInstruction(Inst, DL, TLI)) { DEBUG(dbgs() << "IC: ConstFold to: " << *C << " from: " << *Inst << '\n'); Index: lib/Transforms/Utils/InlineFunction.cpp =================================================================== --- lib/Transforms/Utils/InlineFunction.cpp +++ lib/Transforms/Utils/InlineFunction.cpp @@ -949,35 +949,23 @@ } // Get the personality function from the callee if it contains a landing pad. - Value *CalleePersonality = nullptr; - for (Function::const_iterator I = CalledFunc->begin(), E = CalledFunc->end(); - I != E; ++I) - if (const InvokeInst *II = dyn_cast<InvokeInst>(I->getTerminator())) { - const BasicBlock *BB = II->getUnwindDest(); - const LandingPadInst *LP = BB->getLandingPadInst(); - CalleePersonality = LP->getPersonalityFn(); - break; - } + Constant *CalledPersonality = + CalledFunc->hasPersonalityFn() ? CalledFunc->getPersonalityFn() : nullptr; // Find the personality function used by the landing pads of the caller. If it // exists, then check to see that it matches the personality function used in // the callee. - if (CalleePersonality) { - for (Function::const_iterator I = Caller->begin(), E = Caller->end(); - I != E; ++I) - if (const InvokeInst *II = dyn_cast<InvokeInst>(I->getTerminator())) { - const BasicBlock *BB = II->getUnwindDest(); - const LandingPadInst *LP = BB->getLandingPadInst(); - - // If the personality functions match, then we can perform the - // inlining. Otherwise, we can't inline. - // TODO: This isn't 100% true. Some personality functions are proper - // supersets of others and can be used in place of the other. - if (LP->getPersonalityFn() != CalleePersonality) - return false; - - break; - } + Constant *CallerPersonality = + Caller->hasPersonalityFn() ? Caller->getPersonalityFn() : nullptr; + if (CalledPersonality) { + if (!CallerPersonality) + Caller->setPersonalityFn(CalledPersonality); + // If the personality functions match, then we can perform the + // inlining. Otherwise, we can't inline. + // TODO: This isn't 100% true. Some personality functions are proper + // supersets of others and can be used in place of the other. + else if (CalledPersonality != CallerPersonality) + return false; } // Get an iterator to the last basic block in the function, which will have Index: lib/Transforms/Utils/Local.cpp =================================================================== --- lib/Transforms/Utils/Local.cpp +++ lib/Transforms/Utils/Local.cpp @@ -1173,10 +1173,11 @@ II->eraseFromParent(); } -static bool markAliveBlocks(BasicBlock *BB, +static bool markAliveBlocks(Function &F, SmallPtrSetImpl<BasicBlock*> &Reachable) { SmallVector<BasicBlock*, 128> Worklist; + BasicBlock *BB = F.begin(); Worklist.push_back(BB); Reachable.insert(BB); bool Changed = false; @@ -1247,7 +1248,7 @@ if (isa<ConstantPointerNull>(Callee) || isa<UndefValue>(Callee)) { changeToUnreachable(II, true); Changed = true; - } else if (II->doesNotThrow() && canSimplifyInvokeNoUnwind(II)) { + } else if (II->doesNotThrow() && canSimplifyInvokeNoUnwind(&F)) { if (II->use_empty() && II->onlyReadsMemory()) { // jump to the normal destination branch. BranchInst::Create(II->getNormalDest(), II); @@ -1272,7 +1273,7 @@ /// otherwise. bool llvm::removeUnreachableBlocks(Function &F) { SmallPtrSet<BasicBlock*, 128> Reachable; - bool Changed = markAliveBlocks(F.begin(), Reachable); + bool Changed = markAliveBlocks(F, Reachable); // If there are unreachable blocks in the CFG... if (Reachable.size() == F.size()) Index: test/Analysis/CallGraph/do-nothing-intrinsic.ll =================================================================== --- test/Analysis/CallGraph/do-nothing-intrinsic.ll +++ test/Analysis/CallGraph/do-nothing-intrinsic.ll @@ -1,11 +1,11 @@ ; RUN: opt < %s -basiccg ; PR13903 -define void @main() { +define void @main() personality i8 0 { invoke void @llvm.donothing() to label %ret unwind label %unw unw: - %tmp = landingpad i8 personality i8 0 cleanup + %tmp = landingpad i8 cleanup br label %ret ret: ret void Index: test/Analysis/Dominators/invoke.ll =================================================================== --- test/Analysis/Dominators/invoke.ll +++ test/Analysis/Dominators/invoke.ll @@ -1,7 +1,7 @@ ; RUN: opt -verify -disable-output < %s ; This tests that we handle unreachable blocks correctly -define void @f() { +define void @f() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { %v1 = invoke i32* @g() to label %bb1 unwind label %bb2 invoke void @__dynamic_cast() @@ -10,7 +10,7 @@ %Hidden = getelementptr inbounds i32, i32* %v1, i64 1 ret void bb2: - %lpad.loopexit80 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %lpad.loopexit80 = landingpad { i8*, i32 } cleanup ret void } Index: test/Analysis/LazyCallGraph/basic.ll =================================================================== --- test/Analysis/LazyCallGraph/basic.ll +++ test/Analysis/LazyCallGraph/basic.ll @@ -63,7 +63,7 @@ ret void } -define void ()* @test1(void ()** %x) { +define void ()* @test1(void ()** %x) personality i32 (...)* @__gxx_personality_v0 { ; CHECK-LABEL: Call edges in function: test1 ; CHECK-NEXT: -> f12 ; CHECK-NEXT: -> f11 @@ -97,7 +97,7 @@ ret void ()* @f11 unwind: - %res = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + %res = landingpad { i8*, i32 } cleanup resume { i8*, i32 } { i8* bitcast (void ()* @f12 to i8*), i32 42 } } Index: test/Analysis/Lint/cppeh-catch-intrinsics-clean.ll =================================================================== --- test/Analysis/Lint/cppeh-catch-intrinsics-clean.ll +++ test/Analysis/Lint/cppeh-catch-intrinsics-clean.ll @@ -12,13 +12,13 @@ @_ZTIi = external constant i8* ; Function Attrs: uwtable -define void @test_ref_clean() { +define void @test_ref_clean() personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: invoke void @_Z9may_throwv() to label %try.cont unwind label %lpad lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %0 = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %exn = extractvalue { i8*, i32 } %0, 0 %sel = extractvalue { i8*, i32 } %0, 1 @@ -43,7 +43,7 @@ } ; Function Attrs: uwtable -define void @test_ref_clean_multibranch() { +define void @test_ref_clean_multibranch() personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: invoke void @_Z9may_throwv() to label %invoke.cont unwind label %lpad @@ -53,7 +53,7 @@ to label %invoke.cont unwind label %lpad1 lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %0 = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %exn = extractvalue { i8*, i32 } %0, 0 %sel = extractvalue { i8*, i32 } %0, 1 @@ -65,7 +65,7 @@ to label %try.cont unwind label %lpad lpad1: ; preds = %entry - %l1.0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %l1.0 = landingpad { i8*, i32 } cleanup catch i8* bitcast (i8** @_ZTIi to i8*) %exn1 = extractvalue { i8*, i32 } %l1.0, 0 Index: test/Analysis/Lint/cppeh-catch-intrinsics.ll =================================================================== --- test/Analysis/Lint/cppeh-catch-intrinsics.ll +++ test/Analysis/Lint/cppeh-catch-intrinsics.ll @@ -13,7 +13,7 @@ @_ZTIi = external constant i8* ; Function Attrs: uwtable -define void @test_missing_endcatch() { +define void @test_missing_endcatch() personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { ; CHECK: Some paths from llvm.eh.begincatch may not reach llvm.eh.endcatch ; CHECK-NEXT: call void @llvm.eh.begincatch(i8* %exn, i8* null) entry: @@ -21,7 +21,7 @@ to label %try.cont unwind label %lpad lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %0 = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %exn = extractvalue { i8*, i32 } %0, 0 %sel = extractvalue { i8*, i32 } %0, 1 @@ -45,7 +45,7 @@ } ; Function Attrs: uwtable -define void @test_missing_begincatch() { +define void @test_missing_begincatch() personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { ; CHECK: llvm.eh.endcatch may be reachable without passing llvm.eh.begincatch ; CHECK-NEXT: call void @llvm.eh.endcatch() entry: @@ -53,7 +53,7 @@ to label %try.cont unwind label %lpad lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %0 = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %exn = extractvalue { i8*, i32 } %0, 0 %sel = extractvalue { i8*, i32 } %0, 1 @@ -77,7 +77,7 @@ } ; Function Attrs: uwtable -define void @test_multiple_begin() { +define void @test_multiple_begin() personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { ; CHECK: llvm.eh.begincatch may be called a second time before llvm.eh.endcatch ; CHECK-NEXT: call void @llvm.eh.begincatch(i8* %exn, i8* null) ; CHECK-NEXT: call void @llvm.eh.begincatch(i8* %exn, i8* null) @@ -86,7 +86,7 @@ to label %try.cont unwind label %lpad lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %0 = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %exn = extractvalue { i8*, i32 } %0, 0 %sel = extractvalue { i8*, i32 } %0, 1 @@ -112,7 +112,7 @@ } ; Function Attrs: uwtable -define void @test_multiple_end() { +define void @test_multiple_end() personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { ; CHECK: llvm.eh.endcatch may be called a second time after llvm.eh.begincatch ; CHECK-NEXT: call void @llvm.eh.endcatch() ; CHECK-NEXT: call void @llvm.eh.endcatch() @@ -121,7 +121,7 @@ to label %try.cont unwind label %lpad lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %0 = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %exn = extractvalue { i8*, i32 } %0, 0 %sel = extractvalue { i8*, i32 } %0, 1 @@ -166,7 +166,7 @@ } ; Function Attrs: uwtable -define void @test_branch_to_begincatch_with_no_lpad(i32 %fake.sel) { +define void @test_branch_to_begincatch_with_no_lpad(i32 %fake.sel) personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { ; CHECK: llvm.eh.begincatch may be reachable without passing a landingpad ; CHECK-NEXT: call void @llvm.eh.begincatch(i8* %exn2, i8* null) entry: @@ -175,7 +175,7 @@ to label %catch unwind label %lpad lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %0 = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %exn = extractvalue { i8*, i32 } %0, 0 %sel = extractvalue { i8*, i32 } %0, 1 @@ -211,7 +211,7 @@ } ; Function Attrs: uwtable -define void @test_branch_missing_endcatch() { +define void @test_branch_missing_endcatch() personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { ; CHECK: Some paths from llvm.eh.begincatch may not reach llvm.eh.endcatch ; CHECK-NEXT: call void @llvm.eh.begincatch(i8* %exn2, i8* null) entry: @@ -223,7 +223,7 @@ to label %invoke.cont unwind label %lpad1 lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %0 = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %exn = extractvalue { i8*, i32 } %0, 0 %sel = extractvalue { i8*, i32 } %0, 1 @@ -235,7 +235,7 @@ to label %try.cont unwind label %lpad lpad1: ; preds = %entry - %l1.0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %l1.0 = landingpad { i8*, i32 } cleanup catch i8* bitcast (i8** @_ZTIi to i8*) %exn1 = extractvalue { i8*, i32 } %l1.0, 0 Index: test/Assembler/invalid-landingpad.ll =================================================================== --- test/Assembler/invalid-landingpad.ll +++ test/Assembler/invalid-landingpad.ll @@ -2,6 +2,6 @@ ; CHECK: clause argument must be a constant -define void @test(i32 %in) { - landingpad {} personality void()* null filter i32 %in +define void @test(i32 %in) personality void()* null { + landingpad {} filter i32 %in } Index: test/Bitcode/miscInstructions.3.2.ll =================================================================== --- test/Bitcode/miscInstructions.3.2.ll +++ test/Bitcode/miscInstructions.3.2.ll @@ -13,27 +13,33 @@ ret i32 0 } +; CHECK-LABEL: define void @landingpadInstr1 +; CHECK-SAME: personality i32 (...)* @__gxx_personality_v0 define void @landingpadInstr1(i1 %cond1, <2 x i1> %cond2, <2 x i8> %x1, <2 x i8> %x2){ entry: -; CHECK: %res = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 +; CHECK: %res = landingpad { i8*, i32 } %res = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 ; CHECK: catch i8** @_ZTIi catch i8** @_ZTIi ret void } +; CHECK-LABEL: define void @landingpadInstr2 +; CHECK-SAME: personality i32 (...)* @__gxx_personality_v0 define void @landingpadInstr2(i1 %cond1, <2 x i1> %cond2, <2 x i8> %x1, <2 x i8> %x2){ entry: -; CHECK: %res = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 +; CHECK: %res = landingpad { i8*, i32 } %res = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 ; CHECK: cleanup cleanup ret void } +; CHECK-LABEL: define void @landingpadInstr3 +; CHECK-SAME: personality i32 (...)* @__gxx_personality_v0 define void @landingpadInstr3(i1 %cond1, <2 x i1> %cond2, <2 x i8> %x1, <2 x i8> %x2){ entry: -; CHECK: %res = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 +; CHECK: %res = landingpad { i8*, i32 } %res = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 ; CHECK: catch i8** @_ZTIi catch i8** @_ZTIi Index: test/CodeGen/AArch64/arm64-big-endian-eh.ll =================================================================== --- test/CodeGen/AArch64/arm64-big-endian-eh.ll +++ test/CodeGen/AArch64/arm64-big-endian-eh.ll @@ -14,13 +14,13 @@ ; } ;} -define void @_Z4testii(i32 %a, i32 %b) #0 { +define void @_Z4testii(i32 %a, i32 %b) #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @_Z3fooi(i32 %a) to label %try.cont unwind label %lpad lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } catch i8* null %1 = extractvalue { i8*, i32 } %0, 0 %2 = tail call i8* @__cxa_begin_catch(i8* %1) #2 @@ -35,7 +35,7 @@ ret void lpad1: ; preds = %lpad - %3 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %3 = landingpad { i8*, i32 } cleanup invoke void @__cxa_end_catch() to label %eh.resume unwind label %terminate.lpad @@ -44,7 +44,7 @@ resume { i8*, i32 } %3 terminate.lpad: ; preds = %lpad1 - %4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %4 = landingpad { i8*, i32 } catch i8* null %5 = extractvalue { i8*, i32 } %4, 0 tail call void @__clang_call_terminate(i8* %5) #3 Index: test/CodeGen/AArch64/br-to-eh-lpad.ll =================================================================== --- test/CodeGen/AArch64/br-to-eh-lpad.ll +++ test/CodeGen/AArch64/br-to-eh-lpad.ll @@ -7,12 +7,12 @@ ; that case, the machine verifier, which relies on analyzing branches for this ; kind of verification, is unable to check anything, so accepts the CFG. -define void @test_branch_to_landingpad() { +define void @test_branch_to_landingpad() personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) { entry: br i1 undef, label %if.end50.thread, label %if.then6 lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } catch %struct._objc_typeinfo.12.129.194.285.350.493.519.532.571.597.623.765* @"OBJC_EHTYPE_$_NSString" catch %struct._objc_typeinfo.12.129.194.285.350.493.519.532.571.597.623.765* @OBJC_EHTYPE_id catch i8* null @@ -46,7 +46,7 @@ unreachable lpad40: - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) + %1 = landingpad { i8*, i32 } catch i8* null br label %finally.catchall Index: test/CodeGen/AArch64/pic-eh-stubs.ll =================================================================== --- test/CodeGen/AArch64/pic-eh-stubs.ll +++ test/CodeGen/AArch64/pic-eh-stubs.ll @@ -21,13 +21,13 @@ @_ZTIi = external constant i8* -define i32 @_Z3barv() { +define i32 @_Z3barv() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @_Z3foov() to label %return unwind label %lpad lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %1 = extractvalue { i8*, i32 } %0, 1 %2 = tail call i32 @llvm.eh.typeid.for(i8* bitcast (i8** @_ZTIi to i8*)) nounwind Index: test/CodeGen/ARM/2009-08-31-LSDA-Name.ll =================================================================== --- test/CodeGen/ARM/2009-08-31-LSDA-Name.ll +++ test/CodeGen/ARM/2009-08-31-LSDA-Name.ll @@ -7,7 +7,7 @@ %struct.A = type { i32* } -define void @"\01-[MyFunction Name:]"() { +define void @"\01-[MyFunction Name:]"() personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) { entry: %save_filt.1 = alloca i32 %save_eptr.0 = alloca i8* @@ -39,7 +39,7 @@ ret void lpad: ; preds = %entry - %exn = landingpad {i8*, i32} personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %exn = landingpad {i8*, i32} cleanup %eh_ptr = extractvalue {i8*, i32} %exn, 0 store i8* %eh_ptr, i8** %eh_exception Index: test/CodeGen/ARM/2010-07-26-GlobalMerge.ll =================================================================== --- test/CodeGen/ARM/2010-07-26-GlobalMerge.ll +++ test/CodeGen/ARM/2010-07-26-GlobalMerge.ll @@ -40,7 +40,7 @@ declare void @__cxa_throw(i8*, i8*, i8*) -define i32 @main() ssp { +define i32 @main() ssp personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) { entry: %puts.i = tail call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str, i32 0, i32 0)) ; <i32> [#uses=0] %exception.i = tail call i8* @__cxa_allocate_exception(i32 4) nounwind ; <i8*> [#uses=2] @@ -71,7 +71,7 @@ ret i32 %conv lpad: ; preds = %entry - %exn.ptr = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %exn.ptr = landingpad { i8*, i32 } catch i8* bitcast (%0* @_ZTI1A to i8*) catch i8* null %exn = extractvalue { i8*, i32 } %exn.ptr, 0 Index: test/CodeGen/ARM/2010-08-04-EHCrash.ll =================================================================== --- test/CodeGen/ARM/2010-08-04-EHCrash.ll +++ test/CodeGen/ARM/2010-08-04-EHCrash.ll @@ -1,7 +1,7 @@ ; RUN: llc < %s -mtriple=thumbv7-apple-darwin10 ; <rdar://problem/8264008> -define linkonce_odr arm_apcscc void @func1() { +define linkonce_odr arm_apcscc void @func1() personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) { entry: %save_filt.936 = alloca i32 ; <i32*> [#uses=2] %save_eptr.935 = alloca i8* ; <i8**> [#uses=2] @@ -34,7 +34,7 @@ ret void lpad: ; preds = %bb - %eh_ptr = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %eh_ptr = landingpad { i8*, i32 } cleanup %exn = extractvalue { i8*, i32 } %eh_ptr, 0 store i8* %exn, i8** %eh_exception Index: test/CodeGen/ARM/2011-05-04-MultipleLandingPadSuccs.ll =================================================================== --- test/CodeGen/ARM/2011-05-04-MultipleLandingPadSuccs.ll +++ test/CodeGen/ARM/2011-05-04-MultipleLandingPadSuccs.ll @@ -3,7 +3,7 @@ target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:32-n32" target triple = "thumbv7-apple-darwin" -define void @func() unnamed_addr align 2 { +define void @func() unnamed_addr align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) { entry: br label %for.cond @@ -35,13 +35,13 @@ br label %for.cond lpad: - %exn = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %exn = landingpad { i8*, i32 } catch i8* null invoke void @foo() to label %eh.resume unwind label %terminate.lpad lpad26: - %exn27 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %exn27 = landingpad { i8*, i32 } catch i8* null invoke void @foo() to label %eh.resume unwind label %terminate.lpad @@ -57,7 +57,7 @@ ret void lpad44: - %exn45 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %exn45 = landingpad { i8*, i32 } catch i8* null invoke void @foo() to label %eh.resume unwind label %terminate.lpad @@ -67,7 +67,7 @@ resume { i8*, i32 } %exn.slot.0 terminate.lpad: - %exn51 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %exn51 = landingpad { i8*, i32 } catch i8* null tail call void @_ZSt9terminatev() noreturn nounwind unreachable Index: test/CodeGen/ARM/2011-12-19-sjlj-clobber.ll =================================================================== --- test/CodeGen/ARM/2011-12-19-sjlj-clobber.ll +++ test/CodeGen/ARM/2011-12-19-sjlj-clobber.ll @@ -8,7 +8,7 @@ %0 = type opaque %struct.NSConstantString = type { i32*, i32, i8*, i32 } -define i32 @asdf(i32 %a, i32 %b, i8** %c, i8* %d) { +define i32 @asdf(i32 %a, i32 %b, i8** %c, i8* %d) personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) { bb: %tmp = alloca i32, align 4 %tmp1 = alloca i32, align 4 @@ -37,7 +37,7 @@ unreachable bb15: ; preds = %bb11, %bb - %tmp16 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) + %tmp16 = landingpad { i8*, i32 } catch i8* null %tmp17 = extractvalue { i8*, i32 } %tmp16, 0 store i8* %tmp17, i8** %tmp4 Index: test/CodeGen/ARM/2012-04-24-SplitEHCriticalEdge.ll =================================================================== --- test/CodeGen/ARM/2012-04-24-SplitEHCriticalEdge.ll +++ test/CodeGen/ARM/2012-04-24-SplitEHCriticalEdge.ll @@ -25,13 +25,13 @@ declare void @_ZSt9terminatev() -define hidden double @t(%0* %self, i8* nocapture %_cmd) optsize ssp { +define hidden double @t(%0* %self, i8* nocapture %_cmd) optsize ssp personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) { entry: %call = invoke double undef(%class.FunctionInterpreter.3.15.31* undef) optsize to label %try.cont unwind label %lpad lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %0 = landingpad { i8*, i32 } catch i8* bitcast ({ i8*, i8* }* @_ZTI13ParseErrorMsg to i8*) br i1 undef, label %catch, label %eh.resume @@ -47,7 +47,7 @@ ret double %value.0 lpad1: ; preds = %catch - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %1 = landingpad { i8*, i32 } cleanup invoke void @__cxa_end_catch() to label %eh.resume unwind label %terminate.lpad @@ -56,7 +56,7 @@ resume { i8*, i32 } undef terminate.lpad: ; preds = %lpad1 - %2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %2 = landingpad { i8*, i32 } catch i8* null unreachable } Index: test/CodeGen/ARM/2014-05-14-DwarfEHCrash.ll =================================================================== --- test/CodeGen/ARM/2014-05-14-DwarfEHCrash.ll +++ test/CodeGen/ARM/2014-05-14-DwarfEHCrash.ll @@ -8,13 +8,13 @@ @_ZTIi = external constant i8* -define void @_Z3fn2v() #0 { +define void @_Z3fn2v() #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @_Z3fn1v() to label %try.cont unwind label %lpad lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %1 = extractvalue { i8*, i32 } %0, 1 %2 = tail call i32 @llvm.eh.typeid.for(i8* bitcast (i8** @_ZTIi to i8*)) #2 Index: test/CodeGen/ARM/arm-ttype-target2.ll =================================================================== --- test/CodeGen/ARM/arm-ttype-target2.ll +++ test/CodeGen/ARM/arm-ttype-target2.ll @@ -4,13 +4,13 @@ @_ZTS3Foo = linkonce_odr constant [5 x i8] c"3Foo\00" @_ZTI3Foo = linkonce_odr unnamed_addr constant { i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv117__class_type_infoE, i32 2) to i8*), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @_ZTS3Foo, i32 0, i32 0) } -define i32 @main() { +define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @_Z3foov() to label %return unwind label %lpad lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } catch i8* bitcast ({ i8*, i8* }* @_ZTI3Foo to i8*) %1 = extractvalue { i8*, i32 } %0, 1 %2 = tail call i32 @llvm.eh.typeid.for(i8* bitcast ({ i8*, i8* }* @_ZTI3Foo to i8*)) nounwind Index: test/CodeGen/ARM/big-endian-eh-unwind.ll =================================================================== --- test/CodeGen/ARM/big-endian-eh-unwind.ll +++ test/CodeGen/ARM/big-endian-eh-unwind.ll @@ -14,13 +14,13 @@ ; } ;} -define void @_Z4testii(i32 %a, i32 %b) #0 { +define void @_Z4testii(i32 %a, i32 %b) #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @_Z3fooi(i32 %a) to label %try.cont unwind label %lpad lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } catch i8* null %1 = extractvalue { i8*, i32 } %0, 0 %2 = tail call i8* @__cxa_begin_catch(i8* %1) #2 @@ -35,7 +35,7 @@ ret void lpad1: ; preds = %lpad - %3 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %3 = landingpad { i8*, i32 } cleanup invoke void @__cxa_end_catch() to label %eh.resume unwind label %terminate.lpad @@ -44,7 +44,7 @@ resume { i8*, i32 } %3 terminate.lpad: ; preds = %lpad1 - %4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %4 = landingpad { i8*, i32 } catch i8* null %5 = extractvalue { i8*, i32 } %4, 0 tail call void @__clang_call_terminate(i8* %5) #3 Index: test/CodeGen/ARM/crash.ll =================================================================== --- test/CodeGen/ARM/crash.ll +++ test/CodeGen/ARM/crash.ll @@ -74,7 +74,7 @@ %A = type { %B } %B = type { i32 } -define void @_Z3Foov() ssp { +define void @_Z3Foov() ssp personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) { entry: br i1 true, label %exit, label %false @@ -83,7 +83,7 @@ to label %exit unwind label %lpad lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %0 = landingpad { i8*, i32 } catch i8* null unreachable Index: test/CodeGen/ARM/debug-frame-no-debug.ll =================================================================== --- test/CodeGen/ARM/debug-frame-no-debug.ll +++ test/CodeGen/ARM/debug-frame-no-debug.ll @@ -34,14 +34,13 @@ define void @_Z4testiiiiiddddd(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, double %m, double %n, double %p, - double %q, double %r) { + double %q, double %r) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @_Z5printiiiii(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e) to label %try.cont unwind label %lpad lpad: %0 = landingpad { i8*, i32 } - personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) catch i8* null %1 = extractvalue { i8*, i32 } %0, 0 %2 = tail call i8* @__cxa_begin_catch(i8* %1) @@ -58,7 +57,6 @@ lpad1: %3 = landingpad { i8*, i32 } - personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) cleanup invoke void @__cxa_end_catch() to label %eh.resume unwind label %terminate.lpad @@ -68,7 +66,6 @@ terminate.lpad: %4 = landingpad { i8*, i32 } - personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) catch i8* null %5 = extractvalue { i8*, i32 } %4, 0 tail call void @__clang_call_terminate(i8* %5) Index: test/CodeGen/ARM/debug-frame.ll =================================================================== --- test/CodeGen/ARM/debug-frame.ll +++ test/CodeGen/ARM/debug-frame.ll @@ -73,14 +73,13 @@ define void @_Z4testiiiiiddddd(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, double %m, double %n, double %p, - double %q, double %r) { + double %q, double %r) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @_Z5printiiiii(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e) to label %try.cont unwind label %lpad lpad: %0 = landingpad { i8*, i32 } - personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) catch i8* null %1 = extractvalue { i8*, i32 } %0, 0 %2 = tail call i8* @__cxa_begin_catch(i8* %1) @@ -97,7 +96,6 @@ lpad1: %3 = landingpad { i8*, i32 } - personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) cleanup invoke void @__cxa_end_catch() to label %eh.resume unwind label %terminate.lpad @@ -107,7 +105,6 @@ terminate.lpad: %4 = landingpad { i8*, i32 } - personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) catch i8* null %5 = extractvalue { i8*, i32 } %4, 0 tail call void @__clang_call_terminate(i8* %5) Index: test/CodeGen/ARM/dwarf-eh.ll =================================================================== --- test/CodeGen/ARM/dwarf-eh.ll +++ test/CodeGen/ARM/dwarf-eh.ll @@ -17,7 +17,7 @@ @_ZTS9exception = linkonce_odr constant [11 x i8] c"9exception\00" @_ZTI9exception = linkonce_odr unnamed_addr constant { i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv117__class_type_infoE, i32 2) to i8*), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @_ZTS9exception, i32 0, i32 0) } -define void @f() uwtable { +define void @f() uwtable personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { %1 = alloca i8* %2 = alloca i32 %e = alloca %struct.exception*, align 4 @@ -26,7 +26,7 @@ br label %16 - %5 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %5 = landingpad { i8*, i32 } catch i8* bitcast ({ i8*, i8* }* @_ZTI9exception to i8*) %6 = extractvalue { i8*, i32 } %5, 0 store i8* %6, i8** %1 Index: test/CodeGen/ARM/eh-dispcont.ll =================================================================== --- test/CodeGen/ARM/eh-dispcont.ll +++ test/CodeGen/ARM/eh-dispcont.ll @@ -7,7 +7,7 @@ @_ZTIi = external constant i8* -define i32 @main() #0 { +define i32 @main() #0 personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) { entry: %exception = tail call i8* @__cxa_allocate_exception(i32 4) #1 %0 = bitcast i8* %exception to i32* @@ -16,7 +16,7 @@ to label %unreachable unwind label %lpad lpad: ; preds = %entry - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %1 = landingpad { i8*, i32 } catch i8* null %2 = extractvalue { i8*, i32 } %1, 0 %3 = tail call i8* @__cxa_begin_catch(i8* %2) #1 Index: test/CodeGen/ARM/eh-resume-darwin.ll =================================================================== --- test/CodeGen/ARM/eh-resume-darwin.ll +++ test/CodeGen/ARM/eh-resume-darwin.ll @@ -5,7 +5,7 @@ declare i32 @__gxx_personality_sj0(...) -define void @test0() { +define void @test0() personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) { entry: invoke void @func() to label %cont unwind label %lpad @@ -14,7 +14,7 @@ ret void lpad: - %exn = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %exn = landingpad { i8*, i32 } cleanup resume { i8*, i32 } %exn } Index: test/CodeGen/ARM/ehabi-filters.ll =================================================================== --- test/CodeGen/ARM/ehabi-filters.ll +++ test/CodeGen/ARM/ehabi-filters.ll @@ -14,7 +14,7 @@ declare void @__cxa_call_unexpected(i8*) -define i32 @main() { +define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { ; CHECK-LABEL: main: entry: %exception.i = tail call i8* @__cxa_allocate_exception(i32 4) nounwind @@ -24,7 +24,7 @@ to label %unreachable.i unwind label %lpad.i lpad.i: ; preds = %entry - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %1 = landingpad { i8*, i32 } filter [1 x i8*] [i8* bitcast (i8** @_ZTIi to i8*)] catch i8* bitcast (i8** @_ZTIi to i8*) ; CHECK: .long _ZTIi(target2) @ TypeInfo 1 @@ -45,7 +45,7 @@ unreachable lpad: ; preds = %ehspec.unexpected.i - %4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %4 = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) br label %lpad.body Index: test/CodeGen/ARM/ehabi-handlerdata-nounwind.ll =================================================================== --- test/CodeGen/ARM/ehabi-handlerdata-nounwind.ll +++ test/CodeGen/ARM/ehabi-handlerdata-nounwind.ll @@ -25,12 +25,12 @@ declare void @__cxa_end_catch() -define void @test1() nounwind { +define void @test1() nounwind personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @throw_exception() to label %try.cont unwind label %lpad lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } catch i8* null %1 = extractvalue { i8*, i32 } %0, 0 %2 = tail call i8* @__cxa_begin_catch(i8* %1) Index: test/CodeGen/ARM/ehabi-handlerdata.ll =================================================================== --- test/CodeGen/ARM/ehabi-handlerdata.ll +++ test/CodeGen/ARM/ehabi-handlerdata.ll @@ -23,12 +23,12 @@ declare void @__cxa_end_catch() -define void @test1() { +define void @test1() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @throw_exception() to label %try.cont unwind label %lpad lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } catch i8* null %1 = extractvalue { i8*, i32 } %0, 0 %2 = tail call i8* @__cxa_begin_catch(i8* %1) Index: test/CodeGen/ARM/ehabi.ll =================================================================== --- test/CodeGen/ARM/ehabi.ll +++ test/CodeGen/ARM/ehabi.ll @@ -89,14 +89,13 @@ define void @_Z4testiiiiiddddd(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, double %m, double %n, double %p, - double %q, double %r) { + double %q, double %r) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @_Z5printiiiii(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e) to label %try.cont unwind label %lpad lpad: %0 = landingpad { i8*, i32 } - personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) catch i8* null %1 = extractvalue { i8*, i32 } %0, 0 %2 = tail call i8* @__cxa_begin_catch(i8* %1) @@ -113,7 +112,6 @@ lpad1: %3 = landingpad { i8*, i32 } - personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) cleanup invoke void @__cxa_end_catch() to label %eh.resume unwind label %terminate.lpad @@ -123,7 +121,6 @@ terminate.lpad: %4 = landingpad { i8*, i32 } - personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) catch i8* null %5 = extractvalue { i8*, i32 } %4, 0 tail call void @__clang_call_terminate(i8* %5) Index: test/CodeGen/ARM/global-merge.ll =================================================================== --- test/CodeGen/ARM/global-merge.ll +++ test/CodeGen/ARM/global-merge.ll @@ -15,13 +15,13 @@ ; CHECK: ZTIi @_ZTIi = internal global i8* null -define i32 @_Z9exceptioni(i32 %arg) { +define i32 @_Z9exceptioni(i32 %arg) personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) { bb: %tmp = invoke i32 @_Z14throwSomethingi(i32 %arg) to label %bb9 unwind label %bb1 bb1: ; preds = %bb - %tmp2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp2 = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %tmp3 = extractvalue { i8*, i32 } %tmp2, 1 %tmp4 = tail call i32 @llvm.eh.typeid.for(i8* bitcast (i8** @_ZTIi to i8*)) Index: test/CodeGen/ARM/gv-stubs-crash.ll =================================================================== --- test/CodeGen/ARM/gv-stubs-crash.ll +++ test/CodeGen/ARM/gv-stubs-crash.ll @@ -3,7 +3,7 @@ @Exn = external hidden unnamed_addr constant { i8*, i8* } -define hidden void @func(i32* %this, i32* %e) optsize align 2 { +define hidden void @func(i32* %this, i32* %e) optsize align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) { %e.ld = load i32, i32* %e, align 4 %inv = invoke zeroext i1 @func2(i32* %this, i32 %e.ld) optsize to label %ret unwind label %lpad @@ -12,7 +12,7 @@ ret void lpad: - %lp = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %lp = landingpad { i8*, i32 } catch i8* bitcast ({ i8*, i8* }* @Exn to i8*) br label %.loopexit4 Index: test/CodeGen/ARM/invoke-donothing-assert.ll =================================================================== --- test/CodeGen/ARM/invoke-donothing-assert.ll +++ test/CodeGen/ARM/invoke-donothing-assert.ll @@ -4,7 +4,7 @@ ; <rdar://problem/13228754> & <rdar://problem/13316637> ; CHECK: .globl _foo -define void @foo() { +define void @foo() personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) { invoke.cont: invoke void @callA() to label %invoke.cont25 unwind label %lpad2 @@ -20,12 +20,12 @@ ret void lpad2: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %0 = landingpad { i8*, i32 } cleanup br label %eh.resume lpad15: - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %1 = landingpad { i8*, i32 } cleanup br label %eh.resume @@ -34,7 +34,7 @@ } ; CHECK: .globl _bar -define linkonce_odr void @bar(i32* %a) { +define linkonce_odr void @bar(i32* %a) personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) { if.end.i.i.i: invoke void @llvm.donothing() to label %call.i.i.i.noexc unwind label %eh.resume @@ -58,7 +58,7 @@ ret void eh.resume: - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %1 = landingpad { i8*, i32 } cleanup %2 = extractvalue { i8*, i32 } %1, 0 %3 = extractvalue { i8*, i32 } %1, 1 Index: test/CodeGen/ARM/sjlj-prepare-critical-edge.ll =================================================================== --- test/CodeGen/ARM/sjlj-prepare-critical-edge.ll +++ test/CodeGen/ARM/sjlj-prepare-critical-edge.ll @@ -6,7 +6,7 @@ declare void @bar(%struct.__CFString*, %struct.__CFString*) -define noalias i8* @foo(i8* nocapture %inRefURL) noreturn ssp { +define noalias i8* @foo(i8* nocapture %inRefURL) noreturn ssp personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) { entry: %call = tail call %struct.__CFString* @bar3() %call2 = invoke i8* @bar2() @@ -17,14 +17,14 @@ to label %for.cond unwind label %lpad5 lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %0 = landingpad { i8*, i32 } cleanup %1 = extractvalue { i8*, i32 } %0, 0 %2 = extractvalue { i8*, i32 } %0, 1 br label %ehcleanup lpad5: ; preds = %for.cond - %3 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %3 = landingpad { i8*, i32 } cleanup %4 = extractvalue { i8*, i32 } %3, 0 %5 = extractvalue { i8*, i32 } %3, 1 @@ -32,7 +32,7 @@ to label %ehcleanup unwind label %terminate.lpad.i.i16 terminate.lpad.i.i16: ; preds = %lpad5 - %6 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %6 = landingpad { i8*, i32 } catch i8* null tail call void @terminatev() noreturn nounwind unreachable @@ -45,7 +45,7 @@ to label %_ZN5SmartIPK10__CFStringED1Ev.exit unwind label %terminate.lpad.i.i terminate.lpad.i.i: ; preds = %ehcleanup - %8 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %8 = landingpad { i8*, i32 } catch i8* null tail call void @terminatev() noreturn nounwind unreachable @@ -90,7 +90,7 @@ @.str = private unnamed_addr constant [12 x i8] c"some_string\00", align 1 -define void @_Z4foo1c(i8 signext %a) { +define void @_Z4foo1c(i8 signext %a) personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) { entry: %s1 = alloca %"class.std::__1::basic_string", align 4 call void @_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm(%"class.std::__1::basic_string"* %s1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i32 0, i32 0), i32 11) @@ -131,14 +131,14 @@ ret void lpad.body: ; preds = %entry - %2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %2 = landingpad { i8*, i32 } cleanup %3 = extractvalue { i8*, i32 } %2, 0 %4 = extractvalue { i8*, i32 } %2, 1 br label %ehcleanup lpad2: ; preds = %invoke.cont - %5 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %5 = landingpad { i8*, i32 } cleanup %6 = extractvalue { i8*, i32 } %5, 0 %7 = extractvalue { i8*, i32 } %5, 1 @@ -161,7 +161,7 @@ resume { i8*, i32 } %lpad.val13 terminate.lpad: ; preds = %ehcleanup - %8 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %8 = landingpad { i8*, i32 } catch i8* null %9 = extractvalue { i8*, i32 } %8, 0 call void @__clang_call_terminate(i8* %9) Index: test/CodeGen/ARM/sjljehprepare-lower-empty-struct.ll =================================================================== --- test/CodeGen/ARM/sjljehprepare-lower-empty-struct.ll +++ test/CodeGen/ARM/sjljehprepare-lower-empty-struct.ll @@ -10,7 +10,7 @@ ; __Unwind_SjLj_Register and actual @bar invocation -define i8* @foo(i8 %a, {} %c) { +define i8* @foo(i8 %a, {} %c) personality i8* bitcast (i32 (...)* @baz to i8*) { entry: ; CHECK: bl __Unwind_SjLj_Register ; CHECK-NEXT: {{[A-Z][a-zA-Z0-9]*}}: @@ -22,7 +22,7 @@ unreachable handler: - %tmp = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @baz to i8*) + %tmp = landingpad { i8*, i32 } cleanup resume { i8*, i32 } undef } Index: test/CodeGen/Generic/2007-02-25-invoke.ll =================================================================== --- test/CodeGen/Generic/2007-02-25-invoke.ll +++ test/CodeGen/Generic/2007-02-25-invoke.ll @@ -3,12 +3,12 @@ ; PR1224 declare i32 @test() -define i32 @test2() { +define i32 @test2() personality i32 (...)* @__gxx_personality_v0 { %A = invoke i32 @test() to label %invcont unwind label %blat invcont: ret i32 %A blat: - %lpad = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + %lpad = landingpad { i8*, i32 } cleanup ret i32 0 } Index: test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll =================================================================== --- test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll +++ test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll @@ -7,7 +7,7 @@ %"struct.std::locale::facet" = type { i32 (...)**, i32 } %"struct.std::string" = type { %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Alloc_hider" } -define void @_ZNKSt6locale4nameEv(%"struct.std::string"* %agg.result) { +define void @_ZNKSt6locale4nameEv(%"struct.std::string"* %agg.result) personality i32 (...)* @__gxx_personality_v0 { entry: %tmp105 = icmp eq i8* null, null ; <i1> [#uses=1] br i1 %tmp105, label %cond_true, label %cond_true222 @@ -45,7 +45,7 @@ ret void cond_true1402: ; preds = %invcont282, %cond_false280, %cond_true235, %cond_true - %lpad = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + %lpad = landingpad { i8*, i32 } cleanup ret void } Index: test/CodeGen/Generic/2007-12-17-InvokeAsm.ll =================================================================== --- test/CodeGen/Generic/2007-12-17-InvokeAsm.ll +++ test/CodeGen/Generic/2007-12-17-InvokeAsm.ll @@ -1,6 +1,6 @@ ; RUN: llc -no-integrated-as < %s -define fastcc void @bc__support__high_resolution_time__initialize_clock_rate() { +define fastcc void @bc__support__high_resolution_time__initialize_clock_rate() personality i32 (...)* @__gxx_personality_v0 { entry: invoke void asm "rdtsc\0A\09movl %eax, $0\0A\09movl %edx, $1", "=*imr,=*imr,~{dirflag},~{fpsr},~{flags},~{dx},~{ax}"( i32* null, i32* null ) to label %.noexc unwind label %cleanup144 @@ -9,7 +9,7 @@ ret void cleanup144: ; preds = %entry - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup resume { i8*, i32 } %exn } Index: test/CodeGen/Generic/2007-12-31-UnusedSelector.ll =================================================================== --- test/CodeGen/Generic/2007-12-31-UnusedSelector.ll +++ test/CodeGen/Generic/2007-12-31-UnusedSelector.ll @@ -5,7 +5,7 @@ %struct.__type_info_pseudo = type { i8*, i8* } @_ZTI2e1 = external constant %struct.__class_type_info_pseudo ; <%struct.__class_type_info_pseudo*> [#uses=1] -define void @_Z7ex_testv() { +define void @_Z7ex_testv() personality i32 (...)* @__gxx_personality_v0 { entry: invoke void @__cxa_throw( i8* null, i8* bitcast (%struct.__class_type_info_pseudo* @_ZTI2e1 to i8*), void (i8*)* null ) noreturn to label %UnifiedUnreachableBlock unwind label %lpad @@ -14,13 +14,13 @@ unreachable lpad: ; preds = %entry - %lpad1 = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + %lpad1 = landingpad { i8*, i32 } catch i8* null invoke void @__cxa_end_catch( ) to label %bb14 unwind label %lpad17 lpad17: ; preds = %lpad - %lpad2 = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + %lpad2 = landingpad { i8*, i32 } catch i8* null unreachable Index: test/CodeGen/Generic/2009-11-16-BadKillsCrash.ll =================================================================== --- test/CodeGen/Generic/2009-11-16-BadKillsCrash.ll +++ test/CodeGen/Generic/2009-11-16-BadKillsCrash.ll @@ -19,7 +19,7 @@ declare %"struct.std::ctype<char>"* @_ZSt9use_facetISt5ctypeIcEERKT_RKSt6locale(%"struct.std::locale"*) -define %"struct.std::basic_istream<char,std::char_traits<char> >"* @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_PS3_(%"struct.std::basic_istream<char,std::char_traits<char> >"* %__in, i8* nocapture %__s) { +define %"struct.std::basic_istream<char,std::char_traits<char> >"* @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_PS3_(%"struct.std::basic_istream<char,std::char_traits<char> >"* %__in, i8* nocapture %__s) personality i32 (...)* @__gxx_personality_v0 { entry: %0 = invoke %"struct.std::ctype<char>"* @_ZSt9use_facetISt5ctypeIcEERKT_RKSt6locale(%"struct.std::locale"* undef) to label %invcont8 unwind label %lpad74 ; <%"struct.std::ctype<char>"*> [#uses=0] @@ -62,14 +62,14 @@ lpad: ; preds = %bb.i93, %invcont24, %bb1.i, %invcont8 %__extracted.1 = phi i32 [ 0, %invcont8 ], [ %2, %bb1.i ], [ undef, %bb.i93 ], [ undef, %invcont24 ] ; <i32> [#uses=0] - %lpad1 = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + %lpad1 = landingpad { i8*, i32 } catch i8* null %eh_ptr = extractvalue { i8*, i32 } %lpad1, 0 %6 = call i8* @__cxa_begin_catch(i8* %eh_ptr) nounwind ; <i8*> [#uses=0] unreachable lpad74: ; preds = %entry - %lpad2 = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + %lpad2 = landingpad { i8*, i32 } cleanup unreachable } Index: test/CodeGen/Generic/donothing.ll =================================================================== --- test/CodeGen/Generic/donothing.ll +++ test/CodeGen/Generic/donothing.ll @@ -5,7 +5,7 @@ declare void @llvm.donothing() readnone ; CHECK: f1 -define void @f1() nounwind uwtable ssp { +define void @f1() nounwind uwtable ssp personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: ; CHECK-NOT: donothing invoke void @llvm.donothing() @@ -15,7 +15,7 @@ ret void lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } filter [0 x i8*] zeroinitializer %1 = extractvalue { i8*, i32 } %0, 0 tail call void @__cxa_call_unexpected(i8* %1) noreturn nounwind Index: test/CodeGen/Generic/exception-handling.ll =================================================================== --- test/CodeGen/Generic/exception-handling.ll +++ test/CodeGen/Generic/exception-handling.ll @@ -2,7 +2,7 @@ ; PR10733 declare void @_Znam() -define void @_ZNK14gIndexOdometer15AfterExcisionOfERi() uwtable align 2 { +define void @_ZNK14gIndexOdometer15AfterExcisionOfERi() uwtable align 2 personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0 { _ZN6Gambit5ArrayIiEC2Ej.exit36: br label %"9" @@ -19,7 +19,7 @@ lpad27: ; preds = %"10", %"9" %0 = phi i32 [ undef, %"9" ], [ %tmp, %"10" ] - %1 = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0 + %1 = landingpad { i8*, i32 } cleanup resume { i8*, i32 } zeroinitializer } Index: test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll =================================================================== --- test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll +++ test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll @@ -2,7 +2,7 @@ ; XFAIL: hexagon declare { i64, double } @wild() -define void @foo(i64* %p, double* %q) nounwind { +define void @foo(i64* %p, double* %q) nounwind personality i32 (...)* @__gxx_personality_v0 { %t = invoke { i64, double } @wild() to label %normal unwind label %handler normal: @@ -13,7 +13,7 @@ ret void handler: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} catch i8* null ret void } Index: test/CodeGen/Mips/eh.ll =================================================================== --- test/CodeGen/Mips/eh.ll +++ test/CodeGen/Mips/eh.ll @@ -4,7 +4,7 @@ @g1 = global double 0.000000e+00, align 8 @_ZTId = external constant i8* -define void @_Z1fd(double %i2) { +define void @_Z1fd(double %i2) personality i32 (...)* @__gxx_personality_v0 { entry: ; CHECK-EL: addiu $sp, $sp ; CHECK-EL: .cfi_def_cfa_offset @@ -26,7 +26,7 @@ ; CHECK-EL: # %lpad ; CHECK-EL: bne $5 - %exn.val = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + %exn.val = landingpad { i8*, i32 } cleanup catch i8* bitcast (i8** @_ZTId to i8*) %exn = extractvalue { i8*, i32 } %exn.val, 0 Index: test/CodeGen/Mips/ehframe-indirect.ll =================================================================== --- test/CodeGen/Mips/ehframe-indirect.ll +++ test/CodeGen/Mips/ehframe-indirect.ll @@ -7,7 +7,7 @@ @_ZTISt9exception = external constant i8* -define i32 @main() { +define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { ; ALL: .cfi_startproc ; ALL: .cfi_personality 128, DW.ref.__gxx_personality_v0 @@ -17,8 +17,7 @@ ; ALL: jalr lpad: - %0 = landingpad { i8*, i32 } personality i8* - bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } catch i8* null catch i8* bitcast (i8** @_ZTISt9exception to i8*) ret i32 0 Index: test/CodeGen/Mips/insn-zero-size-bb.ll =================================================================== --- test/CodeGen/Mips/insn-zero-size-bb.ll +++ test/CodeGen/Mips/insn-zero-size-bb.ll @@ -8,7 +8,7 @@ declare i32 @foo(...) declare void @bar() -define void @main() { +define void @main() personality i8* bitcast (i32 (...)* @foo to i8*) { entry: invoke void @bar() #0 to label %unreachable unwind label %return @@ -19,7 +19,7 @@ unreachable return: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @foo to i8*) + %0 = landingpad { i8*, i32 } catch i8* null ret void } Index: test/CodeGen/Mips/mips16ex.ll =================================================================== --- test/CodeGen/Mips/mips16ex.ll +++ test/CodeGen/Mips/mips16ex.ll @@ -9,7 +9,7 @@ @_ZTIi = external constant i8* @.str1 = private unnamed_addr constant [15 x i8] c"exception %i \0A\00", align 1 -define i32 @main() { +define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: %retval = alloca i32, align 4 %exn.slot = alloca i8* @@ -24,7 +24,7 @@ to label %unreachable unwind label %lpad lpad: ; preds = %entry - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %1 = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %2 = extractvalue { i8*, i32 } %1, 0 store i8* %2, i8** %exn.slot @@ -56,7 +56,7 @@ ret i32 0 lpad1: ; preds = %catch - %8 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %8 = landingpad { i8*, i32 } cleanup %9 = extractvalue { i8*, i32 } %8, 0 store i8* %9, i8** %exn.slot Index: test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll =================================================================== --- test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll +++ test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll @@ -19,7 +19,7 @@ ; CHECK: .cfi_endproc -define void @Bork(i64 %range.0.0, i64 %range.0.1, i64 %size) { +define void @Bork(i64 %range.0.0, i64 %range.0.1, i64 %size) personality i32 (...)* @__gxx_personality_v0 { entry: %effectiveRange = alloca %struct.Range, align 8 ; <%struct.Range*> [#uses=2] %tmp4 = call i8* @llvm.stacksave() ; <i8*> [#uses=1] @@ -33,7 +33,7 @@ br label %bb30 unwind: ; preds = %cond_true, %entry - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} catch i8* null call void @llvm.stackrestore(i8* %tmp4) resume { i8*, i32 } %exn Index: test/CodeGen/PowerPC/extra-toc-reg-deps.ll =================================================================== --- test/CodeGen/PowerPC/extra-toc-reg-deps.ll +++ test/CodeGen/PowerPC/extra-toc-reg-deps.ll @@ -61,7 +61,7 @@ @.str28 = external unnamed_addr constant [7 x i8], align 1 @_ZN4Foam4PoutE = external global %"class.Foam::prefixOSstream.27", align 8 -define void @_ZN4Foam13checkTopologyERKNS_8polyMeshEbb(i1 zeroext %allTopology) #0 { +define void @_ZN4Foam13checkTopologyERKNS_8polyMeshEbb(i1 zeroext %allTopology) #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: br i1 undef, label %for.body, label %for.cond.cleanup @@ -124,7 +124,7 @@ to label %_ZN4Foam4wordC2EPKcb.exit unwind label %lpad.i lpad.i: ; preds = %_ZNK4Foam8ZoneMeshINS_9pointZoneENS_8polyMeshEE15checkDefinitionEb.exit - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } cleanup resume { i8*, i32 } %0 @@ -157,7 +157,7 @@ br i1 undef, label %if.then121, label %if.else lpad: ; preds = %_ZN4Foam4wordC2EPKcb.exit - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %1 = landingpad { i8*, i32 } cleanup br i1 undef, label %_ZNSsD2Ev.exit1578, label %if.then.i.i1570, !prof !1 @@ -181,7 +181,7 @@ to label %_ZN4Foam4wordC2EPKcb.exit1701 unwind label %lpad.i1689 lpad.i1689: ; preds = %if.else - %2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %2 = landingpad { i8*, i32 } cleanup unreachable @@ -200,12 +200,12 @@ unreachable lpad165: ; preds = %_ZN4Foam4wordC2EPKcb.exit1701 - %3 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %3 = landingpad { i8*, i32 } cleanup unreachable lpad175: ; preds = %invoke.cont169 - %4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %4 = landingpad { i8*, i32 } cleanup invoke void @_ZN4Foam8pointSetD1Ev() to label %eh.resume unwind label %terminate.lpad @@ -215,7 +215,7 @@ to label %_ZN4Foam4wordC2EPKcb.exit1777 unwind label %lpad.i1765 lpad.i1765: ; preds = %if.end213 - %5 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %5 = landingpad { i8*, i32 } cleanup br i1 undef, label %eh.resume.i1776, label %if.then.i.i.i1767, !prof !1 @@ -247,12 +247,12 @@ to label %invoke.cont243 unwind label %lpad230 lpad217: ; preds = %_ZN4Foam4wordC2EPKcb.exit1777 - %6 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %6 = landingpad { i8*, i32 } cleanup br label %eh.resume lpad230: ; preds = %invoke.cont231, %_ZNSsD2Ev.exit1792 - %7 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %7 = landingpad { i8*, i32 } cleanup invoke void @_ZN4Foam7faceSetD1Ev() to label %eh.resume unwind label %terminate.lpad @@ -262,7 +262,7 @@ to label %_ZN4Foam4wordC2EPKcb.exit1862 unwind label %lpad.i1850 lpad.i1850: ; preds = %invoke.cont243 - %8 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %8 = landingpad { i8*, i32 } cleanup unreachable @@ -283,7 +283,7 @@ unreachable lpad276: ; preds = %_ZN4Foam4wordC2EPKcb.exit1862 - %9 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %9 = landingpad { i8*, i32 } cleanup unreachable @@ -314,7 +314,7 @@ to label %if.end878 unwind label %lpad663 lpad663: ; preds = %invoke.cont670, %if.end660, %invoke.cont668, %invoke.cont674, %invoke.cont676 - %10 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %10 = landingpad { i8*, i32 } cleanup br i1 undef, label %_ZN4Foam4ListIiED2Ev.exit.i3073, label %delete.notnull.i.i3071 @@ -342,7 +342,7 @@ to label %_ZN4Foam4wordC2EPKcb.exit3098 unwind label %lpad.i3086 lpad.i3086: ; preds = %if.else888 - %11 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %11 = landingpad { i8*, i32 } cleanup unreachable @@ -371,7 +371,7 @@ unreachable lpad898: ; preds = %_ZN4Foam4wordC2EPKcb.exit3098 - %12 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %12 = landingpad { i8*, i32 } cleanup br i1 undef, label %_ZNSsD2Ev.exit3204, label %if.then.i.i3196, !prof !1 @@ -382,7 +382,7 @@ unreachable lpad905.loopexit.split-lp: ; preds = %call.i3116.noexc, %_ZNSsD2Ev.exit3113 - %lpad.loopexit.split-lp = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %lpad.loopexit.split-lp = landingpad { i8*, i32 } cleanup invoke void @_ZN4Foam8pointSetD1Ev() to label %eh.resume unwind label %terminate.lpad @@ -391,7 +391,7 @@ resume { i8*, i32 } undef terminate.lpad: ; preds = %_ZN4Foam4ListIiED2Ev.exit.i3073, %lpad230, %lpad175, %lpad905.loopexit.split-lp - %13 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %13 = landingpad { i8*, i32 } catch i8* null unreachable } Index: test/CodeGen/PowerPC/fast-isel-icmp-split.ll =================================================================== --- test/CodeGen/PowerPC/fast-isel-icmp-split.ll +++ test/CodeGen/PowerPC/fast-isel-icmp-split.ll @@ -9,7 +9,7 @@ %"class.boost::serialization::extended_type_info.129.150" = type { i32 (...)**, i32, i8* } ; Function Attrs: noinline -define void @_ZN5boost13serialization18extended_type_info4findEPKc() #0 align 2 { +define void @_ZN5boost13serialization18extended_type_info4findEPKc() #0 align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: br i1 undef, label %cond.true, label %cond.false @@ -42,7 +42,7 @@ br label %cleanup lpad: ; preds = %cond.end - %2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %2 = landingpad { i8*, i32 } cleanup br label %eh.resume Index: test/CodeGen/PowerPC/glob-comp-aa-crash.ll =================================================================== --- test/CodeGen/PowerPC/glob-comp-aa-crash.ll +++ test/CodeGen/PowerPC/glob-comp-aa-crash.ll @@ -17,7 +17,7 @@ declare i32 @__gxx_personality_v0(...) ; Function Attrs: optsize -define void @_ZNSt3__117__assoc_sub_state4copyEv(%"class.std::__1::__assoc_sub_state"* %this) #0 align 2 { +define void @_ZNSt3__117__assoc_sub_state4copyEv(%"class.std::__1::__assoc_sub_state"* %this) #0 align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: %__lk = alloca %"class.std::__1::unique_lock", align 8 %ref.tmp = alloca %"class.std::__exception_ptr::exception_ptr", align 8 @@ -50,14 +50,14 @@ unreachable lpad: ; preds = %entry - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %1 = landingpad { i8*, i32 } cleanup %2 = extractvalue { i8*, i32 } %1, 0 %3 = extractvalue { i8*, i32 } %1, 1 br label %ehcleanup lpad3: ; preds = %if.then - %4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %4 = landingpad { i8*, i32 } cleanup %5 = extractvalue { i8*, i32 } %4, 0 %6 = extractvalue { i8*, i32 } %4, 1 Index: test/CodeGen/PowerPC/pr18663-2.ll =================================================================== --- test/CodeGen/PowerPC/pr18663-2.ll +++ test/CodeGen/PowerPC/pr18663-2.ll @@ -46,7 +46,7 @@ ; Function Attrs: inlinehint declare void @_ZN4Foam8fileName12stripInvalidEv() #2 align 2 -define void @_ZN4Foam3CSVINS_6VectorIdEEE4readEv() #0 align 2 { +define void @_ZN4Foam3CSVINS_6VectorIdEEE4readEv() #0 align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @_ZN4Foam6string6expandEb() to label %invoke.cont unwind label %lpad @@ -66,7 +66,7 @@ to label %invoke.cont2 unwind label %lpad.i lpad.i: ; preds = %_ZN4Foam6stringC2ERKS0_.exit.i - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } cleanup br label %ehcleanup142 @@ -90,17 +90,17 @@ to label %if.end unwind label %lpad5 lpad: ; preds = %if.then.i.i.i.i176, %entry - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %1 = landingpad { i8*, i32 } cleanup br label %ehcleanup142 lpad3: ; preds = %invoke.cont2 - %2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %2 = landingpad { i8*, i32 } cleanup br label %ehcleanup142 lpad5: ; preds = %memptr.end.i, %invoke.cont8, %if.then - %3 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %3 = landingpad { i8*, i32 } cleanup br label %ehcleanup142 @@ -119,12 +119,12 @@ unreachable lpad.i.i.i: ; preds = %.noexc205 - %4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %4 = landingpad { i8*, i32 } cleanup br label %ehcleanup142 lpad19: ; preds = %for.body - %5 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %5 = landingpad { i8*, i32 } cleanup br label %ehcleanup142 Index: test/CodeGen/PowerPC/preincprep-invoke.ll =================================================================== --- test/CodeGen/PowerPC/preincprep-invoke.ll +++ test/CodeGen/PowerPC/preincprep-invoke.ll @@ -11,7 +11,7 @@ declare i32 @__gxx_personality_v0(...) -define void @_Z11GetPasswordP13CStdOutStreamb() { +define void @_Z11GetPasswordP13CStdOutStreamb() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: br label %for.cond.i.i @@ -41,7 +41,7 @@ br label %for.cond.i.i30 lpad: ; preds = %invoke.cont4, %invoke.cont, %_ZN11CStringBaseIcEC2EPKc.exit.critedge - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %1 = landingpad { i8*, i32 } cleanup resume { i8*, i32 } undef } Index: test/CodeGen/SPARC/exception.ll =================================================================== --- test/CodeGen/SPARC/exception.ll +++ test/CodeGen/SPARC/exception.ll @@ -71,7 +71,7 @@ ; V9PIC: .L_ZTIi.DW.stub: ; V9PIC-NEXT: .xword _ZTIi -define i32 @main(i32 %argc, i8** nocapture readnone %argv) unnamed_addr #0 { +define i32 @main(i32 %argc, i8** nocapture readnone %argv) unnamed_addr #0 personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0 { entry: %0 = icmp eq i32 %argc, 2 %1 = tail call i8* @__cxa_allocate_exception(i32 4) #1 @@ -102,7 +102,7 @@ ret i32 %6 "8": ; preds = %"4", %"3" - %exc = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0 + %exc = landingpad { i8*, i32 } catch %struct.__fundamental_type_info_pseudo* @_ZTIi catch %struct.__fundamental_type_info_pseudo* @_ZTIf %exc_ptr12 = extractvalue { i8*, i32 } %exc, 0 Index: test/CodeGen/Thumb/sjljehprepare-lower-vector.ll =================================================================== --- test/CodeGen/Thumb/sjljehprepare-lower-vector.ll +++ test/CodeGen/Thumb/sjljehprepare-lower-vector.ll @@ -4,7 +4,7 @@ target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32-S32" target triple = "thumbv7-apple-ios" -define i8* @foo(<4 x i32> %c) { +define i8* @foo(<4 x i32> %c) personality i8* bitcast (i32 (...)* @baz to i8*) { entry: invoke void @bar () to label %unreachable unwind label %handler @@ -13,7 +13,7 @@ unreachable handler: - %tmp = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @baz to i8*) + %tmp = landingpad { i8*, i32 } cleanup resume { i8*, i32 } undef } Index: test/CodeGen/Thumb2/constant-islands.ll =================================================================== --- test/CodeGen/Thumb2/constant-islands.ll +++ test/CodeGen/Thumb2/constant-islands.ll @@ -76,7 +76,7 @@ declare %class.btMatrix3x3* @_ZN11btTransform8getBasisEv(%class.btTransform*) nounwind inlinehint ssp align 2 -define %class.RagDoll* @_ZN7RagDollC2EP15btDynamicsWorldRK9btVector3f(%class.RagDoll* %this, %class.btDynamicsWorld* %ownerWorld, %class.btVector3* %positionOffset, float %scale) unnamed_addr ssp align 2 { +define %class.RagDoll* @_ZN7RagDollC2EP15btDynamicsWorldRK9btVector3f(%class.RagDoll* %this, %class.btDynamicsWorld* %ownerWorld, %class.btVector3* %positionOffset, float %scale) unnamed_addr ssp align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) { entry: %retval = alloca %class.RagDoll*, align 4 %this.addr = alloca %class.RagDoll*, align 4 @@ -635,7 +635,7 @@ br label %for.cond lpad: ; preds = %entry - %67 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %67 = landingpad { i8*, i32 } cleanup %68 = extractvalue { i8*, i32 } %67, 0 store i8* %68, i8** %exn.slot @@ -648,7 +648,7 @@ br label %eh.resume lpad8: ; preds = %invoke.cont - %70 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %70 = landingpad { i8*, i32 } cleanup %71 = extractvalue { i8*, i32 } %70, 0 store i8* %71, i8** %exn.slot @@ -661,7 +661,7 @@ br label %eh.resume lpad17: ; preds = %invoke.cont9 - %73 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %73 = landingpad { i8*, i32 } cleanup %74 = extractvalue { i8*, i32 } %73, 0 store i8* %74, i8** %exn.slot @@ -674,7 +674,7 @@ br label %eh.resume lpad26: ; preds = %invoke.cont18 - %76 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %76 = landingpad { i8*, i32 } cleanup %77 = extractvalue { i8*, i32 } %76, 0 store i8* %77, i8** %exn.slot @@ -687,7 +687,7 @@ br label %eh.resume lpad35: ; preds = %invoke.cont27 - %79 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %79 = landingpad { i8*, i32 } cleanup %80 = extractvalue { i8*, i32 } %79, 0 store i8* %80, i8** %exn.slot @@ -700,7 +700,7 @@ br label %eh.resume lpad44: ; preds = %invoke.cont36 - %82 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %82 = landingpad { i8*, i32 } cleanup %83 = extractvalue { i8*, i32 } %82, 0 store i8* %83, i8** %exn.slot @@ -713,7 +713,7 @@ br label %eh.resume lpad53: ; preds = %invoke.cont45 - %85 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %85 = landingpad { i8*, i32 } cleanup %86 = extractvalue { i8*, i32 } %85, 0 store i8* %86, i8** %exn.slot @@ -726,7 +726,7 @@ br label %eh.resume lpad62: ; preds = %invoke.cont54 - %88 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %88 = landingpad { i8*, i32 } cleanup %89 = extractvalue { i8*, i32 } %88, 0 store i8* %89, i8** %exn.slot @@ -739,7 +739,7 @@ br label %eh.resume lpad71: ; preds = %invoke.cont63 - %91 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %91 = landingpad { i8*, i32 } cleanup %92 = extractvalue { i8*, i32 } %91, 0 store i8* %92, i8** %exn.slot @@ -752,7 +752,7 @@ br label %eh.resume lpad80: ; preds = %invoke.cont72 - %94 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %94 = landingpad { i8*, i32 } cleanup %95 = extractvalue { i8*, i32 } %94, 0 store i8* %95, i8** %exn.slot @@ -765,7 +765,7 @@ br label %eh.resume lpad89: ; preds = %invoke.cont81 - %97 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %97 = landingpad { i8*, i32 } cleanup %98 = extractvalue { i8*, i32 } %97, 0 store i8* %98, i8** %exn.slot @@ -1264,7 +1264,7 @@ ret %class.RagDoll* %200 lpad258: ; preds = %for.end - %201 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %201 = landingpad { i8*, i32 } cleanup %202 = extractvalue { i8*, i32 } %201, 0 store i8* %202, i8** %exn.slot @@ -1274,7 +1274,7 @@ br label %eh.resume lpad284: ; preds = %invoke.cont259 - %204 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %204 = landingpad { i8*, i32 } cleanup %205 = extractvalue { i8*, i32 } %204, 0 store i8* %205, i8** %exn.slot @@ -1284,7 +1284,7 @@ br label %eh.resume lpad313: ; preds = %invoke.cont285 - %207 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %207 = landingpad { i8*, i32 } cleanup %208 = extractvalue { i8*, i32 } %207, 0 store i8* %208, i8** %exn.slot @@ -1294,7 +1294,7 @@ br label %eh.resume lpad342: ; preds = %invoke.cont314 - %210 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %210 = landingpad { i8*, i32 } cleanup %211 = extractvalue { i8*, i32 } %210, 0 store i8* %211, i8** %exn.slot @@ -1304,7 +1304,7 @@ br label %eh.resume lpad371: ; preds = %invoke.cont343 - %213 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %213 = landingpad { i8*, i32 } cleanup %214 = extractvalue { i8*, i32 } %213, 0 store i8* %214, i8** %exn.slot @@ -1314,7 +1314,7 @@ br label %eh.resume lpad400: ; preds = %invoke.cont372 - %216 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %216 = landingpad { i8*, i32 } cleanup %217 = extractvalue { i8*, i32 } %216, 0 store i8* %217, i8** %exn.slot @@ -1324,7 +1324,7 @@ br label %eh.resume lpad429: ; preds = %invoke.cont401 - %219 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %219 = landingpad { i8*, i32 } cleanup %220 = extractvalue { i8*, i32 } %219, 0 store i8* %220, i8** %exn.slot @@ -1334,7 +1334,7 @@ br label %eh.resume lpad458: ; preds = %invoke.cont430 - %222 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %222 = landingpad { i8*, i32 } cleanup %223 = extractvalue { i8*, i32 } %222, 0 store i8* %223, i8** %exn.slot @@ -1344,7 +1344,7 @@ br label %eh.resume lpad487: ; preds = %invoke.cont459 - %225 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %225 = landingpad { i8*, i32 } cleanup %226 = extractvalue { i8*, i32 } %225, 0 store i8* %226, i8** %exn.slot @@ -1354,7 +1354,7 @@ br label %eh.resume lpad516: ; preds = %invoke.cont488 - %228 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %228 = landingpad { i8*, i32 } cleanup %229 = extractvalue { i8*, i32 } %228, 0 store i8* %229, i8** %exn.slot @@ -1371,7 +1371,7 @@ resume { i8*, i32 } %lpad.val526 terminate.lpad: ; preds = %lpad89, %lpad80, %lpad71, %lpad62, %lpad53, %lpad44, %lpad35, %lpad26, %lpad17, %lpad8, %lpad - %231 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %231 = landingpad { i8*, i32 } catch i8* null call void @_ZSt9terminatev() noreturn nounwind unreachable Index: test/CodeGen/WinEH/cppeh-alloca-sink.ll =================================================================== --- test/CodeGen/WinEH/cppeh-alloca-sink.ll +++ test/CodeGen/WinEH/cppeh-alloca-sink.ll @@ -51,7 +51,7 @@ @llvm.eh.handlertype.H.0 = private unnamed_addr constant %eh.CatchHandlerType { i32 0, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*) }, section "llvm.metadata" ; Function Attrs: uwtable -define void @sink_alloca_to_catch() #0 { +define void @sink_alloca_to_catch() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %0 = alloca i32 %only_used_in_catch = alloca i32, align 4 @@ -59,7 +59,7 @@ to label %try.cont unwind label %lpad lpad: ; preds = %entry - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %1 = landingpad { i8*, i32 } catch %eh.CatchHandlerType* @llvm.eh.handlertype.H.0 %2 = extractvalue { i8*, i32 } %1, 1 %3 = tail call i32 @llvm.eh.typeid.for(i8* bitcast (%eh.CatchHandlerType* @llvm.eh.handlertype.H.0 to i8*)) #3 @@ -86,7 +86,7 @@ declare void @use_catch_var(i32*) #1 ; Function Attrs: uwtable -define void @dont_sink_alloca_to_catch(i32 %n) #0 { +define void @dont_sink_alloca_to_catch(i32 %n) #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %0 = alloca i32 %n.addr = alloca i32, align 4 @@ -109,7 +109,7 @@ br label %try.cont lpad: ; preds = %while.body - %2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %2 = landingpad { i8*, i32 } catch i8* bitcast (%eh.CatchHandlerType* @llvm.eh.handlertype.H.0 to i8*) %3 = extractvalue { i8*, i32 } %2, 0 store i8* %3, i8** %exn.slot @@ -141,7 +141,7 @@ br label %while.cond lpad1: ; preds = %catch - %8 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %8 = landingpad { i8*, i32 } cleanup %9 = extractvalue { i8*, i32 } %8, 0 store i8* %9, i8** %exn.slot Index: test/CodeGen/WinEH/cppeh-catch-all.ll =================================================================== --- test/CodeGen/WinEH/cppeh-catch-all.ll +++ test/CodeGen/WinEH/cppeh-catch-all.ll @@ -25,7 +25,7 @@ ; CHECK: to label %invoke.cont unwind label %[[LPAD_LABEL:lpad[0-9]*]] ; Function Attrs: uwtable -define void @_Z4testv() #0 { +define void @_Z4testv() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %exn.slot = alloca i8* %ehselector.slot = alloca i32 @@ -36,13 +36,13 @@ br label %try.cont ; CHECK: [[LPAD_LABEL]]:{{[ ]+}}; preds = %entry -; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) +; CHECK: landingpad { i8*, i32 } ; CHECK-NEXT: catch i8* null ; CHECK-NEXT: [[RECOVER:\%.+]] = call i8* (...) @llvm.eh.actions(i32 1, i8* null, i32 -1, i8* (i8*, i8*)* @_Z4testv.catch) ; CHECK-NEXT: indirectbr i8* [[RECOVER]], [label %try.cont] lpad: ; preds = %entry - %tmp = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %tmp = landingpad { i8*, i32 } catch i8* null %tmp1 = extractvalue { i8*, i32 } %tmp, 0 store i8* %tmp1, i8** %exn.slot Index: test/CodeGen/WinEH/cppeh-catch-and-throw.ll =================================================================== --- test/CodeGen/WinEH/cppeh-catch-and-throw.ll +++ test/CodeGen/WinEH/cppeh-catch-and-throw.ll @@ -50,7 +50,7 @@ ; CHECK: } ; Function Attrs: uwtable -define void @"\01?test@@YAXXZ"() #0 { +define void @"\01?test@@YAXXZ"() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %o = alloca %class.Obj, align 1 %tmp = alloca i32, align 4 @@ -62,7 +62,7 @@ to label %unreachable unwind label %lpad lpad: ; preds = %entry - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %1 = landingpad { i8*, i32 } catch i8* null %2 = extractvalue { i8*, i32 } %1, 0 store i8* %2, i8** %exn.slot @@ -78,7 +78,7 @@ to label %unreachable unwind label %lpad1 lpad1: ; preds = %catch - %4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %4 = landingpad { i8*, i32 } cleanup %5 = extractvalue { i8*, i32 } %4, 0 store i8* %5, i8** %exn.slot @@ -113,7 +113,7 @@ ; CHECK: [[SPLIT_LABEL]] ; ; CHECK: [[LPAD_LABEL]] -; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) +; CHECK: landingpad { i8*, i32 } ; CHECK: cleanup ; CHECK: unreachable ; CHECK: } Index: test/CodeGen/WinEH/cppeh-catch-scalar.ll =================================================================== --- test/CodeGen/WinEH/cppeh-catch-scalar.ll +++ test/CodeGen/WinEH/cppeh-catch-scalar.ll @@ -29,7 +29,7 @@ ; CHECK: to label %invoke.cont unwind label %[[LPAD_LABEL:lpad[0-9]*]] ; Function Attrs: uwtable -define void @_Z4testv() #0 { +define void @_Z4testv() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %exn.slot = alloca i8* %ehselector.slot = alloca i32 @@ -41,13 +41,13 @@ br label %try.cont ; CHECK: [[LPAD_LABEL]]:{{[ ]+}}; preds = %entry -; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) +; CHECK: landingpad { i8*, i32 } ; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIi to i8*) ; CHECK-NEXT: [[RECOVER:\%.+]] = call i8* (...) @llvm.eh.actions(i32 1, i8* bitcast (i8** @_ZTIi to i8*), i32 0, i8* (i8*, i8*)* @_Z4testv.catch) ; CHECK-NEXT: indirectbr i8* [[RECOVER]], [label %try.cont] lpad: ; preds = %entry - %tmp = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %tmp = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %tmp1 = extractvalue { i8*, i32 } %tmp, 0 store i8* %tmp1, i8** %exn.slot Index: test/CodeGen/WinEH/cppeh-catch-unwind.ll =================================================================== --- test/CodeGen/WinEH/cppeh-catch-unwind.ll +++ test/CodeGen/WinEH/cppeh-catch-unwind.ll @@ -31,7 +31,7 @@ @"\01??_R0H@8" = linkonce_odr global %rtti.TypeDescriptor2 { i8** @"\01??_7type_info@@6B@", i8* null, [3 x i8] c".H\00" }, comdat -; CHECK-LABEL: define void @"\01?test@@YAXXZ"() #0 { +; CHECK-LABEL: define void @"\01?test@@YAXXZ"() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { ; CHECK: entry: ; CHECK: [[OBJ_PTR:\%.+]] = alloca %class.SomeClass ; CHECK: [[TMP0:\%.+]] = alloca i32, align 4 @@ -41,7 +41,7 @@ ; CHECK: to label %invoke.cont unwind label %[[LPAD_LABEL:lpad[0-9]*]] ; Function Attrs: uwtable -define void @"\01?test@@YAXXZ"() #0 { +define void @"\01?test@@YAXXZ"() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %obj = alloca %class.SomeClass, align 1 %0 = alloca i32, align 4 @@ -66,27 +66,27 @@ to label %try.cont unwind label %lpad3 ; CHECK: [[LPAD_LABEL]]:{{[ ]+}}; preds = %entry -; CHECK: [[LPAD_VAL:\%.+]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) +; CHECK: [[LPAD_VAL:\%.+]] = landingpad { i8*, i32 } ; CHECK-NEXT: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*) ; CHECK-NEXT: [[RECOVER:\%.+]] = call i8* (...) @llvm.eh.actions(i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*), i32 0, i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch") ; CHECK-NEXT: indirectbr i8* [[RECOVER]], [label %try.cont15] lpad: ; preds = %entry - %2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %2 = landingpad { i8*, i32 } catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*) %3 = extractvalue { i8*, i32 } %2, 0 %4 = extractvalue { i8*, i32 } %2, 1 br label %catch.dispatch7 ; CHECK: [[LPAD1_LABEL]]:{{[ ]+}}; preds = %invoke.cont -; CHECK: [[LPAD1_VAL:\%.+]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) +; CHECK: [[LPAD1_VAL:\%.+]] = landingpad { i8*, i32 } ; CHECK-NEXT: cleanup ; CHECK-NEXT: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*) ; CHECK-NEXT: [[RECOVER1:\%.+]] = call i8* (...) @llvm.eh.actions(i32 0, void (i8*, i8*)* @"\01?test@@YAXXZ.cleanup", i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*), i32 0, i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch") ; CHECK-NEXT: indirectbr i8* [[RECOVER1]], [label %try.cont15] lpad1: ; preds = %invoke.cont - %5 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %5 = landingpad { i8*, i32 } cleanup catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*) %6 = extractvalue { i8*, i32 } %5, 0 @@ -94,14 +94,14 @@ br label %ehcleanup ; CHECK: [[LPAD3_LABEL]]:{{[ ]+}}; preds = %invoke.cont2 -; CHECK: [[LPAD3_VAL:\%.+]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) +; CHECK: [[LPAD3_VAL:\%.+]] = landingpad { i8*, i32 } ; CHECK-NEXT: cleanup ; CHECK-NEXT: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*) ; CHECK-NEXT: [[RECOVER3:\%.+]] = call i8* (...) @llvm.eh.actions(i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*), i32 2, i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch.1", i32 0, void (i8*, i8*)* @"\01?test@@YAXXZ.cleanup") ; CHECK-NEXT: indirectbr i8* [[RECOVER3]], [label %try.cont, label %try.cont15] lpad3: ; preds = %invoke.cont2 - %8 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %8 = landingpad { i8*, i32 } cleanup catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*) %9 = extractvalue { i8*, i32 } %8, 0 @@ -128,7 +128,7 @@ ; CHECK-NOT: lpad5: lpad5: ; preds = %catch - %13 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %13 = landingpad { i8*, i32 } cleanup catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*) %14 = extractvalue { i8*, i32 } %13, 0 @@ -202,7 +202,7 @@ ; CHECK: ret i8* blockaddress(@"\01?test@@YAXXZ", %try.cont) ; ; CHECK: [[LPAD5_LABEL]]:{{[ ]+}}; preds = %entry -; CHECK: [[LPAD5_VAL:\%.+]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) +; CHECK: [[LPAD5_VAL:\%.+]] = landingpad { i8*, i32 } ; CHECK: cleanup ; CHECK: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*) ; CHECK: } Index: test/CodeGen/WinEH/cppeh-cleanup-invoke.ll =================================================================== --- test/CodeGen/WinEH/cppeh-cleanup-invoke.ll +++ test/CodeGen/WinEH/cppeh-cleanup-invoke.ll @@ -26,7 +26,7 @@ @"\01??_R0H@8" = linkonce_odr global %rtti.TypeDescriptor2 { i8** @"\01??_7type_info@@6B@", i8* null, [3 x i8] c".H\00" }, comdat @llvm.eh.handlertype.H.0 = private unnamed_addr constant %eh.CatchHandlerType { i32 0, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*) }, section "llvm.metadata" -define i32 @main() { +define i32 @main() personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %o = alloca %struct.HasDtor, align 1 invoke void @may_throw() @@ -37,14 +37,14 @@ br label %try.cont lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %0 = landingpad { i8*, i32 } catch %eh.CatchHandlerType* @llvm.eh.handlertype.H.0 %1 = extractvalue { i8*, i32 } %0, 0 %2 = extractvalue { i8*, i32 } %0, 1 br label %catch.dispatch lpad1: ; preds = %invoke.cont - %3 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %3 = landingpad { i8*, i32 } cleanup catch %eh.CatchHandlerType* @llvm.eh.handlertype.H.0 %4 = extractvalue { i8*, i32 } %3, 0 Index: test/CodeGen/WinEH/cppeh-demote-liveout.ll =================================================================== --- test/CodeGen/WinEH/cppeh-demote-liveout.ll +++ test/CodeGen/WinEH/cppeh-demote-liveout.ll @@ -19,14 +19,14 @@ @typeinfo.int = external global i32 -define i32 @liveout_catch(i32 %p) { +define i32 @liveout_catch(i32 %p) personality i32 (...)* @__CxxFrameHandler3 { entry: %val.entry = add i32 %p, 1 invoke void @might_throw() to label %ret unwind label %lpad lpad: - %ehvals = landingpad { i8*, i32 } personality i32 (...)* @__CxxFrameHandler3 + %ehvals = landingpad { i8*, i32 } cleanup catch i32* @typeinfo.int %ehptr = extractvalue { i8*, i32 } %ehvals, 0 Index: test/CodeGen/WinEH/cppeh-frame-vars.ll =================================================================== --- test/CodeGen/WinEH/cppeh-frame-vars.ll +++ test/CodeGen/WinEH/cppeh-frame-vars.ll @@ -62,7 +62,7 @@ ; CHECK: br label %for.cond ; Function Attrs: uwtable -define void @"\01?test@@YAXXZ"() #0 { +define void @"\01?test@@YAXXZ"() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %NumExceptions = alloca i32, align 4 %ExceptionVal = alloca [10 x i32], align 16 @@ -99,13 +99,13 @@ br label %try.cont ; CHECK: [[LPAD_LABEL]]:{{[ ]+}}; preds = %for.body -; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) +; CHECK: landingpad { i8*, i32 } ; CHECK-NEXT: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*) ; CHECK-NEXT: [[RECOVER:\%.+]] = call i8* (...) @llvm.eh.actions(i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*), i32 0, i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch") ; CHECK-NEXT: indirectbr i8* [[RECOVER]], [label %try.cont] lpad: ; preds = %for.body - %tmp4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %tmp4 = landingpad { i8*, i32 } catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*) %tmp5 = extractvalue { i8*, i32 } %tmp4, 0 store i8* %tmp5, i8** %exn.slot Index: test/CodeGen/WinEH/cppeh-inalloca.ll =================================================================== --- test/CodeGen/WinEH/cppeh-inalloca.ll +++ test/CodeGen/WinEH/cppeh-inalloca.ll @@ -45,7 +45,7 @@ ; CHECK: invoke void @"\01?may_throw@@YAXXZ"() ; CHECK: to label %invoke.cont unwind label %[[LPAD_LABEL:lpad[0-9]*]] -define i32 @"\01?test@@YAHUA@@@Z"(<{ %struct.A }>* inalloca) #0 { +define i32 @"\01?test@@YAHUA@@@Z"(<{ %struct.A }>* inalloca) #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %retval = alloca i32, align 4 %exn.slot = alloca i8* @@ -59,14 +59,14 @@ br label %try.cont ; CHECK: [[LPAD_LABEL]]:{{[ ]+}}; preds = %entry -; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) +; CHECK: landingpad { i8*, i32 } ; CHECK-NEXT: cleanup ; CHECK-NEXT: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*) ; CHECK-NEXT: [[RECOVER:\%recover.*]] = call i8* (...) @llvm.eh.actions(i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*), i32 0, i8* (i8*, i8*)* @"\01?test@@YAHUA@@@Z.catch", i32 0, void (i8*, i8*)* @"\01?test@@YAHUA@@@Z.cleanup") ; CHECK-NEXT: indirectbr i8* [[RECOVER]], [label %cleanup] lpad: ; preds = %entry - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %1 = landingpad { i8*, i32 } cleanup catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*) %2 = extractvalue { i8*, i32 } %1, 0 Index: test/CodeGen/WinEH/cppeh-min-unwind.ll =================================================================== --- test/CodeGen/WinEH/cppeh-min-unwind.ll +++ test/CodeGen/WinEH/cppeh-min-unwind.ll @@ -30,7 +30,7 @@ ; CHECK: to label %invoke.cont unwind label %[[LPAD_LABEL:lpad[0-9]*]] ; Function Attrs: uwtable -define void @_Z4testv() #0 { +define void @_Z4testv() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %obj = alloca %class.SomeClass, align 4 %exn.slot = alloca i8* @@ -44,13 +44,13 @@ ret void ; CHECK: [[LPAD_LABEL]]:{{[ ]+}}; preds = %entry -; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) +; CHECK: landingpad { i8*, i32 } ; CHECK-NEXT: cleanup ; CHECK-NEXT: [[RECOVER:\%.+]] = call i8* (...) @llvm.eh.actions(i32 0, void (i8*, i8*)* @_Z4testv.cleanup) ; CHECK-NEXT: indirectbr i8* [[RECOVER]], [] lpad: ; preds = %entry - %tmp = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %tmp = landingpad { i8*, i32 } cleanup %tmp1 = extractvalue { i8*, i32 } %tmp, 0 store i8* %tmp1, i8** %exn.slot Index: test/CodeGen/WinEH/cppeh-mixed-catch-and-cleanup.ll =================================================================== --- test/CodeGen/WinEH/cppeh-mixed-catch-and-cleanup.ll +++ test/CodeGen/WinEH/cppeh-mixed-catch-and-cleanup.ll @@ -35,7 +35,7 @@ ; CHECK: } ; Function Attrs: nounwind uwtable -define void @"\01?test@@YAXXZ"() #0 { +define void @"\01?test@@YAXXZ"() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %o = alloca %class.Obj, align 1 %exn.slot = alloca i8* @@ -48,7 +48,7 @@ br label %try.cont lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %0 = landingpad { i8*, i32 } catch i8* null %1 = extractvalue { i8*, i32 } %0, 0 store i8* %1, i8** %exn.slot Index: test/CodeGen/WinEH/cppeh-multi-catch.ll =================================================================== --- test/CodeGen/WinEH/cppeh-multi-catch.ll +++ test/CodeGen/WinEH/cppeh-multi-catch.ll @@ -45,7 +45,7 @@ @"llvm.eh.handlermapentry.reference.?AVSomeClass@@" = private unnamed_addr constant %eh.HandlerMapEntry { i32 8, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor15* @"\01??_R0?AVSomeClass@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, section "llvm.metadata" -; CHECK: define void @"\01?test@@YAXXZ"() #0 { +; CHECK: define void @"\01?test@@YAXXZ"() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { ; CHECK: entry: ; CHECK: [[OBJ_PTR:\%.+]] = alloca %class.SomeClass*, align 8 ; CHECK: [[LL_PTR:\%.+]] = alloca i64, align 8 @@ -55,7 +55,7 @@ ; CHECK: to label %invoke.cont unwind label %[[LPAD_LABEL:lpad[0-9]*]] ; Function Attrs: uwtable -define void @"\01?test@@YAXXZ"() #0 { +define void @"\01?test@@YAXXZ"() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %exn.slot = alloca i8* %ehselector.slot = alloca i32 @@ -69,7 +69,7 @@ br label %try.cont ; CHECK: [[LPAD_LABEL]]:{{[ ]+}}; preds = %entry -; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) +; CHECK: landingpad { i8*, i32 } ; CHECK-NEXT: catch %eh.HandlerMapEntry* @llvm.eh.handlermapentry.H ; CHECK-NEXT: catch %eh.HandlerMapEntry* @llvm.eh.handlermapentry._J ; CHECK-NEXT: catch %eh.HandlerMapEntry* @"llvm.eh.handlermapentry.reference.?AVSomeClass@@" @@ -82,7 +82,7 @@ ; CHECK-NEXT: indirectbr i8* [[RECOVER]], [label %ret] lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %0 = landingpad { i8*, i32 } catch %eh.HandlerMapEntry* @llvm.eh.handlermapentry.H catch %eh.HandlerMapEntry* @llvm.eh.handlermapentry._J catch %eh.HandlerMapEntry* @"llvm.eh.handlermapentry.reference.?AVSomeClass@@" Index: test/CodeGen/WinEH/cppeh-nested-1.ll =================================================================== --- test/CodeGen/WinEH/cppeh-nested-1.ll +++ test/CodeGen/WinEH/cppeh-nested-1.ll @@ -39,7 +39,7 @@ ; CHECK: to label %invoke.cont unwind label %[[LPAD_LABEL:lpad[0-9]*]] ; Function Attrs: uwtable -define void @"\01?test@@YAXXZ"() #0 { +define void @"\01?test@@YAXXZ"() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %exn.slot = alloca i8* %ehselector.slot = alloca i32 @@ -52,14 +52,14 @@ br label %try.cont ; CHECK: [[LPAD_LABEL]]: -; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) +; CHECK: landingpad { i8*, i32 } ; CHECK: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*) ; CHECK: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M@8" to i8*) ; CHECK: [[RECOVER:\%.+]] = call i8* (...) @llvm.eh.actions(i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*), i32 1, i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch.1", i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M@8" to i8*), i32 0, i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch") ; CHECK: indirectbr i8* [[RECOVER]], [label %try.cont, label %try.cont10] lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %0 = landingpad { i8*, i32 } catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*) catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M@8" to i8*) %1 = extractvalue { i8*, i32 } %0, 0 @@ -94,7 +94,7 @@ ; CHECK-NOT: lpad1: lpad1: ; preds = %catch - %6 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %6 = landingpad { i8*, i32 } catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M@8" to i8*) %7 = extractvalue { i8*, i32 } %6, 0 store i8* %7, i8** %exn.slot @@ -155,7 +155,7 @@ ; CHECK: ret i8* blockaddress(@"\01?test@@YAXXZ", %try.cont) ; ; CHECK: [[LPAD1_LABEL]]:{{[ ]+}}; preds = %entry -; CHECK: [[LPAD1_VAL:\%.+]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) +; CHECK: [[LPAD1_VAL:\%.+]] = landingpad { i8*, i32 } ; CHECK: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M@8" to i8*) ; CHECK: [[RECOVER1:\%.+]] = call i8* (...) @llvm.eh.actions(i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M@8" to i8*), i32 0, i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch") ; CHECK: indirectbr i8* [[RECOVER1]], [] Index: test/CodeGen/WinEH/cppeh-nested-2.ll =================================================================== --- test/CodeGen/WinEH/cppeh-nested-2.ll +++ test/CodeGen/WinEH/cppeh-nested-2.ll @@ -49,7 +49,7 @@ ; CHECK: to label %invoke.cont unwind label %[[LPAD_LABEL:lpad[0-9]*]] ; Function Attrs: uwtable -define void @_Z4testv() #0 { +define void @_Z4testv() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %outer = alloca %class.Outer, align 1 %exn.slot = alloca i8* @@ -91,13 +91,13 @@ br label %try.cont ; CHECK: [[LPAD_LABEL]]: -; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) +; CHECK: landingpad { i8*, i32 } ; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIf to i8*) ; CHECK-NEXT: [[RECOVER:\%.+]] = call i8* (...) @llvm.eh.actions(i32 1, i8* bitcast (i8** @_ZTIf to i8*), i32 0, i8* (i8*, i8*)* @_Z4testv.catch) ; CHECK-NEXT: indirectbr i8* [[RECOVER]], [label %try.cont19] lpad: ; preds = %try.cont, %entry - %tmp = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %tmp = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIf to i8*) %tmp1 = extractvalue { i8*, i32 } %tmp, 0 store i8* %tmp1, i8** %exn.slot @@ -106,7 +106,7 @@ br label %catch.dispatch11 ; CHECK: [[LPAD1_LABEL]]: -; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) +; CHECK: landingpad { i8*, i32 } ; CHECK-NEXT: cleanup ; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIi to i8*) ; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIf to i8*) @@ -117,7 +117,7 @@ ; CHECK-NEXT: indirectbr i8* [[RECOVER1]], [label %try.cont, label %try.cont19] lpad1: ; preds = %invoke.cont4, %invoke.cont - %tmp3 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %tmp3 = landingpad { i8*, i32 } cleanup catch i8* bitcast (i8** @_ZTIi to i8*) catch i8* bitcast (i8** @_ZTIf to i8*) @@ -128,7 +128,7 @@ br label %catch.dispatch ; CHECK: [[LPAD3_LABEL]]: -; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) +; CHECK: landingpad { i8*, i32 } ; CHECK-NEXT: cleanup ; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIi to i8*) ; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIf to i8*) @@ -140,7 +140,7 @@ ; CHECK-NEXT: indirectbr i8* [[RECOVER3]], [label %try.cont, label %try.cont19] lpad3: ; preds = %invoke.cont2 - %tmp6 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %tmp6 = landingpad { i8*, i32 } cleanup catch i8* bitcast (i8** @_ZTIi to i8*) catch i8* bitcast (i8** @_ZTIf to i8*) @@ -189,7 +189,7 @@ ; CHECK-NOT: lpad7: lpad7: ; preds = %catch - %tmp14 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %tmp14 = landingpad { i8*, i32 } cleanup catch i8* bitcast (i8** @_ZTIf to i8*) %tmp15 = extractvalue { i8*, i32 } %tmp14, 0 @@ -263,7 +263,7 @@ ; CHECK: ret i8* blockaddress(@_Z4testv, %try.cont) ; ; CHECK: [[LPAD7_LABEL]]:{{[ ]+}}; preds = %entry -; CHECK: [[LPAD7_VAL:\%.+]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) +; CHECK: [[LPAD7_VAL:\%.+]] = landingpad { i8*, i32 } ; (FIXME) The nested handler body isn't being populated yet. ; CHECK: } Index: test/CodeGen/WinEH/cppeh-nested-3.ll =================================================================== --- test/CodeGen/WinEH/cppeh-nested-3.ll +++ test/CodeGen/WinEH/cppeh-nested-3.ll @@ -46,7 +46,7 @@ ; CHECK: to label %invoke.cont unwind label %[[LPAD_LABEL:lpad[0-9]*]] ; Function Attrs: uwtable -define void @"\01?test@@YAXXZ"() #0 { +define void @"\01?test@@YAXXZ"() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %exn.slot = alloca i8* %ehselector.slot = alloca i32 @@ -60,14 +60,14 @@ br label %try.cont10 ; CHECK: [[LPAD_LABEL]]: -; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) +; CHECK: landingpad { i8*, i32 } ; CHECK: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*) ; CHECK: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M@8" to i8*) ; CHECK: [[RECOVER:\%.+]] = call i8* (...) @llvm.eh.actions(i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*), i32 1, i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch.2", i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M@8" to i8*), i32 2, i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch.1") ; CHECK: indirectbr i8* [[RECOVER]], [label %try.cont10, label %try.cont19] lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %0 = landingpad { i8*, i32 } catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*) catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M@8" to i8*) %1 = extractvalue { i8*, i32 } %0, 0 @@ -97,7 +97,7 @@ ; CHECK-NOT: lpad1: lpad1: ; preds = %catch - %5 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %5 = landingpad { i8*, i32 } catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*) catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M@8" to i8*) %6 = extractvalue { i8*, i32 } %5, 0 @@ -139,7 +139,7 @@ ; CHECK-NOT: lpad8: lpad8: ; preds = %try.cont - %12 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %12 = landingpad { i8*, i32 } catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M@8" to i8*) %13 = extractvalue { i8*, i32 } %12, 0 store i8* %13, i8** %exn.slot @@ -212,7 +212,7 @@ ; CHECK: to label %invoke.cont9 unwind label %[[LPAD8_LABEL:lpad[0-9]*]] ; ; CHECK: [[LPAD1_LABEL]]:{{[ ]+}}; preds = %entry -; CHECK: [[LPAD1_VAL:\%.+]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) +; CHECK: [[LPAD1_VAL:\%.+]] = landingpad { i8*, i32 } ; CHECK: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*) ; CHECK: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M@8" to i8*) ; CHECK: [[RECOVER1:\%.+]] = call i8* (...) @llvm.eh.actions(i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*), i32 0, i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch", i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M@8" to i8*), i32 2, i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch.1") @@ -222,7 +222,7 @@ ; CHECK: ret i8* blockaddress(@"\01?test@@YAXXZ", %try.cont10) ; ; CHECK: [[LPAD8_LABEL]]:{{[ ]+}}; preds = %invoke.cont2 -; CHECK: [[LPAD8_VAL:\%.+]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) +; CHECK: [[LPAD8_VAL:\%.+]] = landingpad { i8*, i32 } ; CHECK: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M@8" to i8*) ; CHECK: [[RECOVER2:\%.+]] = call i8* (...) @llvm.eh.actions(i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0M@8" to i8*), i32 2, i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch.1") ; CHECK: indirectbr i8* [[RECOVER2]], [] Index: test/CodeGen/WinEH/cppeh-nested-rethrow.ll =================================================================== --- test/CodeGen/WinEH/cppeh-nested-rethrow.ll +++ test/CodeGen/WinEH/cppeh-nested-rethrow.ll @@ -56,7 +56,7 @@ ; CHECK: call void (...) @llvm.frameescape ; Function Attrs: nounwind uwtable -define void @"\01?test1@@YAXXZ"() #0 { +define void @"\01?test1@@YAXXZ"() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %tmp = alloca i32, align 4 %exn.slot = alloca i8* @@ -67,7 +67,7 @@ to label %unreachable unwind label %lpad lpad: ; preds = %entry - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %1 = landingpad { i8*, i32 } catch i8* null %2 = extractvalue { i8*, i32 } %1, 0 store i8* %2, i8** %exn.slot @@ -82,7 +82,7 @@ to label %unreachable unwind label %lpad1 lpad1: ; preds = %catch - %4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %4 = landingpad { i8*, i32 } catch i8* null %5 = extractvalue { i8*, i32 } %4, 0 store i8* %5, i8** %exn.slot @@ -124,7 +124,7 @@ ; CHECK: call void (...) @llvm.frameescape ; Function Attrs: nounwind uwtable -define void @"\01?test2@@YAXXZ"() #0 { +define void @"\01?test2@@YAXXZ"() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %tmp = alloca i32, align 4 %exn.slot = alloca i8* @@ -135,7 +135,7 @@ to label %unreachable unwind label %lpad lpad: ; preds = %entry - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %1 = landingpad { i8*, i32 } catch i8* null %2 = extractvalue { i8*, i32 } %1, 0 store i8* %2, i8** %exn.slot @@ -150,7 +150,7 @@ to label %unreachable unwind label %lpad1 lpad1: ; preds = %catch - %4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %4 = landingpad { i8*, i32 } catch i8* null %5 = extractvalue { i8*, i32 } %4, 0 store i8* %5, i8** %exn.slot Index: test/CodeGen/WinEH/cppeh-nonalloca-frame-values.ll =================================================================== --- test/CodeGen/WinEH/cppeh-nonalloca-frame-values.ll +++ test/CodeGen/WinEH/cppeh-nonalloca-frame-values.ll @@ -72,7 +72,7 @@ ; CHECK: br label %for.body ; Function Attrs: uwtable -define void @"\01?test@@YAXXZ"() #0 { +define void @"\01?test@@YAXXZ"() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %e = alloca i32, align 4 %ExceptionVal = alloca [10 x i32], align 16 @@ -112,13 +112,13 @@ br label %try.cont ; CHECK: [[LPAD_LABEL:lpad[0-9]*]]:{{[ ]+}}; preds = %for.body -; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) +; CHECK: landingpad { i8*, i32 } ; CHECK-NEXT: catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*) ; CHECK-NEXT: [[RECOVER:\%.+]] = call i8* (...) @llvm.eh.actions(i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*), i32 0, i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch") ; CHECK-NEXT: indirectbr i8* [[RECOVER]], [label %[[SPLIT_RECOVER_BB:.*]]] lpad: ; preds = %for.body - %2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %2 = landingpad { i8*, i32 } catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*) %3 = extractvalue { i8*, i32 } %2, 1 %4 = tail call i32 @llvm.eh.typeid.for(i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*)) #1 Index: test/CodeGen/WinEH/cppeh-prepared-catch-all.ll =================================================================== --- test/CodeGen/WinEH/cppeh-prepared-catch-all.ll +++ test/CodeGen/WinEH/cppeh-prepared-catch-all.ll @@ -18,13 +18,13 @@ declare void @llvm.eh.endcatch() #2 ; Function Attrs: nounwind uwtable -define void @test_catch_all() #0 { +define void @test_catch_all() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: invoke void @may_throw() to label %try.cont unwind label %lpad lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %0 = landingpad { i8*, i32 } catch i8* null %1 = extractvalue { i8*, i32 } %0, 0 tail call void @llvm.eh.begincatch(i8* %1, i8* null) #2 Index: test/CodeGen/WinEH/cppeh-prepared-catch-reordered.ll =================================================================== --- test/CodeGen/WinEH/cppeh-prepared-catch-reordered.ll +++ test/CodeGen/WinEH/cppeh-prepared-catch-reordered.ll @@ -43,7 +43,7 @@ declare void @_CxxThrowException(i8*, %eh.ThrowInfo*) ; Function Attrs: uwtable -define i32 @main() #1 { +define i32 @main() #1 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %tmp.i = alloca i32, align 4 %e = alloca i32, align 4 @@ -57,7 +57,7 @@ unreachable lpad1: ; preds = %entry - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %1 = landingpad { i8*, i32 } catch %eh.CatchHandlerType* @llvm.eh.handlertype.H.0 %recover = call i8* (...) @llvm.eh.actions(i32 1, i8* bitcast (%eh.CatchHandlerType* @llvm.eh.handlertype.H.0 to i8*), i32 0, i8* (i8*, i8*)* @main.catch) indirectbr i8* %recover, [label %try.cont.split] @@ -90,7 +90,7 @@ ; Function Attrs: nounwind declare i8* @llvm.eh.actions(...) #3 -define internal i8* @main.catch(i8*, i8*) #5 { +define internal i8* @main.catch(i8*, i8*) #5 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %e.i8 = call i8* @llvm.framerecover(i8* bitcast (i32 ()* @main to i8*), i8* %1, i32 0) %e = bitcast i8* %e.i8 to i32* @@ -104,7 +104,7 @@ ret i8* blockaddress(@main, %try.cont.split) stub: ; preds = %entry - %4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %4 = landingpad { i8*, i32 } cleanup %recover = call i8* (...) @llvm.eh.actions() unreachable Index: test/CodeGen/WinEH/cppeh-prepared-catch.ll =================================================================== --- test/CodeGen/WinEH/cppeh-prepared-catch.ll +++ test/CodeGen/WinEH/cppeh-prepared-catch.ll @@ -30,7 +30,7 @@ @"\01??_R0H@8" = linkonce_odr global %rtti.TypeDescriptor2 { i8** @"\01??_7type_info@@6B@", i8* null, [3 x i8] c".H\00" }, comdat @llvm.eh.handlertype.H.8 = private unnamed_addr constant %eh.CatchHandlerType { i32 8, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*) }, section "llvm.metadata" -define internal i8* @"\01?f@@YAXXZ.catch"(i8*, i8*) #4 { +define internal i8* @"\01?f@@YAXXZ.catch"(i8*, i8*) #4 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %.i8 = call i8* @llvm.framerecover(i8* bitcast (void ()* @"\01?f@@YAXXZ" to i8*), i8* %1, i32 0) %bc2 = bitcast i8* %.i8 to i32** @@ -42,7 +42,7 @@ ret i8* blockaddress(@"\01?f@@YAXXZ", %try.cont) lpad1: ; preds = %entry - %lp4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %lp4 = landingpad { i8*, i32 } cleanup catch %eh.CatchHandlerType* @llvm.eh.handlertype.N.0 %recover = call i8* (...) @llvm.eh.actions(i32 1, i8* bitcast (%eh.CatchHandlerType* @llvm.eh.handlertype.N.0 to i8*), i32 1, i8* (i8*, i8*)* @"\01?f@@YAXXZ.catch1") @@ -56,7 +56,7 @@ ; CHECK: .long ("$cppxdata$?f@@YAXXZ")@IMGREL -define internal i8* @"\01?f@@YAXXZ.catch1"(i8*, i8*) #4 { +define internal i8* @"\01?f@@YAXXZ.catch1"(i8*, i8*) #4 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %.i8 = call i8* @llvm.framerecover(i8* bitcast (void ()* @"\01?f@@YAXXZ" to i8*), i8* %1, i32 1) %2 = bitcast i8* %.i8 to double* @@ -68,7 +68,7 @@ ret i8* blockaddress(@"\01?f@@YAXXZ", %try.cont8) lpad: ; preds = %entry - %4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %4 = landingpad { i8*, i32 } cleanup %recover = call i8* (...) @llvm.eh.actions() unreachable @@ -82,7 +82,7 @@ ; CHECK: .seh_handlerdata ; CHECK: .long ("$cppxdata$?f@@YAXXZ")@IMGREL -define void @"\01?f@@YAXXZ"() #0 { +define void @"\01?f@@YAXXZ"() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %exn.slot = alloca i8* %ehselector.slot = alloca i32 @@ -96,7 +96,7 @@ br label %try.cont lpad2: ; preds = %entry - %2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %2 = landingpad { i8*, i32 } catch %eh.CatchHandlerType* @llvm.eh.handlertype.H.8 catch %eh.CatchHandlerType* @llvm.eh.handlertype.N.0 %recover = call i8* (...) @llvm.eh.actions(i32 1, i8* bitcast (%eh.CatchHandlerType* @llvm.eh.handlertype.H.8 to i8*), i32 0, i8* (i8*, i8*)* @"\01?f@@YAXXZ.catch", i32 1, i8* bitcast (%eh.CatchHandlerType* @llvm.eh.handlertype.N.0 to i8*), i32 1, i8* (i8*, i8*)* @"\01?f@@YAXXZ.catch1") @@ -107,7 +107,7 @@ to label %try.cont8 unwind label %lpad1 lpad1: - %3 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %3 = landingpad { i8*, i32 } catch %eh.CatchHandlerType* @llvm.eh.handlertype.N.0 %recover2 = call i8* (...) @llvm.eh.actions(i32 1, i8* bitcast (%eh.CatchHandlerType* @llvm.eh.handlertype.N.0 to i8*), i32 1, i8* (i8*, i8*)* @"\01?f@@YAXXZ.catch1") indirectbr i8* %recover2, [label %try.cont8] Index: test/CodeGen/WinEH/cppeh-prepared-cleanups.ll =================================================================== --- test/CodeGen/WinEH/cppeh-prepared-cleanups.ll +++ test/CodeGen/WinEH/cppeh-prepared-cleanups.ll @@ -50,7 +50,7 @@ ; CHECK-NEXT: .long .Ltmp0@IMGREL ; CHECK-NEXT: .long 0 -define void @"\01?test1@@YAXXZ"() #0 { +define void @"\01?test1@@YAXXZ"() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %unwindhelp = alloca i64 %tmp = alloca i32, align 4 @@ -66,7 +66,7 @@ to label %unreachable unwind label %lpad1 lpad1: ; preds = %entry - %2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %2 = landingpad { i8*, i32 } cleanup %recover = call i8* (...) @llvm.eh.actions(i32 0, void (i8*, i8*)* @"\01?test1@@YAXXZ.cleanup") indirectbr i8* %recover, [] @@ -118,7 +118,7 @@ ; CHECK-NEXT: .long .Ltmp12@IMGREL ; CHECK-NEXT: .long 0 -define void @"\01?test2@@YAX_N@Z"(i1 zeroext %b) #2 { +define void @"\01?test2@@YAX_N@Z"(i1 zeroext %b) #2 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { %b.addr = alloca i8, align 1 %s = alloca %struct.S, align 1 %exn.slot = alloca i8* @@ -145,13 +145,13 @@ br label %if.end lpad1: ; preds = %entry, %if.end - %2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %2 = landingpad { i8*, i32 } cleanup %recover = call i8* (...) @llvm.eh.actions(i32 0, void (i8*, i8*)* @"\01?test2@@YAX_N@Z.cleanup") indirectbr i8* %recover, [] lpad3: ; preds = %if.then - %3 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %3 = landingpad { i8*, i32 } cleanup %recover4 = call i8* (...) @llvm.eh.actions(i32 0, void (i8*, i8*)* @"\01?test2@@YAX_N@Z.cleanup1", i32 0, void (i8*, i8*)* @"\01?test2@@YAX_N@Z.cleanup") indirectbr i8* %recover4, [] @@ -196,7 +196,7 @@ ; Function Attrs: nounwind declare void @llvm.eh.unwindhelp(i8*) #4 -define internal void @"\01?test2@@YAX_N@Z.cleanup"(i8*, i8*) #7 { +define internal void @"\01?test2@@YAX_N@Z.cleanup"(i8*, i8*) #7 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %s.i8 = call i8* @llvm.framerecover(i8* bitcast (void (i1)* @"\01?test2@@YAX_N@Z" to i8*), i8* %1, i32 0) %s = bitcast i8* %s.i8 to %struct.S* @@ -208,12 +208,12 @@ ret void stub: ; preds = %entry - %2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %2 = landingpad { i8*, i32 } cleanup unreachable } -define internal void @"\01?test2@@YAX_N@Z.cleanup1"(i8*, i8*) #7 { +define internal void @"\01?test2@@YAX_N@Z.cleanup1"(i8*, i8*) #7 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %s1.i8 = call i8* @llvm.framerecover(i8* bitcast (void (i1)* @"\01?test2@@YAX_N@Z" to i8*), i8* %1, i32 1) %s1 = bitcast i8* %s1.i8 to %struct.S* @@ -225,7 +225,7 @@ ret void stub: ; preds = %entry - %2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %2 = landingpad { i8*, i32 } cleanup unreachable } Index: test/CodeGen/WinEH/cppeh-shared-empty-catch.ll =================================================================== --- test/CodeGen/WinEH/cppeh-shared-empty-catch.ll +++ test/CodeGen/WinEH/cppeh-shared-empty-catch.ll @@ -34,7 +34,7 @@ ; CHECK: invoke void @"\01?g@@YAXXZ"() ; Function Attrs: nounwind -define void @"\01?f@@YAXXZ"() #0 { +define void @"\01?f@@YAXXZ"() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: invoke void @"\01?g@@YAXXZ"() to label %invoke.cont unwind label %lpad @@ -48,7 +48,7 @@ to label %unreachable unwind label %lpad1 lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %0 = landingpad { i8*, i32 } catch i8* null %1 = extractvalue { i8*, i32 } %0, 0 br label %catch2 @@ -56,14 +56,14 @@ ; Note: Even though this landing pad has two catch clauses, it only has one action because both ; handlers do the same thing. ; CHECK: [[LPAD1_LABEL]]: -; CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) +; CHECK: landingpad { i8*, i32 } ; CHECK-NEXT: catch %eh.CatchHandlerType* @llvm.eh.handlertype.H.0 ; CHECK-NEXT: catch i8* null ; CHECK-NEXT: [[RECOVER:\%.+]] = call i8* (...) @llvm.eh.actions(i32 1, i8* null, i32 -1, i8* (i8*, i8*)* @"\01?f@@YAXXZ.catch") ; CHECK-NEXT: indirectbr i8* [[RECOVER]], [label %try.cont4] lpad1: ; preds = %invoke.cont - %2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %2 = landingpad { i8*, i32 } catch %eh.CatchHandlerType* @llvm.eh.handlertype.H.0 catch i8* null %3 = extractvalue { i8*, i32 } %2, 0 Index: test/CodeGen/WinEH/cppeh-similar-catch-blocks.ll =================================================================== --- test/CodeGen/WinEH/cppeh-similar-catch-blocks.ll +++ test/CodeGen/WinEH/cppeh-similar-catch-blocks.ll @@ -91,7 +91,7 @@ ; CHECK: } ; Function Attrs: uwtable -define i32 @main() #0 { +define i32 @main() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %retval = alloca i32, align 4 %tmp = alloca i8, align 1 @@ -111,7 +111,7 @@ to label %unreachable unwind label %lpad lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %0 = landingpad { i8*, i32 } catch %eh.CatchHandlerType* @llvm.eh.handlertype.D.0 catch %eh.CatchHandlerType* @llvm.eh.handlertype.H.0 catch i8* null @@ -146,7 +146,7 @@ to label %unreachable unwind label %lpad4 lpad2: ; preds = %catch - %6 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %6 = landingpad { i8*, i32 } catch %eh.CatchHandlerType* @llvm.eh.handlertype.H.0 catch i8* null %7 = extractvalue { i8*, i32 } %6, 0 @@ -157,7 +157,7 @@ br label %catch.dispatch5 lpad4: ; preds = %try.cont - %9 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %9 = landingpad { i8*, i32 } catch %eh.CatchHandlerType* @llvm.eh.handlertype.H.0 catch i8* null %10 = extractvalue { i8*, i32 } %9, 0 @@ -200,7 +200,7 @@ br label %try.cont19 lpad10: ; preds = %catch8 - %15 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %15 = landingpad { i8*, i32 } cleanup %16 = extractvalue { i8*, i32 } %15, 0 store i8* %16, i8** %exn.slot @@ -210,7 +210,7 @@ br label %eh.resume lpad16: ; preds = %catch13 - %18 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %18 = landingpad { i8*, i32 } cleanup %19 = extractvalue { i8*, i32 } %18, 0 store i8* %19, i8** %exn.slot @@ -220,7 +220,7 @@ br label %eh.resume lpad21: ; preds = %try.cont19 - %21 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %21 = landingpad { i8*, i32 } catch i8* bitcast (%eh.CatchHandlerType* @llvm.eh.handlertype.D.0 to i8*) catch i8* bitcast (%eh.CatchHandlerType* @llvm.eh.handlertype.H.0 to i8*) catch i8* null @@ -255,7 +255,7 @@ to label %unreachable unwind label %lpad35 lpad30: ; preds = %catch25 - %27 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %27 = landingpad { i8*, i32 } catch i8* bitcast (%eh.CatchHandlerType* @llvm.eh.handlertype.H.0 to i8*) catch i8* bitcast (%eh.CatchHandlerType* @llvm.eh.handlertype.D.0 to i8*) catch i8* null @@ -267,7 +267,7 @@ br label %catch.dispatch36 lpad35: ; preds = %try.cont33 - %30 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %30 = landingpad { i8*, i32 } catch i8* bitcast (%eh.CatchHandlerType* @llvm.eh.handlertype.H.0 to i8*) catch i8* bitcast (%eh.CatchHandlerType* @llvm.eh.handlertype.D.0 to i8*) catch i8* null @@ -326,7 +326,7 @@ br label %try.cont60 lpad42: ; preds = %catch40 - %38 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %38 = landingpad { i8*, i32 } cleanup %39 = extractvalue { i8*, i32 } %38, 0 store i8* %39, i8** %exn.slot @@ -336,7 +336,7 @@ br label %eh.resume lpad50: ; preds = %catch45 - %41 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %41 = landingpad { i8*, i32 } cleanup %42 = extractvalue { i8*, i32 } %41, 0 store i8* %42, i8** %exn.slot @@ -346,7 +346,7 @@ br label %eh.resume lpad57: ; preds = %catch53 - %44 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %44 = landingpad { i8*, i32 } cleanup %45 = extractvalue { i8*, i32 } %44, 0 store i8* %45, i8** %exn.slot Index: test/CodeGen/WinEH/cppeh-state-calc-1.ll =================================================================== --- test/CodeGen/WinEH/cppeh-state-calc-1.ll +++ test/CodeGen/WinEH/cppeh-state-calc-1.ll @@ -68,7 +68,7 @@ @_TI1D = linkonce_odr unnamed_addr constant %eh.ThrowInfo { i32 0, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%eh.CatchableTypeArray.1* @_CTA1D to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, section ".xdata", comdat ; Function Attrs: nounwind uwtable -define void @"\01?test@@YAXXZ"() #0 { +define void @"\01?test@@YAXXZ"() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %tmp = alloca i32, align 4 %x = alloca i32, align 4 @@ -84,7 +84,7 @@ to label %unreachable unwind label %lpad lpad: ; preds = %entry - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %1 = landingpad { i8*, i32 } catch i8* bitcast (%eh.CatchHandlerType* @llvm.eh.handlertype.H.0 to i8*) catch %eh.CatchHandlerType* @llvm.eh.handlertype.D.0 catch %eh.CatchHandlerType* @llvm.eh.handlertype.H.0 @@ -99,7 +99,7 @@ to label %unreachable unwind label %lpad3 lpad3: ; preds = %try.cont - %2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %2 = landingpad { i8*, i32 } catch %eh.CatchHandlerType* @llvm.eh.handlertype.D.0 catch %eh.CatchHandlerType* @llvm.eh.handlertype.H.0 catch i8* null @@ -114,7 +114,7 @@ to label %unreachable unwind label %lpad12 lpad12: ; preds = %try.cont10 - %4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %4 = landingpad { i8*, i32 } catch %eh.CatchHandlerType* @llvm.eh.handlertype.H.0 catch i8* null %recover2 = call i8* (...) @llvm.eh.actions(i32 1, i8* bitcast (%eh.CatchHandlerType* @llvm.eh.handlertype.H.0 to i8*), i32 2, i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch2", i32 1, i8* null, i32 -1, i8* (i8*, i8*)* @"\01?test@@YAXXZ.catch3") @@ -164,7 +164,7 @@ ; Function Attrs: nounwind declare i8* @llvm.eh.actions(...) #3 -define internal i8* @"\01?test@@YAXXZ.catch"(i8*, i8*) #4 { +define internal i8* @"\01?test@@YAXXZ.catch"(i8*, i8*) #4 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %x.i8 = call i8* @llvm.framerecover(i8* bitcast (void ()* @"\01?test@@YAXXZ" to i8*), i8* %1, i32 0) %x = bitcast i8* %x.i8 to i32* @@ -177,7 +177,7 @@ ret i8* blockaddress(@"\01?test@@YAXXZ", %try.cont) stub: ; preds = %entry - %3 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %3 = landingpad { i8*, i32 } cleanup %recover = call i8* (...) @llvm.eh.actions() unreachable @@ -186,7 +186,7 @@ ; Function Attrs: nounwind readnone declare void @llvm.donothing() #2 -define internal i8* @"\01?test@@YAXXZ.catch1"(i8*, i8*) #4 { +define internal i8* @"\01?test@@YAXXZ.catch1"(i8*, i8*) #4 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: call void @"\01?catch_a@@YAXXZ"() #3 invoke void @llvm.donothing() @@ -196,13 +196,13 @@ ret i8* blockaddress(@"\01?test@@YAXXZ", %try.cont10) stub: ; preds = %entry - %2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %2 = landingpad { i8*, i32 } cleanup %recover = call i8* (...) @llvm.eh.actions() unreachable } -define internal i8* @"\01?test@@YAXXZ.catch2"(i8*, i8*) #4 { +define internal i8* @"\01?test@@YAXXZ.catch2"(i8*, i8*) #4 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %x21.i8 = call i8* @llvm.framerecover(i8* bitcast (void ()* @"\01?test@@YAXXZ" to i8*), i8* %1, i32 2) %x21 = bitcast i8* %x21.i8 to i32* @@ -215,13 +215,13 @@ ret i8* blockaddress(@"\01?test@@YAXXZ", %try.cont22) stub: ; preds = %entry - %3 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %3 = landingpad { i8*, i32 } cleanup %recover = call i8* (...) @llvm.eh.actions() unreachable } -define internal i8* @"\01?test@@YAXXZ.catch3"(i8*, i8*) #4 { +define internal i8* @"\01?test@@YAXXZ.catch3"(i8*, i8*) #4 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: call void @"\01?catch_all@@YAXXZ"() #3 invoke void @llvm.donothing() @@ -231,7 +231,7 @@ ret i8* blockaddress(@"\01?test@@YAXXZ", %try.cont22) stub: ; preds = %entry - %2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %2 = landingpad { i8*, i32 } cleanup %recover = call i8* (...) @llvm.eh.actions() unreachable Index: test/CodeGen/WinEH/seh-catch-all.ll =================================================================== --- test/CodeGen/WinEH/seh-catch-all.ll +++ test/CodeGen/WinEH/seh-catch-all.ll @@ -21,7 +21,7 @@ declare i8* @llvm.frameaddress(i32) ; Function Attrs: uwtable -define void @seh_catch_all() { +define void @seh_catch_all() personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) { entry: %exn.slot = alloca i8* %ehselector.slot = alloca i32 @@ -32,7 +32,7 @@ br label %__try.cont lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) + %0 = landingpad { i8*, i32 } catch i8* null %1 = extractvalue { i8*, i32 } %0, 0 store i8* %1, i8** %exn.slot Index: test/CodeGen/WinEH/seh-inlined-finally.ll =================================================================== --- test/CodeGen/WinEH/seh-inlined-finally.ll +++ test/CodeGen/WinEH/seh-inlined-finally.ll @@ -19,7 +19,7 @@ declare dllimport void @EnterCriticalSection(%struct._RTL_CRITICAL_SECTION*) declare dllimport void @LeaveCriticalSection(%struct._RTL_CRITICAL_SECTION*) -define void @use_finally() { +define void @use_finally() personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) { entry: invoke void @may_crash() to label %invoke.cont unwind label %lpad @@ -29,7 +29,7 @@ ret void lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) + %0 = landingpad { i8*, i32 } cleanup %call.i2 = tail call i32 @puts(i8* null) resume { i8*, i32 } %0 @@ -44,7 +44,7 @@ ; CHECK-NEXT: indirectbr i8* %recover, [] ; Function Attrs: nounwind uwtable -define i32 @call_may_crash_locked() { +define i32 @call_may_crash_locked() personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) { entry: %p = alloca %struct._RTL_CRITICAL_SECTION, align 8 call void (...) @llvm.frameescape(%struct._RTL_CRITICAL_SECTION* %p) @@ -60,7 +60,7 @@ ret i32 42 lpad: ; preds = %entry - %tmp7 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) + %tmp7 = landingpad { i8*, i32 } cleanup %tmp8 = call i8* @llvm.frameaddress(i32 0) %tmp9 = call i8* @llvm.framerecover(i8* bitcast (i32 ()* @call_may_crash_locked to i8*), i8* %tmp8, i32 0) Index: test/CodeGen/WinEH/seh-outlined-finally.ll =================================================================== --- test/CodeGen/WinEH/seh-outlined-finally.ll +++ test/CodeGen/WinEH/seh-outlined-finally.ll @@ -39,7 +39,7 @@ } ; Function Attrs: uwtable -define i32 @main() #1 { +define i32 @main() #1 personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) { entry: %myres = alloca i32, align 4 %exn.slot = alloca i8* @@ -59,7 +59,7 @@ ret i32 0 lpad: ; preds = %entry - %2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) + %2 = landingpad { i8*, i32 } cleanup %3 = extractvalue { i8*, i32 } %2, 0 store i8* %3, i8** %exn.slot @@ -70,7 +70,7 @@ to label %invoke.cont3 unwind label %lpad1 lpad1: ; preds = %lpad, %invoke.cont - %6 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) + %6 = landingpad { i8*, i32 } cleanup %7 = extractvalue { i8*, i32 } %6, 0 store i8* %7, i8** %exn.slot Index: test/CodeGen/WinEH/seh-prepared-basic.ll =================================================================== --- test/CodeGen/WinEH/seh-prepared-basic.ll +++ test/CodeGen/WinEH/seh-prepared-basic.ll @@ -15,14 +15,14 @@ target triple = "x86_64-pc-windows-msvc" ; Function Attrs: uwtable -define void @do_except() #0 { +define void @do_except() #0 personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) { entry: call void (...) @llvm.frameescape() invoke void @g() #5 to label %__try.cont unwind label %lpad1 lpad1: ; preds = %entry - %ehvals = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) + %ehvals = landingpad { i8*, i32 } catch i8* bitcast (i32 (i8*, i8*)* @"\01?filt$0@0@do_except@@" to i8*) %recover = call i8* (...) @llvm.eh.actions(i32 1, i8* bitcast (i32 (i8*, i8*)* @"\01?filt$0@0@do_except@@" to i8*), i32 -1, i8* blockaddress(@do_except, %__try.cont)) indirectbr i8* %recover, [label %__try.cont] Index: test/CodeGen/WinEH/seh-resume-phi.ll =================================================================== --- test/CodeGen/WinEH/seh-resume-phi.ll +++ test/CodeGen/WinEH/seh-resume-phi.ll @@ -9,13 +9,13 @@ declare i32 @__C_specific_handler(...) declare i32 @llvm.eh.typeid.for(i8*) -define void @resume_phi() { +define void @resume_phi() personality i32 (...)* @__C_specific_handler { entry: invoke void @might_crash(i8* null) to label %return unwind label %lpad1 lpad1: - %ehvals1 = landingpad { i8*, i32 } personality i32 (...)* @__C_specific_handler + %ehvals1 = landingpad { i8*, i32 } catch i32 ()* @filt %ehptr1 = extractvalue { i8*, i32 } %ehvals1, 0 %ehsel1 = extractvalue { i8*, i32 } %ehvals1, 1 @@ -28,7 +28,7 @@ to label %return unwind label %lpad2 lpad2: - %ehvals2 = landingpad { i8*, i32 } personality i32 (...)* @__C_specific_handler + %ehvals2 = landingpad { i8*, i32 } cleanup %ehptr2 = extractvalue { i8*, i32 } %ehvals2, 0 %ehsel2 = extractvalue { i8*, i32 } %ehvals2, 1 Index: test/CodeGen/WinEH/seh-simple.ll =================================================================== --- test/CodeGen/WinEH/seh-simple.ll +++ test/CodeGen/WinEH/seh-simple.ll @@ -12,7 +12,7 @@ declare i32 @__C_specific_handler(...) declare i32 @llvm.eh.typeid.for(i8*) -define i32 @simple_except_store() { +define i32 @simple_except_store() personality i32 (...)* @__C_specific_handler { entry: %retval = alloca i32 store i32 0, i32* %retval @@ -20,7 +20,7 @@ to label %return unwind label %lpad lpad: - %ehvals = landingpad { i8*, i32 } personality i32 (...)* @__C_specific_handler + %ehvals = landingpad { i8*, i32 } catch i32 ()* @filt %sel = extractvalue { i8*, i32 } %ehvals, 1 %filt_sel = tail call i32 @llvm.eh.typeid.for(i8* bitcast (i32 ()* @filt to i8*)) @@ -45,7 +45,7 @@ ; CHECK-NEXT: call i8* (...) @llvm.eh.actions(i32 1, i8* bitcast (i32 ()* @filt to i8*), i32 -1, i8* blockaddress(@simple_except_store, %__except)) ; CHECK-NEXT: indirectbr {{.*}} [label %__except] -define i32 @catch_all() { +define i32 @catch_all() personality i32 (...)* @__C_specific_handler { entry: %retval = alloca i32 store i32 0, i32* %retval @@ -53,7 +53,7 @@ to label %return unwind label %lpad lpad: - %ehvals = landingpad { i8*, i32 } personality i32 (...)* @__C_specific_handler + %ehvals = landingpad { i8*, i32 } catch i8* null store i32 1, i32* %retval br label %return @@ -73,13 +73,13 @@ ; CHECK: store i32 1, i32* %retval -define i32 @except_phi() { +define i32 @except_phi() personality i32 (...)* @__C_specific_handler { entry: invoke void @might_crash() to label %return unwind label %lpad lpad: - %ehvals = landingpad { i8*, i32 } personality i32 (...)* @__C_specific_handler + %ehvals = landingpad { i8*, i32 } catch i32 ()* @filt %sel = extractvalue { i8*, i32 } %ehvals, 1 %filt_sel = tail call i32 @llvm.eh.typeid.for(i8* bitcast (i32 ()* @filt to i8*)) @@ -107,7 +107,7 @@ ; CHECK-NEXT: %r = phi i32 [ 0, %entry ], [ 1, %lpad.return_crit_edge ] ; CHECK-NEXT: ret i32 %r -define i32 @lpad_phi() { +define i32 @lpad_phi() personality i32 (...)* @__C_specific_handler { entry: invoke void @might_crash() to label %cont unwind label %lpad @@ -118,7 +118,7 @@ lpad: %ncalls.1 = phi i32 [ 0, %entry ], [ 1, %cont ] - %ehvals = landingpad { i8*, i32 } personality i32 (...)* @__C_specific_handler + %ehvals = landingpad { i8*, i32 } catch i32 ()* @filt %sel = extractvalue { i8*, i32 } %ehvals, 1 %filt_sel = tail call i32 @llvm.eh.typeid.for(i8* bitcast (i32 ()* @filt to i8*)) @@ -153,13 +153,13 @@ ; CHECK-NEXT: %r = phi i32 [ 2, %cont ], [ %{{.*}}, %lpad.return_crit_edge ] ; CHECK-NEXT: ret i32 %r -define i32 @cleanup_and_except() { +define i32 @cleanup_and_except() personality i32 (...)* @__C_specific_handler { entry: invoke void @might_crash() to label %return unwind label %lpad lpad: - %ehvals = landingpad { i8*, i32 } personality i32 (...)* @__C_specific_handler + %ehvals = landingpad { i8*, i32 } cleanup catch i32 ()* @filt call void @cleanup() Index: test/CodeGen/X86/2007-05-05-Personality.ll =================================================================== --- test/CodeGen/X86/2007-05-05-Personality.ll +++ test/CodeGen/X86/2007-05-05-Personality.ll @@ -12,13 +12,13 @@ @error = external global i8 -define void @_ada_x() { +define void @_ada_x() personality i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*) { entry: invoke void @raise() to label %eh_then unwind label %unwind unwind: ; preds = %entry - %eh_ptr = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*) + %eh_ptr = landingpad { i8*, i32 } catch i8* @error %eh_select = extractvalue { i8*, i32 } %eh_ptr, 1 %eh_typeid = tail call i32 @llvm.eh.typeid.for(i8* @error) Index: test/CodeGen/X86/2008-04-17-CoalescerBug.ll =================================================================== --- test/CodeGen/X86/2008-04-17-CoalescerBug.ll +++ test/CodeGen/X86/2008-04-17-CoalescerBug.ll @@ -13,7 +13,7 @@ @.str33 = external constant [29 x i32] ; <[29 x i32]*> [#uses=1] @.str89 = external constant [5 x i32] ; <[5 x i32]*> [#uses=1] -define void @_ZNK10wxDateTime6FormatEPKwRKNS_8TimeZoneE(%struct.wxString* noalias sret %agg.result, %struct.wxDateTime* %this, i32* %format, %"struct.wxDateTime::TimeZone"* %tz, i1 %foo) { +define void @_ZNK10wxDateTime6FormatEPKwRKNS_8TimeZoneE(%struct.wxString* noalias sret %agg.result, %struct.wxDateTime* %this, i32* %format, %"struct.wxDateTime::TimeZone"* %tz, i1 %foo) personality i32 (...)* @__gxx_personality_v0 { entry: br i1 %foo, label %bb116.i, label %bb115.critedge.i bb115.critedge.i: ; preds = %entry @@ -151,11 +151,11 @@ bb7834: ; preds = %bb7806, %invcont5831 br label %bb3261 lpad: ; preds = %bb7806, %bb5968, %invcont5814, %bb440.i8663, %bb155.i8541, %bb5657, %bb3306 - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup ret void lpad8185: ; preds = %invcont5831 - %exn8185 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn8185 = landingpad {i8*, i32} cleanup ret void } Index: test/CodeGen/X86/2008-05-28-LocalRegAllocBug.ll =================================================================== --- test/CodeGen/X86/2008-05-28-LocalRegAllocBug.ll +++ test/CodeGen/X86/2008-05-28-LocalRegAllocBug.ll @@ -6,7 +6,7 @@ declare i8* @__cxa_begin_catch(i8*) nounwind -define i32 @main(i32 %argc, i8** %argv) { +define i32 @main(i32 %argc, i8** %argv) personality i32 (...)* @__gxx_personality_v0 { entry: br i1 false, label %bb37, label %bb34 @@ -21,7 +21,7 @@ unreachable lpad243: ; preds = %bb37 - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup %eh_ptr244 = extractvalue { i8*, i32 } %exn, 0 store i32 (...)** getelementptr ([5 x i32 (...)*], [5 x i32 (...)*]* @_ZTVN10Evaluation10GridOutputILi3EEE, i32 0, i32 2), i32 (...)*** null, align 8 Index: test/CodeGen/X86/2009-03-13-PHIElimBug.ll =================================================================== --- test/CodeGen/X86/2009-03-13-PHIElimBug.ll +++ test/CodeGen/X86/2009-03-13-PHIElimBug.ll @@ -6,7 +6,7 @@ declare i32 @g() -define i32 @phi() { +define i32 @phi() personality i32 (...)* @__gxx_personality_v0 { entry: %a = call i32 @f() ; <i32> [#uses=1] %b = invoke i32 @g() @@ -24,7 +24,7 @@ lpad: ; preds = %cont, %entry %y = phi i32 [ %a, %entry ], [ %aa, %cont ] ; <i32> [#uses=1] - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup ret i32 %y } Index: test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll =================================================================== --- test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll +++ test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll @@ -3,7 +3,7 @@ declare i32 @f() -define i32 @phi(i32 %x) { +define i32 @phi(i32 %x) personality i32 (...)* @__gxx_personality_v0 { entry: %a = invoke i32 @f() to label %cont unwind label %lpad ; <i32> [#uses=1] @@ -17,7 +17,7 @@ lpad: ; preds = %cont, %entry %v = phi i32 [ %x, %entry ], [ %a, %cont ] ; <i32> [#uses=1] - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup ret i32 %v } Index: test/CodeGen/X86/2009-09-10-LoadFoldingBug.ll =================================================================== --- test/CodeGen/X86/2009-09-10-LoadFoldingBug.ll +++ test/CodeGen/X86/2009-09-10-LoadFoldingBug.ll @@ -9,7 +9,7 @@ %struct.ComplexType = type { i32 } -define i32 @t(i32 %clientPort, i32 %pluginID, i32 %requestID, i32 %objectID, i64 %serverIdentifier, i64 %argumentsData, i32 %argumentsLength) ssp { +define i32 @t(i32 %clientPort, i32 %pluginID, i32 %requestID, i32 %objectID, i64 %serverIdentifier, i64 %argumentsData, i32 %argumentsLength) ssp personality i32 (...)* @__gxx_personality_v0 { entry: ; CHECK: _t: ; CHECK: movl 16(%rbp), @@ -34,7 +34,7 @@ ret i32 0 lpad: ; preds = %invcont1, %invcont, %entry - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup %8 = call i32 @vm_deallocate(i32 undef, i64 0, i64 %0) ; <i32> [#uses=0] unreachable Index: test/CodeGen/X86/2009-11-25-ImpDefBug.ll =================================================================== --- test/CodeGen/X86/2009-11-25-ImpDefBug.ll +++ test/CodeGen/X86/2009-11-25-ImpDefBug.ll @@ -20,7 +20,7 @@ declare i32 @_Z17LoadObjectFromBERR8xmstreamPP10ASN1ObjectPPF10ASN1StatusP13ASN1ObjHeaderS3_E(%struct.xmstream*, %struct.ASN1Object**, i32 (%struct.ASN1ObjHeader*, %struct.ASN1Object**)**) -define i32 @_ZN8ASN1Unit4loadER8xmstreamjm18ASN1LengthEncoding(%struct.ASN1Unit* %this, %struct.xmstream* nocapture %stream, i32 %numObjects, i64 %size, i32 %lEncoding) { +define i32 @_ZN8ASN1Unit4loadER8xmstreamjm18ASN1LengthEncoding(%struct.ASN1Unit* %this, %struct.xmstream* nocapture %stream, i32 %numObjects, i64 %size, i32 %lEncoding) personality i32 (...)* @__gxx_personality_v0 { entry: br label %meshBB85 @@ -46,7 +46,7 @@ lpad: ; preds = %bb1.i.fragment.cl, %bb1.i.fragment, %bb5 %.SV10.phi807 = phi i8* [ undef, %bb1.i.fragment.cl ], [ undef, %bb1.i.fragment ], [ undef, %bb5 ] ; <i8*> [#uses=1] - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup %1 = load i8, i8* %.SV10.phi807, align 8 ; <i8> [#uses=0] br i1 undef, label %meshBB81.bbcl.disp, label %bb13.fragment.bbcl.disp Index: test/CodeGen/X86/2010-04-06-SSEDomainFixCrash.ll =================================================================== --- test/CodeGen/X86/2010-04-06-SSEDomainFixCrash.ll +++ test/CodeGen/X86/2010-04-06-SSEDomainFixCrash.ll @@ -7,7 +7,7 @@ declare i32 @_ZN11HullLibrary16CreateConvexHullERK8HullDescR10HullResult(i8*, i8* nocapture, i8* nocapture) ssp align 2 -define void @_ZN17btSoftBodyHelpers4DrawEP10btSoftBodyP12btIDebugDrawi(i8* %psb, i8* %idraw, i32 %drawflags) ssp align 2 { +define void @_ZN17btSoftBodyHelpers4DrawEP10btSoftBodyP12btIDebugDrawi(i8* %psb, i8* %idraw, i32 %drawflags) ssp align 2 personality i32 (...)* @__gxx_personality_v0 { entry: br i1 undef, label %bb92, label %bb58 @@ -60,7 +60,7 @@ unreachable lpad159: ; preds = %bb58 - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup unreachable } Index: test/CodeGen/X86/2010-04-30-LocalAlloc-LandingPad.ll =================================================================== --- test/CodeGen/X86/2010-04-30-LocalAlloc-LandingPad.ll +++ test/CodeGen/X86/2010-04-30-LocalAlloc-LandingPad.ll @@ -13,7 +13,7 @@ ; CHECK: movl %esi,{{.*}}(%ebp) ; CHECK: calll __Z6throwsv -define i8* @_Z4test1SiS_(%struct.S* byval %s1, i32 %n, %struct.S* byval %s2) ssp { +define i8* @_Z4test1SiS_(%struct.S* byval %s1, i32 %n, %struct.S* byval %s2) ssp personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: %retval = alloca i8*, align 4 ; <i8**> [#uses=2] %n.addr = alloca i32, align 4 ; <i32*> [#uses=1] @@ -30,13 +30,13 @@ br label %finally terminate.handler: ; preds = %match.end - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %1 = landingpad { i8*, i32 } cleanup call void @_ZSt9terminatev() noreturn nounwind unreachable try.handler: ; preds = %entry - %exc1.ptr = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %exc1.ptr = landingpad { i8*, i32 } catch i8* null %exc1 = extractvalue { i8*, i32 } %exc1.ptr, 0 %selector = extractvalue { i8*, i32 } %exc1.ptr, 1 @@ -57,7 +57,7 @@ br label %match.end match.handler: ; preds = %match - %exc3 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %exc3 = landingpad { i8*, i32 } cleanup %7 = extractvalue { i8*, i32 } %exc3, 0 store i8* %7, i8** %_rethrow Index: test/CodeGen/X86/2010-08-04-MingWCrash.ll =================================================================== --- test/CodeGen/X86/2010-08-04-MingWCrash.ll +++ test/CodeGen/X86/2010-08-04-MingWCrash.ll @@ -1,6 +1,6 @@ ; RUN: llc < %s -mtriple=i386-pc-mingw32 -define void @func() nounwind { +define void @func() nounwind personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { invoke.cont: %call = tail call i8* @malloc() %a = invoke i32 @bar() @@ -10,7 +10,7 @@ ret void lpad: - %exn.ptr = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %exn.ptr = landingpad { i8*, i32 } catch i8* null %exn = extractvalue { i8*, i32 } %exn.ptr, 0 %eh.selector = extractvalue { i8*, i32 } %exn.ptr, 1 Index: test/CodeGen/X86/2012-01-10-UndefExceptionEdge.ll =================================================================== --- test/CodeGen/X86/2012-01-10-UndefExceptionEdge.ll +++ test/CodeGen/X86/2012-01-10-UndefExceptionEdge.ll @@ -16,7 +16,7 @@ declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind -define void @f(i32* nocapture %arg, i32* nocapture %arg1, i32* nocapture %arg2, i32* nocapture %arg3, i32 %arg4, i32 %arg5) optsize ssp { +define void @f(i32* nocapture %arg, i32* nocapture %arg1, i32* nocapture %arg2, i32* nocapture %arg3, i32 %arg4, i32 %arg5) optsize ssp personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { bb: br i1 undef, label %bb6, label %bb7 @@ -43,7 +43,7 @@ bb20: ; preds = %bb43, %bb41, %bb29, %bb7 %tmp21 = phi i32 [ undef, %bb7 ], [ %tmp12, %bb43 ], [ %tmp12, %bb29 ], [ %tmp12, %bb41 ] - %tmp22 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %tmp22 = landingpad { i8*, i32 } catch i8* bitcast ({ i8*, i8* }* @Exception to i8*) br i1 undef, label %bb23, label %bb69 Index: test/CodeGen/X86/2012-05-19-CoalescerCrash.ll =================================================================== --- test/CodeGen/X86/2012-05-19-CoalescerCrash.ll +++ test/CodeGen/X86/2012-05-19-CoalescerCrash.ll @@ -7,7 +7,7 @@ target triple = "i386-pc-linux-gnu" -define void @_ZN4llvm17AsmMatcherEmitter3runERNS_11raw_ostreamE() align 2 { +define void @_ZN4llvm17AsmMatcherEmitter3runERNS_11raw_ostreamE() align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { invoke void @_ZNK4llvm13CodeGenTarget12getAsmParserEv() to label %1 unwind label %5 @@ -16,7 +16,7 @@ to label %4 unwind label %2 ; <label>:2 ; preds = %1 - %3 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %3 = landingpad { i8*, i32 } cleanup unreachable @@ -25,12 +25,12 @@ to label %12 unwind label %7 ; <label>:5 ; preds = %0 - %6 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %6 = landingpad { i8*, i32 } cleanup br label %33 ; <label>:7 ; preds = %4 - %8 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %8 = landingpad { i8*, i32 } cleanup br label %9 @@ -52,7 +52,7 @@ br i1 %15, label %20, label %18 ; <label>:16 ; preds = %12 - %17 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %17 = landingpad { i8*, i32 } cleanup br label %26 @@ -67,7 +67,7 @@ br label %14 ; <label>:21 ; preds = %18 - %22 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %22 = landingpad { i8*, i32 } cleanup %23 = extractvalue { i8*, i32 } %22, 1 br i1 undef, label %26, label %24 @@ -88,7 +88,7 @@ br label %9 ; <label>:30 ; preds = %26 - %31 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %31 = landingpad { i8*, i32 } catch i8* null unreachable @@ -100,7 +100,7 @@ unreachable ; <label>:35 ; preds = %9 - %36 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %36 = landingpad { i8*, i32 } catch i8* null unreachable } Index: test/CodeGen/X86/2012-11-30-misched-dbg.ll =================================================================== --- test/CodeGen/X86/2012-11-30-misched-dbg.ll +++ test/CodeGen/X86/2012-11-30-misched-dbg.ll @@ -99,7 +99,7 @@ %"class.__gnu_cxx::hash_map" = type { %"class.__gnu_cxx::hashtable" } %"class.__gnu_cxx::hashtable" = type { i64, i64, i64, i64, i64, i64 } -define void @main() uwtable ssp { +define void @main() uwtable ssp personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: %X = alloca %"class.__gnu_cxx::hash_map", align 8 br i1 undef, label %cond.true, label %cond.end @@ -117,7 +117,7 @@ unreachable lpad2.i.i.i.i: ; preds = %cond.end - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } cleanup br i1 undef, label %lpad.body.i.i, label %if.then.i.i.i.i.i.i.i.i Index: test/CodeGen/X86/asm-label2.ll =================================================================== --- test/CodeGen/X86/asm-label2.ll +++ test/CodeGen/X86/asm-label2.ll @@ -7,7 +7,7 @@ ; CHECK: jmp LBB0_1 ; CHECK: LBB0_1: -define void @foobar() { +define void @foobar() personality i32 (...)* @__gxx_personality_v0 { entry: invoke void @_zed() to label %invoke.cont unwind label %lpad @@ -16,7 +16,7 @@ ret void lpad: ; preds = %entry - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup unreachable } Index: test/CodeGen/X86/block-placement.ll =================================================================== --- test/CodeGen/X86/block-placement.ll +++ test/CodeGen/X86/block-placement.ll @@ -546,7 +546,7 @@ declare i32 @__gxx_personality_v0(...) -define void @test_eh_lpad_successor() { +define void @test_eh_lpad_successor() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { ; Some times the landing pad ends up as the first successor of an invoke block. ; When this happens, a strange result used to fall out of updateTerminators: we ; didn't correctly locate the fallthrough successor, assuming blindly that the @@ -564,7 +564,7 @@ br label %loop lpad: - %lpad.val = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %lpad.val = landingpad { i8*, i32 } cleanup resume { i8*, i32 } %lpad.val @@ -574,7 +574,7 @@ declare void @fake_throw() noreturn -define void @test_eh_throw() { +define void @test_eh_throw() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { ; For blocks containing a 'throw' (or similar functionality), we have ; a no-return invoke. In this case, only EH successors will exist, and ; fallthrough simply won't occur. Make sure we don't crash trying to update @@ -591,7 +591,7 @@ unreachable cleanup: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } cleanup unreachable } Index: test/CodeGen/X86/branchfolding-landingpads.ll =================================================================== --- test/CodeGen/X86/branchfolding-landingpads.ll +++ test/CodeGen/X86/branchfolding-landingpads.ll @@ -18,20 +18,20 @@ ; CHECK-LABEL: @main ; CHECK: %unreachable -define i32 @main(i8* %cleanup) { +define i32 @main(i8* %cleanup) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @_throw() #0 to label %unreachable unwind label %catch.dispatch9 catch.dispatch9: ; preds = %entry - %tmp13 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %tmp13 = landingpad { i8*, i32 } cleanup catch i8* null invoke void @_throw() #0 to label %unreachable unwind label %lpad31 lpad31: ; preds = %catch.dispatch9 - %tmp20 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %tmp20 = landingpad { i8*, i32 } cleanup catch i8* null call void @foo() Index: test/CodeGen/X86/catch.ll =================================================================== --- test/CodeGen/X86/catch.ll +++ test/CodeGen/X86/catch.ll @@ -7,13 +7,13 @@ ; CHECK-NEXT: .quad .Lstr @str = private unnamed_addr constant [12 x i8] c"NSException\00" -define void @f() { +define void @f() personality i8* bitcast (void ()* @h to i8*) { invoke void @g() to label %invoke.cont unwind label %lpad invoke.cont: ret void lpad: - %tmp14 = landingpad { i8*, i32 } personality i8* bitcast (void ()* @h to i8*) + %tmp14 = landingpad { i8*, i32 } catch i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0) ret void } Index: test/CodeGen/X86/cfi.ll =================================================================== --- test/CodeGen/X86/cfi.ll +++ test/CodeGen/X86/cfi.ll @@ -8,7 +8,7 @@ ; PIC: .cfi_lsda 27, .Lexception0 -define void @bar() { +define void @bar() personality i32 (...)* @__gxx_personality_v0 { entry: %call = invoke i32 @foo() to label %invoke.cont unwind label %lpad @@ -17,7 +17,7 @@ ret void lpad: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} catch i8* null ret void } Index: test/CodeGen/X86/code_placement_eh.ll =================================================================== --- test/CodeGen/X86/code_placement_eh.ll +++ test/CodeGen/X86/code_placement_eh.ll @@ -6,7 +6,7 @@ target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32" target triple = "i386-apple-darwin10.0" -define void @foo() { +define void @foo() personality i32 (...)* @__gxx_personality_v0 { invcont5: br label %bb15 @@ -22,12 +22,12 @@ to label %.noexc6.i.i unwind label %lpad.i.i ; <float> [#uses=0] lpad.i.i: ; preds = %bb18.i5.i, %.noexc6.i.i - %lpadval.i.i = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + %lpadval.i.i = landingpad { i8*, i32 } catch i8* null unreachable lpad59.i: ; preds = %bb15 - %lpadval60.i.i = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + %lpadval60.i.i = landingpad { i8*, i32 } catch i8* null unreachable Index: test/CodeGen/X86/dwarf-eh-prepare.ll =================================================================== --- test/CodeGen/X86/dwarf-eh-prepare.ll +++ test/CodeGen/X86/dwarf-eh-prepare.ll @@ -9,7 +9,7 @@ declare void @might_throw() declare void @cleanup() -define i32 @simple_cleanup_catch() { +define i32 @simple_cleanup_catch() personality i32 (...)* @__gxx_personality_v0 { invoke void @might_throw() to label %cont unwind label %lpad @@ -22,7 +22,7 @@ ; CHECK: ret i32 0 lpad: - %ehvals = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + %ehvals = landingpad { i8*, i32 } cleanup catch i8* @int_typeinfo %ehptr = extractvalue { i8*, i32 } %ehvals, 0 @@ -33,7 +33,7 @@ br i1 %int_match, label %catch_int, label %eh.resume ; CHECK: lpad: -; CHECK: landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 +; CHECK: landingpad { i8*, i32 } ; CHECK: call void @cleanup() ; CHECK: call i32 @llvm.eh.typeid.for ; CHECK: br i1 @@ -54,7 +54,7 @@ } -define i32 @catch_no_resume() { +define i32 @catch_no_resume() personality i32 (...)* @__gxx_personality_v0 { invoke void @might_throw() to label %cont unwind label %lpad @@ -62,7 +62,7 @@ ret i32 0 lpad: - %ehvals = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + %ehvals = landingpad { i8*, i32 } catch i8* @int_typeinfo %ehptr = extractvalue { i8*, i32 } %ehvals, 0 %ehsel = extractvalue { i8*, i32 } %ehvals, 1 @@ -81,18 +81,18 @@ ; Check that we can prune the unreachable resume instruction. -; CHECK-LABEL: define i32 @catch_no_resume() { +; CHECK-LABEL: define i32 @catch_no_resume() personality i32 (...)* @__gxx_personality_v0 { ; CHECK: invoke void @might_throw() ; CHECK: ret i32 0 ; CHECK: lpad: -; CHECK: landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 +; CHECK: landingpad { i8*, i32 } ; CHECK-NOT: br i1 ; CHECK: ret i32 1 ; CHECK-NOT: call void @_Unwind_Resume ; CHECK: {{^[}]}} -define i32 @catch_cleanup_merge() { +define i32 @catch_cleanup_merge() personality i32 (...)* @__gxx_personality_v0 { invoke void @might_throw() to label %inner_invoke unwind label %outer_lpad inner_invoke: @@ -102,12 +102,12 @@ ret i32 0 outer_lpad: - %ehvals1 = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + %ehvals1 = landingpad { i8*, i32 } catch i8* @int_typeinfo br label %catch.dispatch inner_lpad: - %ehvals2 = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + %ehvals2 = landingpad { i8*, i32 } cleanup catch i8* @int_typeinfo call void @cleanup() @@ -138,11 +138,11 @@ ; CHECK: ret i32 0 ; ; CHECK: outer_lpad: -; CHECK: landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 +; CHECK: landingpad { i8*, i32 } ; CHECK: br label %catch.dispatch ; ; CHECK: inner_lpad: -; CHECK: landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 +; CHECK: landingpad { i8*, i32 } ; CHECK: call void @cleanup() ; CHECK: br label %catch.dispatch ; Index: test/CodeGen/X86/eh-label.ll =================================================================== --- test/CodeGen/X86/eh-label.ll +++ test/CodeGen/X86/eh-label.ll @@ -3,7 +3,7 @@ declare void @g() -define void @f() { +define void @f() personality i8* bitcast (void ()* @g to i8*) { bb0: call void asm ".Lfunc_end0:", ""() ; CHECK: #APP @@ -12,7 +12,7 @@ invoke void @g() to label %bb2 unwind label %bb1 bb1: - landingpad { i8*, i32 } personality i8* bitcast (void ()* @g to i8*) + landingpad { i8*, i32 } catch i8* null call void @g() ret void Index: test/CodeGen/X86/exception-label.ll =================================================================== --- test/CodeGen/X86/exception-label.ll +++ test/CodeGen/X86/exception-label.ll @@ -8,13 +8,13 @@ declare void @g() -define void @f() { +define void @f() personality i8* bitcast (void ()* @g to i8*) { bb0: call void asm ".Lexception0:", ""() invoke void @g() to label %bb2 unwind label %bb1 bb1: - landingpad { i8*, i32 } personality i8* bitcast (void ()* @g to i8*) + landingpad { i8*, i32 } catch i8* null br label %bb2 Index: test/CodeGen/X86/fast-isel-cmp-branch.ll =================================================================== --- test/CodeGen/X86/fast-isel-cmp-branch.ll +++ test/CodeGen/X86/fast-isel-cmp-branch.ll @@ -12,7 +12,7 @@ declare void @bar() -define void @foo(i32 %a, i32 %b) nounwind { +define void @foo(i32 %a, i32 %b) nounwind personality i32 (...)* @__gxx_personality_v0 { entry: %q = add i32 %a, 7 %r = add i32 %b, 9 @@ -26,7 +26,7 @@ return: ret void unw: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup unreachable } Index: test/CodeGen/X86/fast-isel-gep.ll =================================================================== --- test/CodeGen/X86/fast-isel-gep.ll +++ test/CodeGen/X86/fast-isel-gep.ll @@ -89,7 +89,7 @@ ; PR9500, rdar://9156159 - Don't do non-local address mode folding, ; because it may require values which wouldn't otherwise be live out ; of their blocks. -define void @test6() { +define void @test6() personality i32 (...)* @__gxx_personality_v0 { if.end: ; preds = %if.then, %invoke.cont %tmp15 = load i64, i64* undef %dec = add i64 %tmp15, 13 @@ -103,7 +103,7 @@ unreachable lpad: ; preds = %if.end19, %if.then14, %if.end, %entry - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup unreachable } Index: test/CodeGen/X86/gcc_except_table.ll =================================================================== --- test/CodeGen/X86/gcc_except_table.ll +++ test/CodeGen/X86/gcc_except_table.ll @@ -3,7 +3,7 @@ ; RUN: llc -mtriple i686-pc-windows-gnu %s -o - | FileCheck %s --check-prefix=MINGW32 @_ZTIi = external constant i8* -define i32 @main() uwtable optsize ssp { +define i32 @main() uwtable optsize ssp personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { ; APPLE: .cfi_startproc ; APPLE: .cfi_personality 155, ___gxx_personality_v0 ; APPLE: .cfi_lsda 16, Lexception0 @@ -36,7 +36,7 @@ to label %try.cont unwind label %lpad lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } cleanup catch i8* bitcast (i8** @_ZTIi to i8*) br label %eh.resume Index: test/CodeGen/X86/gcc_except_table_functions.ll =================================================================== --- test/CodeGen/X86/gcc_except_table_functions.ll +++ test/CodeGen/X86/gcc_except_table_functions.ll @@ -10,7 +10,7 @@ declare void @_Z1fv() declare i32 @llvm.eh.typeid.for(i8*) -define i32 @main() uwtable { +define i32 @main() uwtable personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @_Z1fv() to label %try.cont unwind label %lpad @@ -19,7 +19,7 @@ ret i32 0 lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } cleanup catch i8* bitcast (void ()* @filt0 to i8*) catch i8* bitcast (void ()* @filt1 to i8*) Index: test/CodeGen/X86/global-sections.ll =================================================================== --- test/CodeGen/X86/global-sections.ll +++ test/CodeGen/X86/global-sections.ll @@ -61,12 +61,12 @@ declare void @G() -define void @F3(i32 %y) { +define void @F3(i32 %y) personality i8* bitcast (void ()* @G to i8*) { bb0: invoke void @G() to label %bb2 unwind label %bb1 bb1: - landingpad { i8*, i32 } personality i8* bitcast (void ()* @G to i8*) + landingpad { i8*, i32 } catch i8* null br label %bb2 bb2: Index: test/CodeGen/X86/inalloca-invoke.ll =================================================================== --- test/CodeGen/X86/inalloca-invoke.ll +++ test/CodeGen/X86/inalloca-invoke.ll @@ -11,7 +11,7 @@ declare void @plus(%Iter* sret, %Iter*, i32) declare void @reverse(%frame.reverse* inalloca align 4) -define i32 @main() { +define i32 @main() personality i32 (...)* @pers { %temp.lvalue = alloca %Iter br label %blah @@ -49,7 +49,7 @@ ret i32 0 lpad: ; preds = %invoke.cont, %entry - %lp = landingpad { i8*, i32 } personality i32 (...)* @pers + %lp = landingpad { i8*, i32 } cleanup unreachable } Index: test/CodeGen/X86/indirect-hidden.ll =================================================================== --- test/CodeGen/X86/indirect-hidden.ll +++ test/CodeGen/X86/indirect-hidden.ll @@ -8,10 +8,10 @@ declare void @throws() -define void @get_indirect_hidden() { +define void @get_indirect_hidden() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { invoke void @throws() to label %end unwind label %lpad lpad: - %tmp = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %tmp = landingpad { i8*, i32 } catch i8* bitcast (i8** @hidden_typeid to i8*) br label %end @@ -19,10 +19,10 @@ ret void } -define void @get_indirect() { +define void @get_indirect() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { invoke void @throws() to label %end unwind label %lpad lpad: - %tmp = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %tmp = landingpad { i8*, i32 } catch i8* bitcast (i8** @normal_typeid to i8*) br label %end Index: test/CodeGen/X86/large-gep-chain.ll =================================================================== --- test/CodeGen/X86/large-gep-chain.ll +++ test/CodeGen/X86/large-gep-chain.ll @@ -13,7 +13,7 @@ @7 = external unnamed_addr constant [27 x i8], align 1 @8 = external unnamed_addr constant [63 x i8], align 1 -define void @main() uwtable ssp { +define void @main() uwtable ssp personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { bb: br i1 undef, label %bb1, label %bb2 @@ -25313,7 +25313,7 @@ br label %bb25272 bb25276: ; preds = %bb25283, %bb25274, %bb25273 - %tmp25277 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %tmp25277 = landingpad { i8*, i32 } cleanup br label %bb25361 @@ -25383,7 +25383,7 @@ br label %bb25300 bb25298: ; preds = %bb25296, %bb25295, %bb25290, %bb25287 - %tmp25299 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %tmp25299 = landingpad { i8*, i32 } cleanup br label %bb25360 @@ -25461,7 +25461,7 @@ to label %bb25326 unwind label %bb25324 bb25324: ; preds = %bb25357, %bb25344, %bb25343, %bb25342, %bb25337, %bb25334, %bb25333, %bb25323, %bb25313, %bb25307, %bb25306 - %tmp25325 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %tmp25325 = landingpad { i8*, i32 } cleanup br label %bb25359 @@ -25562,7 +25562,7 @@ br label %bb25358 bb25355: ; preds = %bb25353, %bb25352, %bb25351 - %tmp25356 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %tmp25356 = landingpad { i8*, i32 } cleanup br label %bb25359 Index: test/CodeGen/X86/patchpoint-invoke.ll =================================================================== --- test/CodeGen/X86/patchpoint-invoke.ll +++ test/CodeGen/X86/patchpoint-invoke.ll @@ -2,7 +2,7 @@ ; Test invoking of patchpoints ; -define i64 @patchpoint_invoke(i64 %p1, i64 %p2) { +define i64 @patchpoint_invoke(i64 %p1, i64 %p2) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: ; CHECK-LABEL: patchpoint_invoke: ; CHECK-NEXT: [[FUNC_BEGIN:.L.*]]: @@ -25,7 +25,7 @@ ret i64 %result threw: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } catch i8* null ret i64 0 } Index: test/CodeGen/X86/personality.ll =================================================================== --- test/CodeGen/X86/personality.ll +++ test/CodeGen/X86/personality.ll @@ -2,13 +2,13 @@ ; RUN: llc < %s -mtriple=i386-apple-darwin9 | FileCheck %s -check-prefix=X32 ; PR1632 -define void @_Z1fv() { +define void @_Z1fv() personality i32 (...)* @__gxx_personality_v0 { entry: invoke void @_Z1gv() to label %return unwind label %unwind unwind: ; preds = %entry - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup br i1 false, label %eh_then, label %cleanup20 @@ -17,7 +17,7 @@ to label %return unwind label %unwind10 unwind10: ; preds = %eh_then - %exn10 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn10 = landingpad {i8*, i32} cleanup %upgraded.eh_select13 = extractvalue { i8*, i32 } %exn10, 1 %upgraded.eh_select131 = sext i32 %upgraded.eh_select13 to i64 Index: test/CodeGen/X86/personality_size.ll =================================================================== --- test/CodeGen/X86/personality_size.ll +++ test/CodeGen/X86/personality_size.ll @@ -2,13 +2,13 @@ ; RUN: llc < %s -relocation-model=pic -mtriple=i386-pc-solaris2.11 | FileCheck %s -check-prefix=X32 ; PR1632 -define void @_Z1fv() { +define void @_Z1fv() personality i32 (...)* @__gxx_personality_v0 { entry: invoke void @_Z1gv() to label %return unwind label %unwind unwind: ; preds = %entry - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup ret void Index: test/CodeGen/X86/pr3522.ll =================================================================== --- test/CodeGen/X86/pr3522.ll +++ test/CodeGen/X86/pr3522.ll @@ -5,7 +5,7 @@ target triple = "i386-pc-linux-gnu" @.str = external constant [13 x i8] ; <[13 x i8]*> [#uses=1] -define void @_ada_c34018a() { +define void @_ada_c34018a() personality i32 (...)* @__gxx_personality_v0 { entry: %0 = tail call i32 @report__ident_int(i32 90) ; <i32> [#uses=1] %1 = trunc i32 %0 to i8 ; <i8> [#uses=1] @@ -22,7 +22,7 @@ ret void lpad: ; preds = %entry - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup %2 = icmp eq i8 %1, 90 ; <i1> [#uses=1] br i1 %2, label %return, label %bb22 Index: test/CodeGen/X86/scev-interchange.ll =================================================================== --- test/CodeGen/X86/scev-interchange.ll +++ test/CodeGen/X86/scev-interchange.ll @@ -51,7 +51,7 @@ declare fastcc void @_ZN4FE_QILi3EE14get_dpo_vectorEj(%"struct.std::vector<int,std::allocator<int> >"* noalias nocapture sret, i32) -define fastcc void @_ZN4FE_QILi3EEC1Ej(i32 %degree) { +define fastcc void @_ZN4FE_QILi3EEC1Ej(i32 %degree) personality i32 (...)* @__gxx_personality_v0 { entry: invoke fastcc void @_ZNSt6vectorIbSaIbEEC1EmRKbRKS0_(%"struct.std::vector<bool,std::allocator<bool> >"* undef, i64 1, i8* undef) to label %invcont.i unwind label %lpad.i @@ -149,7 +149,7 @@ to label %_ZNSt12_Vector_baseIjSaIjEEC2EmRKS0_.exit.i.i.i.i.i unwind label %lpad.i.i.i.i.i.i ; <i8*> [#uses=0] lpad.i.i.i.i.i.i: ; preds = %bb71.i - %exn.i.i.i.i.i.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn.i.i.i.i.i.i = landingpad {i8*, i32} cleanup unreachable @@ -164,7 +164,7 @@ to label %_ZNSt12_Vector_baseIjSaIjEEC2EmRKS0_.exit.i.i.i12.i.i unwind label %lpad.i.i.i.i8.i.i ; <i8*> [#uses=0] lpad.i.i.i.i8.i.i: ; preds = %_ZNSt6vectorIjSaIjEED1Ev.exit.i.i - %exn.i.i.i.i8.i.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn.i.i.i.i8.i.i = landingpad {i8*, i32} cleanup invoke void @_Unwind_Resume(i8* undef) to label %.noexc.i9.i.i unwind label %lpad.i19.i.i @@ -183,7 +183,7 @@ to label %bb83.i unwind label %lpad188.i lpad.i19.i.i: ; preds = %lpad.i.i.i.i8.i.i - %exn.i19.i.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn.i19.i.i = landingpad {i8*, i32} cleanup unreachable @@ -198,7 +198,7 @@ to label %_ZNSt12_Vector_baseIjSaIjEEC2EmRKS0_.exit.i.i.i.i unwind label %lpad.i.i.i.i315.i ; <i8*> [#uses=0] lpad.i.i.i.i315.i: ; preds = %invcont84.i - %exn.i.i.i.i315.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn.i.i.i.i315.i = landingpad {i8*, i32} cleanup invoke void @_Unwind_Resume(i8* undef) to label %.noexc.i316.i unwind label %lpad.i352.i @@ -217,7 +217,7 @@ to label %invcont86.i unwind label %lpad200.i lpad.i352.i: ; preds = %lpad.i.i.i.i315.i - %exn.i352.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn.i352.i = landingpad {i8*, i32} cleanup unreachable @@ -242,7 +242,7 @@ to label %_ZN10FullMatrixIdEC1Ejj.exit.i.i unwind label %lpad.i.i.i.i.i lpad.i.i.i.i.i: ; preds = %invcont101.i - %exn.i.i.i.i.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn.i.i.i.i.i = landingpad {i8*, i32} cleanup unreachable @@ -251,7 +251,7 @@ to label %_ZN10FullMatrixIdEC1Ejj.exit28.i.i unwind label %lpad.i.i.i27.i.i lpad.i.i.i27.i.i: ; preds = %_ZN10FullMatrixIdEC1Ejj.exit.i.i - %exn.i.i.i27.i.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn.i.i.i27.i.i = landingpad {i8*, i32} cleanup invoke void @_Unwind_Resume(i8* undef) to label %.noexc.i.i unwind label %lpad.i.i @@ -272,7 +272,7 @@ unreachable lpad.i.i: ; preds = %lpad.i.i.i27.i.i - %exn.i.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn.i.i = landingpad {i8*, i32} cleanup unreachable @@ -312,67 +312,67 @@ br label %bb9.i216.i lpad.i: ; preds = %entry - %exn.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn.i = landingpad {i8*, i32} cleanup unreachable lpad120.i: ; preds = %invcont.i - %exn120.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn120.i = landingpad {i8*, i32} cleanup unreachable lpad124.i: ; preds = %invcont1.i - %exn124.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn124.i = landingpad {i8*, i32} cleanup unreachable lpad128.i: ; preds = %invcont3.i - %exn128.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn128.i = landingpad {i8*, i32} cleanup unreachable lpad132.i: ; preds = %invcont4.i - %exn132.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn132.i = landingpad {i8*, i32} cleanup unreachable lpad136.i: ; preds = %invcont6.i - %exn136.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn136.i = landingpad {i8*, i32} cleanup unreachable lpad140.i: ; preds = %bb21.i, %invcont7.i - %exn140.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn140.i = landingpad {i8*, i32} cleanup unreachable lpad144.i: ; preds = %bb10.i168.i, %invcont9.i - %exn144.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn144.i = landingpad {i8*, i32} cleanup unreachable lpad148.i: ; preds = %invcont10.i - %exn148.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn148.i = landingpad {i8*, i32} cleanup unreachable lpad188.i: ; preds = %bb50.i.i.i - %exn188.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn188.i = landingpad {i8*, i32} cleanup unreachable lpad196.i: ; preds = %bb.i191.i - %exn196 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn196 = landingpad {i8*, i32} cleanup unreachable lpad200.i: ; preds = %bb50.i.i - %exn200.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn200.i = landingpad {i8*, i32} cleanup unreachable lpad204.i: ; preds = %invcont86.i - %exn204.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn204.i = landingpad {i8*, i32} cleanup unreachable } Index: test/CodeGen/X86/seh-catch-all-win32.ll =================================================================== --- test/CodeGen/X86/seh-catch-all-win32.ll +++ test/CodeGen/X86/seh-catch-all-win32.ll @@ -14,7 +14,7 @@ declare void @llvm.frameescape(...) declare i8* @llvm.x86.seh.exceptioninfo(i8*, i8*) -define i32 @main() { +define i32 @main() personality i8* bitcast (i32 (...)* @_except_handler3 to i8*) { entry: %__exceptioncode = alloca i32, align 4 call void (...) @llvm.frameescape(i32* %__exceptioncode) @@ -22,7 +22,7 @@ to label %__try.cont unwind label %lpad lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @_except_handler3 to i8*) + %0 = landingpad { i8*, i32 } catch i8* bitcast (i32 ()* @"filt$main" to i8*) %1 = extractvalue { i8*, i32 } %0, 1 %2 = call i32 @llvm.eh.typeid.for(i8* bitcast (i32 ()* @"filt$main" to i8*)) #4 Index: test/CodeGen/X86/seh-catch-all.ll =================================================================== --- test/CodeGen/X86/seh-catch-all.ll +++ test/CodeGen/X86/seh-catch-all.ll @@ -6,13 +6,13 @@ declare void @crash() declare i32 @printf(i8* nocapture readonly, ...) nounwind -define i32 @main() { +define i32 @main() personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) { entry: invoke void @crash() to label %__try.cont unwind label %lpad lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) + %0 = landingpad { i8*, i32 } catch i8* null %1 = extractvalue { i8*, i32 } %0, 0 %2 = ptrtoint i8* %1 to i64 Index: test/CodeGen/X86/seh-except-finally.ll =================================================================== --- test/CodeGen/X86/seh-except-finally.ll +++ test/CodeGen/X86/seh-except-finally.ll @@ -33,7 +33,7 @@ declare i32 @filt() ; Function Attrs: nounwind uwtable -define void @use_both() #1 { +define void @use_both() #1 personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) { entry: %exn.slot = alloca i8* %ehselector.slot = alloca i32 @@ -49,7 +49,7 @@ br label %__try.cont lpad: ; preds = %entry - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) + %1 = landingpad { i8*, i32 } cleanup catch i8* bitcast (i32 (i8*, i8*)* @"\01?filt$0@0@use_both@@" to i8*) %2 = extractvalue { i8*, i32 } %1, 0 @@ -61,7 +61,7 @@ to label %invoke.cont3 unwind label %lpad1 lpad1: ; preds = %lpad, %invoke.cont - %5 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) + %5 = landingpad { i8*, i32 } catch i8* bitcast (i32 (i8*, i8*)* @"\01?filt$0@0@use_both@@" to i8*) %6 = extractvalue { i8*, i32 } %5, 0 store i8* %6, i8** %exn.slot Index: test/CodeGen/X86/seh-filter.ll =================================================================== --- test/CodeGen/X86/seh-filter.ll +++ test/CodeGen/X86/seh-filter.ll @@ -1,14 +1,14 @@ ; RUN: llc -O0 -mtriple=x86_64-windows-msvc < %s | FileCheck %s declare void @g() -define void @f() { +define void @f() personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) { invoke void @g() to label %return unwind label %lpad return: ret void lpad: - %ehptrs = landingpad {i8*, i32} personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) + %ehptrs = landingpad {i8*, i32} filter [0 x i8*] zeroinitializer call void @__cxa_call_unexpected(i8* null) unreachable Index: test/CodeGen/X86/seh-finally.ll =================================================================== --- test/CodeGen/X86/seh-finally.ll +++ test/CodeGen/X86/seh-finally.ll @@ -6,7 +6,7 @@ declare void @crash() -define i32 @main() { +define i32 @main() personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) { entry: invoke void @crash() to label %invoke.cont unwind label %lpad @@ -17,7 +17,7 @@ ret i32 0 lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) + %0 = landingpad { i8*, i32 } cleanup %1 = extractvalue { i8*, i32 } %0, 0 %2 = extractvalue { i8*, i32 } %0, 1 @@ -28,7 +28,7 @@ resume { i8*, i32 } %0 terminate.lpad: ; preds = %lpad - %3 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) + %3 = landingpad { i8*, i32 } catch i8* null call void @abort() unreachable Index: test/CodeGen/X86/seh-safe-div-win32.ll =================================================================== --- test/CodeGen/X86/seh-safe-div-win32.ll +++ test/CodeGen/X86/seh-safe-div-win32.ll @@ -23,7 +23,7 @@ @str1 = internal constant [27 x i8] c"EXCEPTION_ACCESS_VIOLATION\00" @str2 = internal constant [29 x i8] c"EXCEPTION_INT_DIVIDE_BY_ZERO\00" -define i32 @safe_div(i32* %n, i32* %d) { +define i32 @safe_div(i32* %n, i32* %d) personality i8* bitcast (i32 (...)* @_except_handler3 to i8*) { entry: %r = alloca i32, align 4 store i32 42, i32* %r @@ -31,7 +31,7 @@ to label %__try.cont unwind label %lpad lpad: - %vals = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @_except_handler3 to i8*) + %vals = landingpad { i8*, i32 } catch i8* bitcast (i32 ()* @safe_div_filt0 to i8*) catch i8* bitcast (i32 ()* @safe_div_filt1 to i8*) %ehptr = extractvalue { i8*, i32 } %vals, 0 Index: test/CodeGen/X86/seh-safe-div.ll =================================================================== --- test/CodeGen/X86/seh-safe-div.ll +++ test/CodeGen/X86/seh-safe-div.ll @@ -23,14 +23,14 @@ @str1 = internal constant [27 x i8] c"EXCEPTION_ACCESS_VIOLATION\00" @str2 = internal constant [29 x i8] c"EXCEPTION_INT_DIVIDE_BY_ZERO\00" -define i32 @safe_div(i32* %n, i32* %d) { +define i32 @safe_div(i32* %n, i32* %d) personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) { entry: %r = alloca i32, align 4 invoke void @try_body(i32* %r, i32* %n, i32* %d) to label %__try.cont unwind label %lpad lpad: - %vals = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) + %vals = landingpad { i8*, i32 } catch i8* bitcast (i32 (i8*, i8*)* @safe_div_filt0 to i8*) catch i8* bitcast (i32 (i8*, i8*)* @safe_div_filt1 to i8*) %ehptr = extractvalue { i8*, i32 } %vals, 0 Index: test/CodeGen/X86/setjmp-spills.ll =================================================================== --- test/CodeGen/X86/setjmp-spills.ll +++ test/CodeGen/X86/setjmp-spills.ll @@ -78,7 +78,7 @@ ; This is the same as above, but using "invoke" rather than "call" to ; call setjmp(). -define void @setjmp_invoker() { +define void @setjmp_invoker() personality void ()* @personality { ; X86-32-LABEL: setjmp_invoker: ; X86-64-LABEL: setjmp_invoker: %a1 = call i32 @get_val() @@ -103,7 +103,7 @@ br i1 %setjmp_result, label %second, label %first lpad: - %lp = landingpad { i8*, i32 } personality void ()* @personality cleanup + %lp = landingpad { i8*, i32 } cleanup unreachable first: Index: test/CodeGen/X86/split-eh-lpad-edges.ll =================================================================== --- test/CodeGen/X86/split-eh-lpad-edges.ll +++ test/CodeGen/X86/split-eh-lpad-edges.ll @@ -10,7 +10,7 @@ %struct.objc_selector = type opaque @"\01l_objc_msgSend_fixup_alloc" = external global %struct._message_ref_t, align 16 ; <%struct._message_ref_t*> [#uses=2] -define %struct.NSArray* @newFetchedRowsForFetchPlan_MT(%struct.FetchPlanHeader* %fetchPlan, %struct.objc_selector* %selectionMethod, %struct.NSObject* %selectionParameter) ssp { +define %struct.NSArray* @newFetchedRowsForFetchPlan_MT(%struct.FetchPlanHeader* %fetchPlan, %struct.objc_selector* %selectionMethod, %struct.NSObject* %selectionParameter) ssp personality i32 (...)* @__gxx_personality_v0 { entry: %0 = invoke %struct.NSObject* null(%struct.NSObject* null, %struct._message_ref_t* @"\01l_objc_msgSend_fixup_alloc") to label %invcont unwind label %lpad ; <%struct.NSObject*> [#uses=1] @@ -28,7 +28,7 @@ lpad: ; preds = %invcont26, %invcont, %entry %pool.1 = phi %struct.NSAutoreleasePool* [ null, %entry ], [ null, %invcont ], [ null, %invcont26 ] ; <%struct.NSAutoreleasePool*> [#uses=0] - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup unreachable } Index: test/CodeGen/X86/stack-protector.ll =================================================================== --- test/CodeGen/X86/stack-protector.ll +++ test/CodeGen/X86/stack-protector.ll @@ -2097,7 +2097,7 @@ ; test18a: Addr-of a variable passed into an invoke instruction. ; no ssp attribute ; Requires no protector. -define i32 @test18a() { +define i32 @test18a() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: ; LINUX-I386-LABEL: test18a: ; LINUX-I386-NOT: calll __stack_chk_fail @@ -2125,7 +2125,7 @@ ret i32 0 lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } catch i8* null ret i32 0 } @@ -2134,7 +2134,7 @@ ; ssp attribute ; Requires no protector. ; Function Attrs: ssp -define i32 @test18b() #0 { +define i32 @test18b() #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: ; LINUX-I386-LABEL: test18b: ; LINUX-I386-NOT: calll __stack_chk_fail @@ -2162,7 +2162,7 @@ ret i32 0 lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } catch i8* null ret i32 0 } @@ -2171,7 +2171,7 @@ ; sspstrong attribute ; Requires protector. ; Function Attrs: sspstrong -define i32 @test18c() #1 { +define i32 @test18c() #1 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: ; LINUX-I386-LABEL: test18c: ; LINUX-I386: mov{{l|q}} %gs: @@ -2199,7 +2199,7 @@ ret i32 0 lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } catch i8* null ret i32 0 } @@ -2208,7 +2208,7 @@ ; sspreq attribute ; Requires protector. ; Function Attrs: sspreq -define i32 @test18d() #2 { +define i32 @test18d() #2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: ; LINUX-I386-LABEL: test18d: ; LINUX-I386: mov{{l|q}} %gs: @@ -2236,7 +2236,7 @@ ret i32 0 lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } catch i8* null ret i32 0 } @@ -2244,7 +2244,7 @@ ; (GEP followed by an invoke) ; no ssp attribute ; Requires no protector. -define i32 @test19a() { +define i32 @test19a() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: ; LINUX-I386-LABEL: test19a: ; LINUX-I386-NOT: calll __stack_chk_fail @@ -2274,7 +2274,7 @@ ret i32 0 lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } catch i8* null ret i32 0 } @@ -2284,7 +2284,7 @@ ; ssp attribute ; Requires no protector. ; Function Attrs: ssp -define i32 @test19b() #0 { +define i32 @test19b() #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: ; LINUX-I386-LABEL: test19b: ; LINUX-I386-NOT: calll __stack_chk_fail @@ -2314,7 +2314,7 @@ ret i32 0 lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } catch i8* null ret i32 0 } @@ -2324,7 +2324,7 @@ ; sspstrong attribute ; Requires protector. ; Function Attrs: sspstrong -define i32 @test19c() #1 { +define i32 @test19c() #1 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: ; LINUX-I386-LABEL: test19c: ; LINUX-I386: mov{{l|q}} %gs: @@ -2354,7 +2354,7 @@ ret i32 0 lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } catch i8* null ret i32 0 } @@ -2364,7 +2364,7 @@ ; sspreq attribute ; Requires protector. ; Function Attrs: sspreq -define i32 @test19d() #2 { +define i32 @test19d() #2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: ; LINUX-I386-LABEL: test19d: ; LINUX-I386: mov{{l|q}} %gs: @@ -2398,7 +2398,7 @@ ret i32 0 lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } catch i8* null ret i32 0 } Index: test/CodeGen/X86/statepoint-invoke.ll =================================================================== --- test/CodeGen/X86/statepoint-invoke.ll +++ test/CodeGen/X86/statepoint-invoke.ll @@ -9,7 +9,7 @@ define i64 addrspace(1)* @test_basic(i64 addrspace(1)* %obj, i64 addrspace(1)* %obj1) -gc "statepoint-example" { +gc "statepoint-example" personality i32 ()* @"personality_function" { entry: ; CHECK: Ltmp{{[0-9]+}}: ; CHECK: callq some_call @@ -31,7 +31,7 @@ ; CHECK: Ltmp{{[0-9]+}}: ; CHECK: movq ; CHECK: retq - %landing_pad = landingpad { i8*, i32 } personality i32 ()* @"personality_function" + %landing_pad = landingpad { i8*, i32 } cleanup %relocate_token = extractvalue { i8*, i32 } %landing_pad, 1 %obj.relocated1 = call coldcc i64 addrspace(1)* @llvm.experimental.gc.relocate.p1i64(i32 %relocate_token, i32 13, i32 13) @@ -46,7 +46,7 @@ define i64 addrspace(1)* @test_result(i64 addrspace(1)* %obj, i64 addrspace(1)* %obj1) - gc "statepoint-example" { + gc "statepoint-example" personality i32 ()* @personality_function { entry: ; CHECK: .Ltmp{{[0-9]+}}: ; CHECK: callq some_other_call @@ -63,7 +63,7 @@ exceptional_return: ; CHECK: .Ltmp{{[0-9]+}}: ; CHECK: movq - %landing_pad = landingpad { i8*, i32 } personality i32 ()* @personality_function + %landing_pad = landingpad { i8*, i32 } cleanup %relocate_token = extractvalue { i8*, i32 } %landing_pad, 1 %obj.relocated = call coldcc i64 addrspace(1)* @llvm.experimental.gc.relocate.p1i64(i32 %relocate_token, i32 13, i32 13) @@ -76,7 +76,7 @@ ; CHECK: .align 4 define i64 addrspace(1)* @test_same_val(i1 %cond, i64 addrspace(1)* %val1, i64 addrspace(1)* %val2, i64 addrspace(1)* %val3) - gc "statepoint-example" { + gc "statepoint-example" personality i32 ()* @"personality_function" { entry: br i1 %cond, label %left, label %right @@ -120,14 +120,14 @@ ret i64 addrspace(1)* %ret exceptional_return.left: - %landing_pad = landingpad { i8*, i32 } personality i32 ()* @"personality_function" + %landing_pad = landingpad { i8*, i32 } cleanup %relocate_token = extractvalue { i8*, i32 } %landing_pad, 1 %val.relocated2 = call coldcc i64 addrspace(1)* @llvm.experimental.gc.relocate.p1i64(i32 %relocate_token, i32 13, i32 13) ret i64 addrspace(1)* %val.relocated2 exceptional_return.right: - %landing_pad1 = landingpad { i8*, i32 } personality i32 ()* @"personality_function" + %landing_pad1 = landingpad { i8*, i32 } cleanup %relocate_token1 = extractvalue { i8*, i32 } %landing_pad1, 1 %val.relocated3 = call coldcc i64 addrspace(1)* @llvm.experimental.gc.relocate.p1i64(i32 %relocate_token1, i32 13, i32 13) @@ -135,7 +135,7 @@ } define i64 addrspace(1)* @test_null_undef(i64 addrspace(1)* %val1) - gc "statepoint-example" { + gc "statepoint-example" personality i32 ()* @"personality_function" { ; CHECK-LABEL: test_null_undef: entry: ; CHECK: callq some_call @@ -152,7 +152,7 @@ ret i64 addrspace(1)* %null.relocated exceptional_return: - %landing_pad = landingpad { i8*, i32 } personality i32 ()* @"personality_function" + %landing_pad = landingpad { i8*, i32 } cleanup %relocate_token = extractvalue { i8*, i32 } %landing_pad, 1 %null.relocated2 = call coldcc i64 addrspace(1)* @llvm.experimental.gc.relocate.p1i64(i32 %relocate_token, i32 13, i32 13) @@ -161,7 +161,7 @@ } define i64 addrspace(1)* @test_alloca_and_const(i64 addrspace(1)* %val1) - gc "statepoint-example" { + gc "statepoint-example" personality i32 ()* @"personality_function" { ; CHECK-LABEL: test_alloca_and_const: entry: %a = alloca i32 @@ -183,7 +183,7 @@ ; CHECK: movl $15 ; CHECK-NEXT: popq ; CHECK-NEXT: retq - %landing_pad = landingpad { i8*, i32 } personality i32 ()* @"personality_function" + %landing_pad = landingpad { i8*, i32 } cleanup %relocate_token = extractvalue { i8*, i32 } %landing_pad, 1 %aa.rel2 = call coldcc i64 addrspace(1)* @llvm.experimental.gc.relocate.p1i64(i32 %relocate_token, i32 14, i32 14) Index: test/CodeGen/X86/statepoint-stack-usage.ll =================================================================== --- test/CodeGen/X86/statepoint-stack-usage.ll +++ test/CodeGen/X86/statepoint-stack-usage.ll @@ -53,7 +53,7 @@ } ; Test that stack slots are reused for invokes -define i32 @back_to_back_invokes(i32 addrspace(1)* %a, i32 addrspace(1)* %b, i32 addrspace(1)* %c) #1 gc "statepoint-example" { +define i32 @back_to_back_invokes(i32 addrspace(1)* %a, i32 addrspace(1)* %b, i32 addrspace(1)* %c) #1 gc "statepoint-example" personality i32 ()* @"personality_function" { ; CHECK-LABEL: back_to_back_invokes entry: ; The exact stores don't matter, but there need to be three stack slots created @@ -83,12 +83,12 @@ ret i32 1 exceptional_return: - %landing_pad = landingpad { i8*, i32 } personality i32 ()* @"personality_function" + %landing_pad = landingpad { i8*, i32 } cleanup ret i32 0 exceptional_return2: - %landing_pad2 = landingpad { i8*, i32 } personality i32 ()* @"personality_function" + %landing_pad2 = landingpad { i8*, i32 } cleanup ret i32 0 } Index: test/CodeGen/X86/win32-eh-states.ll =================================================================== --- test/CodeGen/X86/win32-eh-states.ll +++ test/CodeGen/X86/win32-eh-states.ll @@ -30,7 +30,7 @@ @"\01??_R0H@8" = linkonce_odr global %rtti.TypeDescriptor2 { i8** @"\01??_7type_info@@6B@", i8* null, [3 x i8] c".H\00" }, comdat @llvm.eh.handlertype.H.0 = private unnamed_addr constant %eh.CatchHandlerType { i32 0, i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i8*) }, section "llvm.metadata" -define void @f() #0 { +define void @f() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: invoke void @may_throw(i32 1) to label %invoke.cont unwind label %lpad @@ -46,14 +46,14 @@ ret void lpad: ; preds = %catch, %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %0 = landingpad { i8*, i32 } catch %eh.CatchHandlerType* @llvm.eh.handlertype.H.0 %1 = extractvalue { i8*, i32 } %0, 0 %2 = extractvalue { i8*, i32 } %0, 1 br label %catch.dispatch.4 lpad.1: ; preds = %invoke.cont - %3 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %3 = landingpad { i8*, i32 } catch i8* bitcast (%eh.CatchHandlerType* @llvm.eh.handlertype.H.0 to i8*) %4 = extractvalue { i8*, i32 } %3, 0 %5 = extractvalue { i8*, i32 } %3, 1 Index: test/CodeGen/X86/win32-eh.ll =================================================================== --- test/CodeGen/X86/win32-eh.ll +++ test/CodeGen/X86/win32-eh.ll @@ -12,14 +12,14 @@ ret i32 1 } -define void @use_except_handler3() { +define void @use_except_handler3() personality i32 (...)* @_except_handler3 { entry: invoke void @may_throw_or_crash() to label %cont unwind label %catchall cont: ret void catchall: - %0 = landingpad { i8*, i32 } personality i32 (...)* @_except_handler3 + %0 = landingpad { i8*, i32 } catch i8* bitcast (i32 ()* @catchall_filt to i8*) %1 = extractvalue { i8*, i32 } %0, 1 %2 = call i32 @llvm.eh.typeid.for(i8* bitcast (i32 ()* @catchall_filt to i8*)) #4 @@ -51,14 +51,14 @@ ; CHECK-NEXT: .long _catchall_filt ; CHECK-NEXT: .long Ltmp{{[0-9]+}} -define void @use_except_handler4() { +define void @use_except_handler4() personality i32 (...)* @_except_handler4 { entry: invoke void @may_throw_or_crash() to label %cont unwind label %catchall cont: ret void catchall: - %0 = landingpad { i8*, i32 } personality i32 (...)* @_except_handler4 + %0 = landingpad { i8*, i32 } catch i8* bitcast (i32 ()* @catchall_filt to i8*) %1 = extractvalue { i8*, i32 } %0, 1 %2 = call i32 @llvm.eh.typeid.for(i8* bitcast (i32 ()* @catchall_filt to i8*)) #4 @@ -97,13 +97,13 @@ ; CHECK-NEXT: .long _catchall_filt ; CHECK-NEXT: .long Ltmp{{[0-9]+}} -define void @use_CxxFrameHandler3() { +define void @use_CxxFrameHandler3() personality i32 (...)* @__CxxFrameHandler3 { invoke void @may_throw_or_crash() to label %cont unwind label %catchall cont: ret void catchall: - %ehvals = landingpad { i8*, i32 } personality i32 (...)* @__CxxFrameHandler3 + %ehvals = landingpad { i8*, i32 } catch i8* null %ehptr = extractvalue { i8*, i32 } %ehvals, 0 call void @llvm.eh.begincatch(i8* %ehptr, i8* null) Index: test/CodeGen/X86/win64_call_epi.ll =================================================================== --- test/CodeGen/X86/win64_call_epi.ll +++ test/CodeGen/X86/win64_call_epi.ll @@ -5,7 +5,7 @@ declare i32 @personality(...) ; Check for 'nop' between the last call and the epilogue. -define void @foo1() { +define void @foo1() personality i32 (...)* @personality { invoke void @bar() to label %normal @@ -15,7 +15,7 @@ ret void catch: - %1 = landingpad { i8*, i32 } personality i32 (...)* @personality cleanup + %1 = landingpad { i8*, i32 } cleanup resume { i8*, i32 } %1 } ; WIN64-LABEL: foo1: Index: test/CodeGen/X86/win64_eh.ll =================================================================== --- test/CodeGen/X86/win64_eh.ll +++ test/CodeGen/X86/win64_eh.ll @@ -101,7 +101,7 @@ declare i32 @bar() -define i32 @foo4() #0 { +define i32 @foo4() #0 personality i32 (i32, i32, i64, i8*, i8*)* @_d_eh_personality { entry: %step = alloca i32, align 4 store i32 0, i32* %step @@ -115,7 +115,7 @@ br label %endtryfinally landingpad: - %landing_pad = landingpad { i8*, i32 } personality i32 (i32, i32, i64, i8*, i8*)* @_d_eh_personality + %landing_pad = landingpad { i8*, i32 } cleanup %tmp3 = extractvalue { i8*, i32 } %landing_pad, 0 store i32 2, i32* %step Index: test/CodeGen/X86/win_eh_prepare.ll =================================================================== --- test/CodeGen/X86/win_eh_prepare.ll +++ test/CodeGen/X86/win_eh_prepare.ll @@ -11,7 +11,7 @@ declare i32 @__gxx_personality_seh0(...) declare i32 @llvm.eh.typeid.for(i8*) readnone nounwind -define i32 @use_seh() { +define i32 @use_seh() personality i32 (...)* @__C_specific_handler { entry: invoke void @maybe_throw() to label %cont unwind label %lpad @@ -20,7 +20,7 @@ ret i32 0 lpad: - %ehvals = landingpad { i8*, i32 } personality i32 (...)* @__C_specific_handler + %ehvals = landingpad { i8*, i32 } cleanup catch i8* bitcast (i32 (i8*, i8*)* @filt_g to i8*) %ehsel = extractvalue { i8*, i32 } %ehvals, 1 @@ -51,7 +51,7 @@ ; A MinGW64-ish EH style. It could happen if a binary uses both MSVC CRT and ; mingw CRT and is linked with LTO. -define i32 @use_gcc() { +define i32 @use_gcc() personality i32 (...)* @__gxx_personality_seh0 { entry: invoke void @maybe_throw() to label %cont unwind label %lpad @@ -60,7 +60,7 @@ ret i32 0 lpad: - %ehvals = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_seh0 + %ehvals = landingpad { i8*, i32 } cleanup catch i8* bitcast (i8** @_ZTIi to i8*) %ehsel = extractvalue { i8*, i32 } %ehvals, 1 Index: test/CodeGen/XCore/exception.ll =================================================================== --- test/CodeGen/XCore/exception.ll +++ test/CodeGen/XCore/exception.ll @@ -47,7 +47,7 @@ ; CHECK: entsp 4 ; CHECK: .cfi_def_cfa_offset 16 ; CHECK: .cfi_offset 15, 0 -define void @fn_catch() { +define void @fn_catch() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: ; N.B. we alloc no variables, hence force compiler to spill @@ -77,7 +77,7 @@ ; CHECK: ldw r6, r0[0] ; CHECK: bl __cxa_end_catch lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } cleanup catch i8* bitcast (i8** @_ZTIi to i8*) catch i8* bitcast (i8** @_ZTId to i8*) Index: test/DebugInfo/AArch64/eh_frame_personality.ll =================================================================== --- test/DebugInfo/AArch64/eh_frame_personality.ll +++ test/DebugInfo/AArch64/eh_frame_personality.ll @@ -5,13 +5,13 @@ declare void @bar() -define i64 @foo(i64 %lhs, i64 %rhs) { +define i64 @foo(i64 %lhs, i64 %rhs) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { invoke void @bar() to label %end unwind label %clean end: ret i64 0 clean: - %tst = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) cleanup + %tst = landingpad { i8*, i32 } cleanup ret i64 42 } Index: test/DebugInfo/AArch64/frameindices.ll =================================================================== --- test/DebugInfo/AArch64/frameindices.ll +++ test/DebugInfo/AArch64/frameindices.ll @@ -83,7 +83,7 @@ ret void, !dbg !73 } -define void @_Z3f16v() #0 { +define void @_Z3f16v() #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: %agg.tmp.i.i = alloca %struct.A, align 8 %d = alloca %struct.B, align 1 @@ -127,7 +127,7 @@ ret void, !dbg !94 lpad: ; preds = %call.i.i.noexc, %entry - %3 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %3 = landingpad { i8*, i32 } cleanup, !dbg !94 call void @llvm.dbg.value(metadata %struct.B* %d, i64 0, metadata !39, metadata !79), !dbg !82 %call2 = call %struct.B* @_ZN1BD1Ev(%struct.B* %d) #3, !dbg !94 Index: test/DebugInfo/SystemZ/eh_frame_personality.ll =================================================================== --- test/DebugInfo/SystemZ/eh_frame_personality.ll +++ test/DebugInfo/SystemZ/eh_frame_personality.ll @@ -6,13 +6,13 @@ declare void @bar() -define i64 @foo(i64 %lhs, i64 %rhs) { +define i64 @foo(i64 %lhs, i64 %rhs) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { invoke void @bar() to label %end unwind label %clean end: ret i64 0 clean: - %tst = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) cleanup + %tst = landingpad { i8*, i32 } cleanup ret i64 42 } Index: test/DebugInfo/X86/arange-and-stub.ll =================================================================== --- test/DebugInfo/X86/arange-and-stub.ll +++ test/DebugInfo/X86/arange-and-stub.ll @@ -16,7 +16,7 @@ ret void } -define void @bar() { +define void @bar() personality i8* bitcast (void ()* @foo to i8*) { invoke void @foo() to label %invoke.cont unwind label %lpad @@ -24,7 +24,7 @@ ret void lpad: ; preds = %0 - %tmp1 = landingpad { i8*, i32 } personality i8* bitcast (void ()* @foo to i8*) + %tmp1 = landingpad { i8*, i32 } filter [1 x i8*] [i8* bitcast (i8** @_ZTId to i8*)] ret void } Index: test/DebugInfo/X86/sret.ll =================================================================== --- test/DebugInfo/X86/sret.ll +++ test/DebugInfo/X86/sret.ll @@ -124,7 +124,7 @@ } ; Function Attrs: uwtable -define i32 @main(i32 %argc, i8** %argv) #2 { +define i32 @main(i32 %argc, i8** %argv) #2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: %retval = alloca i32, align 4 %argc.addr = alloca i32, align 4 @@ -161,7 +161,7 @@ ret i32 %1, !dbg !116 lpad: ; preds = %entry - %2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %2 = landingpad { i8*, i32 } cleanup, !dbg !116 %3 = extractvalue { i8*, i32 } %2, 0, !dbg !116 store i8* %3, i8** %exn.slot, !dbg !116 @@ -181,7 +181,7 @@ resume { i8*, i32 } %lpad.val2, !dbg !119 terminate.lpad: ; preds = %lpad - %5 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %5 = landingpad { i8*, i32 } catch i8* null, !dbg !121 %6 = extractvalue { i8*, i32 } %5, 0, !dbg !121 call void @__clang_call_terminate(i8* %6) #5, !dbg !121 @@ -212,7 +212,7 @@ declare void @_ZSt9terminatev() ; Function Attrs: uwtable -define linkonce_odr void @_ZN1AD0Ev(%class.A* %this) unnamed_addr #2 align 2 { +define linkonce_odr void @_ZN1AD0Ev(%class.A* %this) unnamed_addr #2 align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: %this.addr = alloca %class.A*, align 8 %exn.slot = alloca i8* @@ -229,7 +229,7 @@ ret void, !dbg !129 lpad: ; preds = %entry - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %1 = landingpad { i8*, i32 } cleanup, !dbg !131 %2 = extractvalue { i8*, i32 } %1, 0, !dbg !131 store i8* %2, i8** %exn.slot, !dbg !131 Index: test/DebugInfo/inline-debug-info-multiret.ll =================================================================== --- test/DebugInfo/inline-debug-info-multiret.ll +++ test/DebugInfo/inline-debug-info-multiret.ll @@ -57,7 +57,7 @@ declare i32 @_Z8test_exti(i32) -define i32 @_Z5test2v() { +define i32 @_Z5test2v() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: %exn.slot = alloca i8* %ehselector.slot = alloca i32 @@ -70,7 +70,7 @@ br label %try.cont, !dbg !23 lpad: ; preds = %entry - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %1 = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*), !dbg !21 %2 = extractvalue { i8*, i32 } %1, 0, !dbg !21 store i8* %2, i8** %exn.slot, !dbg !21 Index: test/DebugInfo/inline-debug-info.ll =================================================================== --- test/DebugInfo/inline-debug-info.ll +++ test/DebugInfo/inline-debug-info.ll @@ -75,7 +75,7 @@ declare i32 @_Z8test_exti(i32) -define i32 @_Z5test2v() { +define i32 @_Z5test2v() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: %exn.slot = alloca i8* %ehselector.slot = alloca i32 @@ -88,7 +88,7 @@ br label %try.cont, !dbg !23 lpad: ; preds = %entry - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %1 = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*), !dbg !21 %2 = extractvalue { i8*, i32 } %1, 0, !dbg !21 store i8* %2, i8** %exn.slot, !dbg !21 Index: test/ExecutionEngine/MCJIT/Inputs/multi-module-eh-b.ll =================================================================== --- test/ExecutionEngine/MCJIT/Inputs/multi-module-eh-b.ll +++ test/ExecutionEngine/MCJIT/Inputs/multi-module-eh-b.ll @@ -12,13 +12,13 @@ unreachable } -define i32 @FB() { +define i32 @FB() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @throwException_B() to label %try.cont unwind label %lpad lpad: - %p = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %p = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %e = extractvalue { i8*, i32 } %p, 0 call i8* @__cxa_begin_catch(i8* %e) Index: test/ExecutionEngine/MCJIT/eh-lg-pic.ll =================================================================== --- test/ExecutionEngine/MCJIT/eh-lg-pic.ll +++ test/ExecutionEngine/MCJIT/eh-lg-pic.ll @@ -14,13 +14,13 @@ unreachable } -define i32 @main() { +define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @throwException() to label %try.cont unwind label %lpad lpad: - %p = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %p = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %e = extractvalue { i8*, i32 } %p, 0 call i8* @__cxa_begin_catch(i8* %e) Index: test/ExecutionEngine/MCJIT/eh-sm-pic.ll =================================================================== --- test/ExecutionEngine/MCJIT/eh-sm-pic.ll +++ test/ExecutionEngine/MCJIT/eh-sm-pic.ll @@ -14,13 +14,13 @@ unreachable } -define i32 @main() { +define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @throwException() to label %try.cont unwind label %lpad lpad: - %p = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %p = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %e = extractvalue { i8*, i32 } %p, 0 call i8* @__cxa_begin_catch(i8* %e) Index: test/ExecutionEngine/MCJIT/eh.ll =================================================================== --- test/ExecutionEngine/MCJIT/eh.ll +++ test/ExecutionEngine/MCJIT/eh.ll @@ -14,13 +14,13 @@ unreachable } -define i32 @main() { +define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @throwException() to label %try.cont unwind label %lpad lpad: - %p = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %p = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %e = extractvalue { i8*, i32 } %p, 0 call i8* @__cxa_begin_catch(i8* %e) Index: test/ExecutionEngine/MCJIT/multi-module-eh-a.ll =================================================================== --- test/ExecutionEngine/MCJIT/multi-module-eh-a.ll +++ test/ExecutionEngine/MCJIT/multi-module-eh-a.ll @@ -16,13 +16,13 @@ unreachable } -define i32 @main() { +define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @throwException() to label %try.cont unwind label %lpad lpad: - %p = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %p = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %e = extractvalue { i8*, i32 } %p, 0 call i8* @__cxa_begin_catch(i8* %e) Index: test/ExecutionEngine/OrcMCJIT/Inputs/multi-module-eh-b.ll =================================================================== --- test/ExecutionEngine/OrcMCJIT/Inputs/multi-module-eh-b.ll +++ test/ExecutionEngine/OrcMCJIT/Inputs/multi-module-eh-b.ll @@ -12,13 +12,13 @@ unreachable } -define i32 @FB() { +define i32 @FB() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @throwException_B() to label %try.cont unwind label %lpad lpad: - %p = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %p = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %e = extractvalue { i8*, i32 } %p, 0 call i8* @__cxa_begin_catch(i8* %e) Index: test/ExecutionEngine/OrcMCJIT/eh-lg-pic.ll =================================================================== --- test/ExecutionEngine/OrcMCJIT/eh-lg-pic.ll +++ test/ExecutionEngine/OrcMCJIT/eh-lg-pic.ll @@ -14,13 +14,13 @@ unreachable } -define i32 @main() { +define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @throwException() to label %try.cont unwind label %lpad lpad: - %p = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %p = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %e = extractvalue { i8*, i32 } %p, 0 call i8* @__cxa_begin_catch(i8* %e) Index: test/ExecutionEngine/OrcMCJIT/eh-sm-pic.ll =================================================================== --- test/ExecutionEngine/OrcMCJIT/eh-sm-pic.ll +++ test/ExecutionEngine/OrcMCJIT/eh-sm-pic.ll @@ -14,13 +14,13 @@ unreachable } -define i32 @main() { +define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @throwException() to label %try.cont unwind label %lpad lpad: - %p = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %p = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %e = extractvalue { i8*, i32 } %p, 0 call i8* @__cxa_begin_catch(i8* %e) Index: test/ExecutionEngine/OrcMCJIT/eh.ll =================================================================== --- test/ExecutionEngine/OrcMCJIT/eh.ll +++ test/ExecutionEngine/OrcMCJIT/eh.ll @@ -14,13 +14,13 @@ unreachable } -define i32 @main() { +define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @throwException() to label %try.cont unwind label %lpad lpad: - %p = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %p = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %e = extractvalue { i8*, i32 } %p, 0 call i8* @__cxa_begin_catch(i8* %e) Index: test/ExecutionEngine/OrcMCJIT/multi-module-eh-a.ll =================================================================== --- test/ExecutionEngine/OrcMCJIT/multi-module-eh-a.ll +++ test/ExecutionEngine/OrcMCJIT/multi-module-eh-a.ll @@ -16,13 +16,13 @@ unreachable } -define i32 @main() { +define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @throwException() to label %try.cont unwind label %lpad lpad: - %p = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %p = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %e = extractvalue { i8*, i32 } %p, 0 call i8* @__cxa_begin_catch(i8* %e) Index: test/Feature/callingconventions.ll =================================================================== --- test/Feature/callingconventions.ll +++ test/Feature/callingconventions.ll @@ -25,7 +25,7 @@ ret void } -define cc42 void @bar3() { +define cc42 void @bar3() personality i32 (...)* @__gxx_personality_v0 { invoke fastcc void @foo( ) to label %Ok unwind label %U @@ -33,12 +33,12 @@ ret void U: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup resume { i8*, i32 } %exn } -define void @bar4() { +define void @bar4() personality i32 (...)* @__gxx_personality_v0 { call cc42 void @bar( ) invoke cc42 void @bar3( ) to label %Ok unwind label %U @@ -47,7 +47,7 @@ ret void U: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup resume { i8*, i32 } %exn } Index: test/Feature/calltest.ll =================================================================== --- test/Feature/calltest.ll +++ test/Feature/calltest.ll @@ -10,7 +10,7 @@ ret void } -define i32 @main(i32 %argc) { +define i32 @main(i32 %argc) personality i32 (...)* @__gxx_personality_v0 { %retval = call i32 @test( i32 %argc ) ; <i32> [#uses=2] %two = add i32 %retval, %retval ; <i32> [#uses=1] %retval2 = invoke i32 @test( i32 %argc ) @@ -22,7 +22,7 @@ ret i32 %two2 Error: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup ret i32 -1 } Index: test/Feature/exception.ll =================================================================== --- test/Feature/exception.ll +++ test/Feature/exception.ll @@ -6,7 +6,7 @@ @_ZTId = external constant i8* @_ZTIPKc = external constant i8* -define void @_Z3barv() uwtable optsize ssp { +define void @_Z3barv() uwtable optsize ssp personality i32 (...)* @__gxx_personality_v0 { entry: invoke void @_Z3quxv() optsize to label %try.cont unwind label %lpad @@ -15,7 +15,7 @@ ret void lpad: ; preds = %entry - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup catch i8** @_ZTIc filter [2 x i8**] [i8** @_ZTIPKc, i8** @_ZTId] Index: test/Feature/seh-nounwind.ll =================================================================== --- test/Feature/seh-nounwind.ll +++ test/Feature/seh-nounwind.ll @@ -11,13 +11,13 @@ ret i32 %div } -define i32 @main() nounwind { +define i32 @main() nounwind personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) { entry: %call = invoke i32 @div(i32 10, i32 0) to label %__try.cont unwind label %lpad lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) + %0 = landingpad { i8*, i32 } catch i8* null br label %__try.cont Index: test/Instrumentation/AddressSanitizer/instrument-no-return.ll =================================================================== --- test/Instrumentation/AddressSanitizer/instrument-no-return.ll +++ test/Instrumentation/AddressSanitizer/instrument-no-return.ll @@ -29,7 +29,7 @@ declare i32 @__gxx_personality_v0(...) -define i64 @Invoke1(i8** %esc) nounwind uwtable ssp sanitize_address { +define i64 @Invoke1(i8** %esc) nounwind uwtable ssp sanitize_address personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @MyNoReturnFunc(i32 1) to label %invoke.cont unwind label %lpad @@ -38,7 +38,7 @@ ret i64 0 lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } filter [0 x i8*] zeroinitializer ret i64 1 } Index: test/LTO/X86/linkonce_odr_func.ll =================================================================== --- test/LTO/X86/linkonce_odr_func.ll +++ test/LTO/X86/linkonce_odr_func.ll @@ -46,7 +46,7 @@ declare void @p() -define void @bar() { +define void @bar() personality void()* @p { bb0: call void @foo1() call void @f(void()* @foo2) @@ -56,6 +56,6 @@ bb2: ret void clean: - landingpad {i32, i32} personality void()* @p cleanup + landingpad {i32, i32} cleanup ret void } Index: test/Other/2008-10-15-MissingSpace.ll =================================================================== --- test/Other/2008-10-15-MissingSpace.ll +++ test/Other/2008-10-15-MissingSpace.ll @@ -1,14 +1,14 @@ ; RUN: llvm-as < %s | llvm-dis | FileCheck %s ; PR2894 declare void @g() -define void @f() { +define void @f() personality i32 (...)* @__gxx_personality_v0 { ; CHECK: invoke void @g() ; CHECK: to label %d unwind label %c invoke void @g() to label %d unwind label %c d: ret void c: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup ret void } Index: test/Other/2009-03-31-CallGraph.ll =================================================================== --- test/Other/2009-03-31-CallGraph.ll +++ test/Other/2009-03-31-CallGraph.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -inline -prune-eh -disable-output -define void @f2() { +define void @f2() personality i32 (...)* @__gxx_personality_v0 { invoke void @f6() to label %ok1 unwind label %lpad1 @@ -7,7 +7,7 @@ ret void lpad1: - landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + landingpad {i8*, i32} cleanup invoke void @f4() to label %ok2 unwind label %lpad2 @@ -17,7 +17,7 @@ unreachable lpad2: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup unreachable } Index: test/Transforms/ADCE/2003-09-10-UnwindInstFail.ll =================================================================== --- test/Transforms/ADCE/2003-09-10-UnwindInstFail.ll +++ test/Transforms/ADCE/2003-09-10-UnwindInstFail.ll @@ -1,6 +1,6 @@ ; RUN: opt < %s -adce -disable-output -define void @test() { +define void @test() personality i32 (...)* @__gxx_personality_v0 { br i1 false, label %then, label %endif then: ; preds = %0 @@ -8,7 +8,7 @@ to label %invoke_cont unwind label %invoke_catch invoke_catch: ; preds = %then - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup resume { i8*, i32 } %exn Index: test/Transforms/ADCE/2005-02-17-PHI-Invoke-Crash.ll =================================================================== --- test/Transforms/ADCE/2005-02-17-PHI-Invoke-Crash.ll +++ test/Transforms/ADCE/2005-02-17-PHI-Invoke-Crash.ll @@ -6,7 +6,7 @@ declare void @q_atomic_decrement() -define void @_ZNK10QByteArray13leftJustifiedEicb() { +define void @_ZNK10QByteArray13leftJustifiedEicb() personality i32 (...)* @__gxx_personality_v0 { entry: invoke void @strlen( ) to label %tmp.3.i.noexc unwind label %invoke_catch.0 @@ -15,7 +15,7 @@ br i1 false, label %then.0, label %else.0 invoke_catch.0: ; preds = %entry - %exn.0 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn.0 = landingpad {i8*, i32} cleanup invoke void @q_atomic_decrement( ) to label %tmp.1.i.i183.noexc unwind label %terminate @@ -28,7 +28,7 @@ to label %invoke_cont.1 unwind label %invoke_catch.1 invoke_catch.1: ; preds = %then.0 - %exn.1 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn.1 = landingpad {i8*, i32} cleanup invoke void @q_atomic_decrement( ) to label %tmp.1.i.i162.noexc unwind label %terminate @@ -44,7 +44,7 @@ terminate: ; preds = %invoke_catch.1, %invoke_catch.0 %dbg.0.1 = phi { }* [ null, %invoke_catch.1 ], [ null, %invoke_catch.0 ] ; <{ }*> [#uses=0] - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup unreachable } Index: test/Transforms/ADCE/dce_pure_invoke.ll =================================================================== --- test/Transforms/ADCE/dce_pure_invoke.ll +++ test/Transforms/ADCE/dce_pure_invoke.ll @@ -2,7 +2,7 @@ declare i32 @strlen(i8*) readnone -define i32 @test() { +define i32 @test() personality i32 (...)* @__gxx_personality_v0 { ; invoke of pure function should not be deleted! invoke i32 @strlen( i8* null ) readnone to label %Cont unwind label %Other ; <i32>:1 [#uses=0] @@ -11,7 +11,7 @@ ret i32 0 Other: ; preds = %0 - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup ret i32 1 } Index: test/Transforms/ArgumentPromotion/crash.ll =================================================================== --- test/Transforms/ArgumentPromotion/crash.ll +++ test/Transforms/ArgumentPromotion/crash.ll @@ -1,7 +1,7 @@ ; RUN: opt -inline -argpromotion < %s ; rdar://7879828 -define void @foo() { +define void @foo() personality i32 (...)* @__gxx_personality_v0 { invoke void @foo2() to label %if.end432 unwind label %for.end520 @@ -9,7 +9,7 @@ unreachable for.end520: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup unreachable } Index: test/Transforms/BDCE/dce-pure.ll =================================================================== --- test/Transforms/BDCE/dce-pure.ll +++ test/Transforms/BDCE/dce-pure.ll @@ -11,7 +11,7 @@ ; CHECK: ret void } -define i32 @test2() { +define i32 @test2() personality i32 (...)* @__gxx_personality_v0 { ; invoke of pure function should not be deleted! invoke i32 @strlen( i8* null ) readnone to label %Cont unwind label %Other @@ -20,7 +20,7 @@ ret i32 0 Other: ; preds = %0 - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup ret i32 1 Index: test/Transforms/BDCE/order.ll =================================================================== --- test/Transforms/BDCE/order.ll +++ test/Transforms/BDCE/order.ll @@ -4,7 +4,7 @@ declare i32 @__gxx_personality_v0(...) -define fastcc void @_ZN11__sanitizerL12TestRegistryEPNS_14ThreadRegistryEb() #0 { +define fastcc void @_ZN11__sanitizerL12TestRegistryEPNS_14ThreadRegistryEb() #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: br i1 undef, label %if.else, label %entry.if.end_crit_edge @@ -22,7 +22,7 @@ br label %if.else lpad65.loopexit.split-lp.loopexit.split-lp.loopexit: - %lpad.loopexit1121 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %lpad.loopexit1121 = landingpad { i8*, i32 } cleanup br label %lpad65.loopexit.split-lp.loopexit.split-lp Index: test/Transforms/CodeExtractor/2004-03-18-InvokeHandling.ll =================================================================== --- test/Transforms/CodeExtractor/2004-03-18-InvokeHandling.ll +++ test/Transforms/CodeExtractor/2004-03-18-InvokeHandling.ll @@ -4,7 +4,7 @@ declare void @__errno_location() -define void @yylex() { +define void @yylex() personality i32 (...)* @__gcc_personality_v0 { entry: switch i32 0, label %label.126 [ i32 0, label %return @@ -190,7 +190,7 @@ ret void LongJmpBlkPre: ; preds = %endif.52, %then.40 - %exn = landingpad { i8*, i32 } personality i32 (...)* @__gcc_personality_v0 + %exn = landingpad { i8*, i32 } catch i8* null ret void } Index: test/Transforms/CodeExtractor/2004-11-12-InvokeExtract.ll =================================================================== --- test/Transforms/CodeExtractor/2004-11-12-InvokeExtract.ll +++ test/Transforms/CodeExtractor/2004-11-12-InvokeExtract.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -extract-blocks -disable-output -define i32 @foo() { +define i32 @foo() personality i32 (...)* @__gcc_personality_v0 { br label %EB EB: ; preds = %0 @@ -10,7 +10,7 @@ ret i32 %V Unw: ; preds = %EB - %exn = landingpad { i8*, i32 } personality i32 (...)* @__gcc_personality_v0 + %exn = landingpad { i8*, i32 } catch i8* null resume { i8*, i32 } %exn } Index: test/Transforms/DeadArgElim/2009-03-17-MRE-Invoke.ll =================================================================== --- test/Transforms/DeadArgElim/2009-03-17-MRE-Invoke.ll +++ test/Transforms/DeadArgElim/2009-03-17-MRE-Invoke.ll @@ -5,18 +5,18 @@ ret {i32,i32} {i32 42, i32 4} } -define i32 @bar() { +define i32 @bar() personality i32 (...)* @__gxx_personality_v0 { %x = invoke {i32,i32} @foo() to label %T unwind label %T2 T: %y = extractvalue {i32,i32} %x, 1 ret i32 %y T2: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup unreachable } -define i32 @bar2() { +define i32 @bar2() personality i32 (...)* @__gxx_personality_v0 { entry: %x = invoke {i32,i32} @foo() to label %T unwind label %T2 T: @@ -24,7 +24,7 @@ %y = extractvalue {i32,i32} %x, 1 ret i32 %y T2: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup unreachable } Index: test/Transforms/FunctionAttrs/nocapture.ll =================================================================== --- test/Transforms/FunctionAttrs/nocapture.ll +++ test/Transforms/FunctionAttrs/nocapture.ll @@ -47,13 +47,13 @@ declare void @throw_if_bit_set(i8*, i8) readonly ; CHECK: define i1 @c6(i8* readonly %q, i8 %bit) -define i1 @c6(i8* %q, i8 %bit) { +define i1 @c6(i8* %q, i8 %bit) personality i32 (...)* @__gxx_personality_v0 { invoke void @throw_if_bit_set(i8* %q, i8 %bit) to label %ret0 unwind label %ret1 ret0: ret i1 0 ret1: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup ret i1 1 } Index: test/Transforms/GVN/2010-05-08-OneBit.ll =================================================================== --- test/Transforms/GVN/2010-05-08-OneBit.ll +++ test/Transforms/GVN/2010-05-08-OneBit.ll @@ -4,7 +4,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" target triple = "x86_64-unknown-linux-gnu" -define i32 @main(i32 %argc, i8** nocapture %argv) { +define i32 @main(i32 %argc, i8** nocapture %argv) personality i32 (...)* @__gxx_personality_v0 { entry: %0 = getelementptr inbounds i8, i8* undef, i64 5 ; <i8*> [#uses=1] %1 = bitcast i8* %0 to i32* ; <i32*> [#uses=1] @@ -45,7 +45,7 @@ ret i32 0 landing_pad: ; preds = %l147.i.i, %l129.i.i, %l117.i.i - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup switch i32 undef, label %fin [ i32 1, label %catch1 Index: test/Transforms/GVN/2011-09-07-TypeIdFor.ll =================================================================== --- test/Transforms/GVN/2011-09-07-TypeIdFor.ll +++ test/Transforms/GVN/2011-09-07-TypeIdFor.ll @@ -17,13 +17,13 @@ declare i32 @__gxx_personality_v0(i32, i64, i8*, i8*) -define void @_Z3foov() uwtable { +define void @_Z3foov() uwtable personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0 { entry: invoke void @_Z4barv() to label %return unwind label %lpad lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0 + %0 = landingpad { i8*, i32 } catch %struct.__fundamental_type_info_pseudo* @_ZTIi catch %struct.__fundamental_type_info_pseudo* @_ZTIb catch %struct.__fundamental_type_info_pseudo* @_ZTIi Index: test/Transforms/GVN/cond_br2.ll =================================================================== --- test/Transforms/GVN/cond_br2.ll +++ test/Transforms/GVN/cond_br2.ll @@ -9,7 +9,7 @@ %"union.llvm::SmallVectorBase::U" = type { x86_fp80 } ; Function Attrs: ssp uwtable -define void @_Z4testv() #0 { +define void @_Z4testv() #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { ; CHECK: @_Z4testv() ; CHECK: invoke.cont: ; CHECK: br i1 true, label %new.notnull.i11, label %if.end.i14 @@ -98,7 +98,7 @@ ret void lpad: ; preds = %if.end.i14, %if.end.i, %invoke.cont2 - %12 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %12 = landingpad { i8*, i32 } cleanup %13 = load i8*, i8** %BeginX.i.i.i.i.i.i, align 16, !tbaa !4 %cmp.i.i.i.i = icmp eq i8* %13, %1 Index: test/Transforms/GlobalOpt/cleanup-pointer-root-users.ll =================================================================== --- test/Transforms/GlobalOpt/cleanup-pointer-root-users.ll +++ test/Transforms/GlobalOpt/cleanup-pointer-root-users.ll @@ -30,7 +30,7 @@ declare i8* @strdup(i8*) declare void @foo2(i8*) -define void @test3() uwtable { +define void @test3() uwtable personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0 { ; CHECK-LABEL: @test3( ; CHECK-NOT: bb1: ; CHECK-NOT: bb2: @@ -41,7 +41,7 @@ store i8* %ptr, i8** @glbl unreachable bb2: - %tmp1 = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0 + %tmp1 = landingpad { i8*, i32 } cleanup resume { i8*, i32 } %tmp1 } Index: test/Transforms/GlobalOpt/invoke.ll =================================================================== --- test/Transforms/GlobalOpt/invoke.ll +++ test/Transforms/GlobalOpt/invoke.ll @@ -11,7 +11,7 @@ ret i32 1 } -define void @_GLOBAL__I_a() { +define void @_GLOBAL__I_a() personality i8* undef { bb: %tmp1 = invoke i32 @one() to label %bb2 unwind label %bb4 @@ -21,7 +21,7 @@ ret void bb4: ; preds = %bb - %tmp5 = landingpad { i8*, i32 } personality i8* undef + %tmp5 = landingpad { i8*, i32 } filter [0 x i8*] zeroinitializer unreachable } Index: test/Transforms/IPConstantProp/return-argument.ll =================================================================== --- test/Transforms/IPConstantProp/return-argument.ll +++ test/Transforms/IPConstantProp/return-argument.ll @@ -27,7 +27,7 @@ ret { i32, i32 } %Z } -define void @caller(i1 %C) { +define void @caller(i1 %C) personality i32 (...)* @__gxx_personality_v0 { %Q = alloca i32 ;; Call incdec to see if %W is properly replaced by %Q %W = call i32* @incdec(i1 %C, i32* %Q ) ; <i32> [#uses=1] @@ -46,7 +46,7 @@ br label %RET LPAD: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup br label %RET Index: test/Transforms/IPConstantProp/return-constant.ll =================================================================== --- test/Transforms/IPConstantProp/return-constant.ll +++ test/Transforms/IPConstantProp/return-constant.ll @@ -15,13 +15,13 @@ ret i1 %Y } -define i1 @invokecaller(i1 %C) { +define i1 @invokecaller(i1 %C) personality i32 (...)* @__gxx_personality_v0 { %X = invoke i32 @foo( i1 %C ) to label %OK unwind label %FAIL ; <i32> [#uses=1] OK: %Y = icmp ne i32 %X, 0 ; <i1> [#uses=1] ret i1 %Y FAIL: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup ret i1 false } Index: test/Transforms/IndVarSimplify/2004-04-05-InvokeCastCrash.ll =================================================================== --- test/Transforms/IndVarSimplify/2004-04-05-InvokeCastCrash.ll +++ test/Transforms/IndVarSimplify/2004-04-05-InvokeCastCrash.ll @@ -112,13 +112,13 @@ declare i32 @__gxx_personality_v0(...) -define void @_ZN4llvm11_GLOBAL__N_22InsertPrologEpilogCode20runOnMachineFunctionERNS_15MachineFunctionE(%"struct.llvm::MachineFunction"* %F) { +define void @_ZN4llvm11_GLOBAL__N_22InsertPrologEpilogCode20runOnMachineFunctionERNS_15MachineFunctionE(%"struct.llvm::MachineFunction"* %F) personality i32 (...)* @__gxx_personality_v0 { entry: %tmp.8.i = invoke %"struct.llvm::TargetFrameInfo"* null( %"struct.llvm::TargetMachine"* null ) to label %invoke_cont.0.i unwind label %invoke_catch.0.i ; <%"struct.llvm::TargetFrameInfo"*> [#uses=0] invoke_catch.0.i: ; preds = %invoke_cont.49.i, %invoke_cont.48.i, %invoke_cont.47.i, %invoke_cont.i53.i, %no_exit.i, %invoke_cont.44.i, %invoke_cont.43.i, %invoke_cont.42.i, %invoke_cont.41.i, %invoke_cont.40.i, %invoke_cont.39.i, %invoke_cont.38.i, %invoke_cont.37.i, %then.2.i, %invoke_cont.35.i, %invoke_cont.34.i, %then.1.i, %endif.0.i, %invoke_cont.9.i, %invoke_cont.8.i, %invoke_cont.7.i, %invoke_cont.i.i, %then.0.i, %invoke_cont.4.i, %invoke_cont.3.i, %invoke_cont.2.i, %invoke_cont.1.i, %endif.0.i.i, %tmp.7.i.noexc.i, %invoke_cont.0.i, %entry - %exn0.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn0.i = landingpad {i8*, i32} cleanup ret void @@ -168,7 +168,7 @@ to label %invoke_cont.i.i unwind label %cond_true.i.i cond_true.i.i: ; preds = %tmp.0.i.noexc.i - %exn.i.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn.i.i = landingpad {i8*, i32} cleanup ret void @@ -262,7 +262,7 @@ to label %invoke_cont.i53.i unwind label %cond_true.i52.i cond_true.i52.i: ; preds = %tmp.0.i.noexc55.i - %exn.i52.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn.i52.i = landingpad {i8*, i32} cleanup ret void Index: test/Transforms/IndVarSimplify/2005-02-11-InvokeCrash.ll =================================================================== --- test/Transforms/IndVarSimplify/2005-02-11-InvokeCrash.ll +++ test/Transforms/IndVarSimplify/2005-02-11-InvokeCrash.ll @@ -1,6 +1,6 @@ ; RUN: opt < %s -indvars -disable-output -define void @_ZN5ArrayISt7complexIdEEC2ERK10dim_vector() { +define void @_ZN5ArrayISt7complexIdEEC2ERK10dim_vector() personality i32 (...)* @__gxx_personality_v0 { entry: %tmp.7 = invoke i32 @_ZN5ArrayISt7complexIdEE8get_sizeERK10dim_vector( ) to label %invoke_cont.0 unwind label %cond_true.1 ; <i32> [#uses=2] @@ -16,7 +16,7 @@ br label %no_exit.i cond_true.1: ; preds = %entry - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup resume { i8*, i32 } %exn } Index: test/Transforms/IndVarSimplify/2005-02-17-TruncateExprCrash.ll =================================================================== --- test/Transforms/IndVarSimplify/2005-02-17-TruncateExprCrash.ll +++ test/Transforms/IndVarSimplify/2005-02-17-TruncateExprCrash.ll @@ -4,13 +4,13 @@ declare void @_Z9qt_assertPKcS0_i() -define void @_ZN13QMetaResourceC1EPKh() { +define void @_ZN13QMetaResourceC1EPKh() personality i32 (...)* @__gxx_personality_v0 { entry: invoke void @_Z9qt_assertPKcS0_i( ) to label %endif.1 unwind label %then.i.i551 then.i.i551: ; preds = %entry - %exn551 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn551 = landingpad {i8*, i32} cleanup ret void @@ -22,7 +22,7 @@ to label %loopentry.0 unwind label %invoke_catch.6 invoke_catch.6: ; preds = %then.2 - %exn6 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn6 = landingpad {i8*, i32} cleanup ret void Index: test/Transforms/IndVarSimplify/crash.ll =================================================================== --- test/Transforms/IndVarSimplify/crash.ll +++ test/Transforms/IndVarSimplify/crash.ll @@ -62,7 +62,7 @@ declare i32 @__gccgo_personality_v0(i32, i64, i8*, i8*) -define void @main.main() uwtable { +define void @main.main() uwtable personality i32 (i32, i64, i8*, i8*)* @__gccgo_personality_v0 { entry: invoke void @__go_panic() noreturn to label %0 unwind label %"5.i" @@ -75,12 +75,12 @@ to label %main.f.exit unwind label %"7.i" "5.i": ; preds = %entry - %1 = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__gccgo_personality_v0 + %1 = landingpad { i8*, i32 } catch i8* null br label %"3.i" "7.i": ; preds = %"3.i" - %2 = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__gccgo_personality_v0 + %2 = landingpad { i8*, i32 } catch i8* null br label %"3.i" Index: test/Transforms/IndVarSimplify/interesting-invoke-use.ll =================================================================== --- test/Transforms/IndVarSimplify/interesting-invoke-use.ll +++ test/Transforms/IndVarSimplify/interesting-invoke-use.ll @@ -11,7 +11,7 @@ @.str7 = external constant [24 x i8] ; <[24 x i8]*> [#uses=1] @C.17.316 = external constant %struct.string___XUB ; <%struct.string___XUB*> [#uses=1] -define void @_ada_c35503g() { +define void @_ada_c35503g() personality i32 (...)* @__gxx_personality_v0 { entry: br label %bb @@ -47,7 +47,7 @@ br label %bb123 lpad266: ; preds = %invcont129, %bb128, %bb123 - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup unreachable } Index: test/Transforms/Inline/2003-09-14-InlineValue.ll =================================================================== --- test/Transforms/Inline/2003-09-14-InlineValue.ll +++ test/Transforms/Inline/2003-09-14-InlineValue.ll @@ -8,7 +8,7 @@ ret i32 %J } -define i32 @Caller() { +define i32 @Caller() personality i32 (...)* @__gxx_personality_v0 { %V = invoke i32 @Callee( ) to label %Ok unwind label %Bad ; <i32> [#uses=1] @@ -16,7 +16,7 @@ ret i32 %V Bad: ; preds = %0 - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup ret i32 0 } Index: test/Transforms/Inline/2003-09-22-PHINodeInlineFail.ll =================================================================== --- test/Transforms/Inline/2003-09-22-PHINodeInlineFail.ll +++ test/Transforms/Inline/2003-09-22-PHINodeInlineFail.ll @@ -1,6 +1,6 @@ ; RUN: opt < %s -inline -disable-output -define i32 @main() { +define i32 @main() personality i32 (...)* @__gxx_personality_v0 { entry: invoke void @__main( ) to label %LongJmpBlkPost unwind label %LongJmpBlkPre @@ -10,7 +10,7 @@ LongJmpBlkPre: %i.3 = phi i32 [ 0, %entry ] - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup ret i32 0 } Index: test/Transforms/Inline/2003-09-22-PHINodesInExceptionDest.ll =================================================================== --- test/Transforms/Inline/2003-09-22-PHINodesInExceptionDest.ll +++ test/Transforms/Inline/2003-09-22-PHINodesInExceptionDest.ll @@ -1,6 +1,6 @@ ; RUN: opt < %s -inline -disable-output -define i32 @main() { +define i32 @main() personality i32 (...)* @__gxx_personality_v0 { entry: invoke void @__main( ) to label %Call2Invoke unwind label %LongJmpBlkPre @@ -10,7 +10,7 @@ LongJmpBlkPre: ; preds = %Call2Invoke, %entry %i.3 = phi i32 [ 0, %entry ] - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup br label %exit Index: test/Transforms/Inline/2003-09-22-PHINodesInNormalInvokeDest.ll =================================================================== --- test/Transforms/Inline/2003-09-22-PHINodesInNormalInvokeDest.ll +++ test/Transforms/Inline/2003-09-22-PHINodesInNormalInvokeDest.ll @@ -1,6 +1,6 @@ ; RUN: opt < %s -inline -disable-output -define i32 @main() { +define i32 @main() personality i32 (...)* @__gxx_personality_v0 { entry: invoke void @__main( ) to label %else unwind label %RethrowExcept @@ -13,7 +13,7 @@ br label %else RethrowExcept: ; preds = %entry - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup ret i32 0 } Index: test/Transforms/Inline/2006-11-09-InlineCGUpdate-2.ll =================================================================== --- test/Transforms/Inline/2006-11-09-InlineCGUpdate-2.ll +++ test/Transforms/Inline/2006-11-09-InlineCGUpdate-2.ll @@ -126,13 +126,13 @@ unreachable } -define fastcc void @_ZSt19__throw_logic_errorPKc() { +define fastcc void @_ZSt19__throw_logic_errorPKc() personality i32 (...)* @__gxx_personality_v0 { entry: invoke fastcc void @_ZNSt11logic_errorC1ERKSs( ) to label %try_exit.0 unwind label %try_catch.0 try_catch.0: ; preds = %entry - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} catch i8* null resume { i8*, i32 } %exn @@ -157,13 +157,13 @@ unreachable } -define fastcc void @_ZNSt12length_errorC1ERKSs() { +define fastcc void @_ZNSt12length_errorC1ERKSs() personality i32 (...)* @__gxx_personality_v0 { entry: invoke fastcc void @_ZNSsC1ERKSs( ) to label %_ZNSt11logic_errorC2ERKSs.exit unwind label %invoke_catch.i invoke_catch.i: ; preds = %entry - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} catch i8* null resume { i8*, i32 } %exn @@ -195,14 +195,14 @@ unreachable } -define fastcc void @_ZNSsC1ERKSs() { +define fastcc void @_ZNSsC1ERKSs() personality i32 (...)* @__gxx_personality_v0 { entry: call fastcc void @_ZNSs4_Rep7_M_grabERKSaIcES2_( ) invoke fastcc void @_ZNSaIcEC1ERKS_( ) to label %invoke_cont.1 unwind label %invoke_catch.1 invoke_catch.1: ; preds = %entry - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} catch i8* null call fastcc void @_ZNSaIcED1Ev( ) resume { i8*, i32 } %exn Index: test/Transforms/Inline/2006-11-09-InlineCGUpdate.ll =================================================================== --- test/Transforms/Inline/2006-11-09-InlineCGUpdate.ll +++ test/Transforms/Inline/2006-11-09-InlineCGUpdate.ll @@ -170,14 +170,14 @@ unreachable } -define fastcc void @_ZNSsC1ERKSs() { +define fastcc void @_ZNSsC1ERKSs() personality i32 (...)* @__gxx_personality_v0 { entry: call fastcc void @_ZNSs4_Rep7_M_grabERKSaIcES2_( ) invoke fastcc void @_ZNSaIcEC1ERKS_( ) to label %invoke_cont.1 unwind label %invoke_catch.1 invoke_catch.1: ; preds = %entry - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} catch i8* null call fastcc void @_ZNSaIcED1Ev( ) resume { i8*, i32 } %exn @@ -301,13 +301,13 @@ unreachable } -define fastcc void @_ZNSt12length_errorC1ERKSs() { +define fastcc void @_ZNSt12length_errorC1ERKSs() personality i32 (...)* @__gxx_personality_v0 { entry: invoke fastcc void @_ZNSsC1ERKSs( ) to label %_ZNSt11logic_errorC2ERKSs.exit unwind label %invoke_catch.i invoke_catch.i: ; preds = %entry - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} catch i8* null resume { i8*, i32 } %exn Index: test/Transforms/Inline/2007-04-15-InlineEH.ll =================================================================== --- test/Transforms/Inline/2007-04-15-InlineEH.ll +++ test/Transforms/Inline/2007-04-15-InlineEH.ll @@ -12,7 +12,7 @@ unreachable } -define fastcc void @bc__support__high_resolution_time__initialize_clock_rate() { +define fastcc void @bc__support__high_resolution_time__initialize_clock_rate() personality i32 (...)* @__gxx_personality_v0 { entry: invoke void @gnat__os_lib__getenv( %struct.gnat__strings__string_access* null ) to label %invcont unwind label %cleanup144 @@ -33,7 +33,7 @@ ret void cleanup144: ; preds = %invcont65, %invcont64, %invcont, %entry - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup resume { i8*, i32 } %exn } Index: test/Transforms/Inline/callgraph-update.ll =================================================================== --- test/Transforms/Inline/callgraph-update.ll +++ test/Transforms/Inline/callgraph-update.ll @@ -21,7 +21,7 @@ ret void } -define void @main() { +define void @main() personality i32 (...)* @__gxx_personality_v0 { invoke fastcc void @parse() to label %invcont unwind label %lpad @@ -29,7 +29,7 @@ unreachable lpad: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup unreachable } Index: test/Transforms/Inline/crash.ll =================================================================== --- test/Transforms/Inline/crash.ll +++ test/Transforms/Inline/crash.ll @@ -59,7 +59,7 @@ ;============================ ; PR5208 -define void @AAA() { +define void @AAA() personality i32 (...)* @__gxx_personality_v0 { entry: %A = alloca i8, i32 undef, align 1 invoke fastcc void @XXX() @@ -69,7 +69,7 @@ unreachable lpad156: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup unreachable } @@ -78,7 +78,7 @@ declare fastcc void @YYY() -define internal fastcc void @XXX() { +define internal fastcc void @XXX() personality i32 (...)* @__gxx_personality_v0 { entry: %B = alloca i8, i32 undef, align 1 invoke fastcc void @YYY() @@ -88,7 +88,7 @@ ret void lpad: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup resume { i8*, i32 } %exn } @@ -102,7 +102,7 @@ ret void } -define void @f4(i32 %size) ssp { +define void @f4(i32 %size) ssp personality i32 (...)* @__gxx_personality_v0 { entry: invoke void @f1(void ()* @f3) to label %invcont3 unwind label %lpad18 @@ -111,7 +111,7 @@ ret void lpad18: ; preds = %invcont3, %bb1 - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup unreachable } Index: test/Transforms/Inline/debug-invoke.ll =================================================================== --- test/Transforms/Inline/debug-invoke.ll +++ test/Transforms/Inline/debug-invoke.ll @@ -17,7 +17,7 @@ ret void } -define void @caller() { +define void @caller() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { invoke void @inl() to label %cont unwind label %lpad, !dbg !4 @@ -25,7 +25,7 @@ ret void lpad: - landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + landingpad { i8*, i32 } cleanup ret void } Index: test/Transforms/Inline/inline-invoke-tail.ll =================================================================== --- test/Transforms/Inline/inline-invoke-tail.ll +++ test/Transforms/Inline/inline-invoke-tail.ll @@ -10,7 +10,7 @@ declare void @llvm.memcpy.i32(i8* nocapture, i8* nocapture, i32, i32) nounwind -define i32 @main() { +define i32 @main() personality i32 (...)* @__gxx_personality_v0 { %a = alloca i32 ; <i32*> [#uses=3] %b = alloca i32 ; <i32*> [#uses=2] store i32 1, i32* %a, align 4 @@ -23,7 +23,7 @@ ret i32 %retval lpad: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} catch i8* null unreachable } Index: test/Transforms/Inline/inline-invoke-with-asm-call.ll =================================================================== --- test/Transforms/Inline/inline-invoke-with-asm-call.ll +++ test/Transforms/Inline/inline-invoke-with-asm-call.ll @@ -8,7 +8,7 @@ ; Make sure we are generating "call asm" instead of "invoke asm". ; CHECK: call void asm ; CHECK-LABEL: @callee_with_asm -define void @caller() { +define void @caller() personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) { br i1 undef, label %1, label %4 ; <label>:1 @@ -16,7 +16,7 @@ to label %4 unwind label %2 ; <label>:2 - %3 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) + %3 = landingpad { i8*, i32 } cleanup resume { i8*, i32 } undef Index: test/Transforms/Inline/inline_invoke.ll =================================================================== --- test/Transforms/Inline/inline_invoke.ll +++ test/Transforms/Inline/inline_invoke.ll @@ -28,7 +28,7 @@ declare void @_ZSt9terminatev() -define internal void @test0_in() alwaysinline uwtable ssp { +define internal void @test0_in() alwaysinline uwtable ssp personality i32 (...)* @__gxx_personality_v0 { entry: %a = alloca %struct.A, align 1 %b = alloca %struct.A, align 1 @@ -45,7 +45,7 @@ ret void lpad: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup invoke void @_ZN1AD1Ev(%struct.A* %a) to label %invoke.cont2 unwind label %terminate.lpad @@ -54,13 +54,13 @@ resume { i8*, i32 } %exn terminate.lpad: - %exn1 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn1 = landingpad {i8*, i32} catch i8* null call void @_ZSt9terminatev() noreturn nounwind unreachable } -define void @test0_out() uwtable ssp { +define void @test0_out() uwtable ssp personality i32 (...)* @__gxx_personality_v0 { entry: invoke void @test0_in() to label %ret unwind label %lpad @@ -69,7 +69,7 @@ ret void lpad: ; preds = %entry - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} catch i8* bitcast (i8** @_ZTIi to i8*) %eh.exc = extractvalue { i8*, i32 } %exn, 0 %eh.selector = extractvalue { i8*, i32 } %exn, 1 @@ -93,7 +93,7 @@ ; CHECK: invoke void @_ZN1AC1Ev(%struct.A* [[B]]) ; CHECK: invoke void @_ZN1AD1Ev(%struct.A* [[B]]) ; CHECK: invoke void @_ZN1AD1Ev(%struct.A* [[A]]) -; CHECK: landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 +; CHECK: landingpad { i8*, i32 } ; CHECK-NEXT: cleanup ; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIi to i8*) ; CHECK-NEXT: invoke void @_ZN1AD1Ev(%struct.A* [[A]]) @@ -101,7 +101,7 @@ ; CHECK: [[LBL]]: ; CHECK-NEXT: br label %[[LPAD:[^\s]+]] ; CHECK: ret void -; CHECK: landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 +; CHECK: landingpad { i8*, i32 } ; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIi to i8*) ; CHECK-NEXT: br label %[[LPAD]] ; CHECK: [[LPAD]]: @@ -113,7 +113,7 @@ ;; Test 1 - Correctly handle phis in outer landing pads. -define void @test1_out() uwtable ssp { +define void @test1_out() uwtable ssp personality i32 (...)* @__gxx_personality_v0 { entry: invoke void @test0_in() to label %cont unwind label %lpad @@ -128,7 +128,7 @@ lpad: %x = phi i32 [ 0, %entry ], [ 1, %cont ] %y = phi i32 [ 1, %entry ], [ 4, %cont ] - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} catch i8* bitcast (i8** @_ZTIi to i8*) %eh.exc = extractvalue { i8*, i32 } %exn, 0 %eh.selector = extractvalue { i8*, i32 } %exn, 1 @@ -163,7 +163,7 @@ ; Inner landing pad from first inlining. ; CHECK: [[LPAD1]]: -; CHECK-NEXT: [[LPADVAL1:%.*]] = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 +; CHECK-NEXT: [[LPADVAL1:%.*]] = landingpad { i8*, i32 } ; CHECK-NEXT: cleanup ; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIi to i8*) ; CHECK-NEXT: invoke void @_ZN1AD1Ev(%struct.A* [[A1]]) @@ -182,7 +182,7 @@ ; Inner landing pad from second inlining. ; CHECK: [[LPAD2]]: -; CHECK-NEXT: [[LPADVAL2:%.*]] = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 +; CHECK-NEXT: [[LPADVAL2:%.*]] = landingpad { i8*, i32 } ; CHECK-NEXT: cleanup ; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIi to i8*) ; CHECK-NEXT: invoke void @_ZN1AD1Ev(%struct.A* [[A2]]) @@ -195,7 +195,7 @@ ; CHECK: [[LPAD]]: ; CHECK-NEXT: [[X:%.*]] = phi i32 [ 0, %entry ], [ 0, {{%.*}} ], [ 1, %cont ], [ 1, {{%.*}} ] ; CHECK-NEXT: [[Y:%.*]] = phi i32 [ 1, %entry ], [ 1, {{%.*}} ], [ 4, %cont ], [ 4, {{%.*}} ] -; CHECK-NEXT: [[LPADVAL:%.*]] = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 +; CHECK-NEXT: [[LPADVAL:%.*]] = landingpad { i8*, i32 } ; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIi to i8*) ; CHECK-NEXT: br label %[[LPAD_JOIN2]] @@ -221,7 +221,7 @@ ;; Test 2 - Don't make invalid IR for inlines into landing pads without eh.exception calls -define void @test2_out() uwtable ssp { +define void @test2_out() uwtable ssp personality i32 (...)* @__gxx_personality_v0 { entry: invoke void @test0_in() to label %ret unwind label %lpad @@ -230,7 +230,7 @@ ret void lpad: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup call void @_ZSt9terminatev() unreachable @@ -250,7 +250,7 @@ ;; Test 3 - Deal correctly with split unwind edges. -define void @test3_out() uwtable ssp { +define void @test3_out() uwtable ssp personality i32 (...)* @__gxx_personality_v0 { entry: invoke void @test0_in() to label %ret unwind label %lpad @@ -259,7 +259,7 @@ ret void lpad: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} catch i8* bitcast (i8** @_ZTIi to i8*) br label %lpad.cont @@ -269,7 +269,7 @@ } ; CHECK: define void @test3_out() -; CHECK: landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 +; CHECK: landingpad { i8*, i32 } ; CHECK-NEXT: cleanup ; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIi to i8*) ; CHECK-NEXT: invoke void @_ZN1AD1Ev( @@ -284,7 +284,7 @@ ;; Test 4 - Split unwind edges with a dominance problem -define void @test4_out() uwtable ssp { +define void @test4_out() uwtable ssp personality i32 (...)* @__gxx_personality_v0 { entry: invoke void @test0_in() to label %cont unwind label %lpad.crit @@ -297,13 +297,13 @@ ret void lpad.crit: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} catch i8* bitcast (i8** @_ZTIi to i8*) call void @opaque() nounwind br label %terminate lpad: - %exn2 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn2 = landingpad {i8*, i32} catch i8* bitcast (i8** @_ZTIi to i8*) br label %terminate @@ -315,7 +315,7 @@ } ; CHECK: define void @test4_out() -; CHECK: landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 +; CHECK: landingpad { i8*, i32 } ; CHECK-NEXT: cleanup ; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIi to i8*) ; CHECK-NEXT: invoke void @_ZN1AD1Ev( @@ -325,7 +325,7 @@ ; CHECK: invoke void @opaque() ; CHECK-NEXT: unwind label %lpad ; CHECK: lpad.crit: -; CHECK-NEXT: landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 +; CHECK-NEXT: landingpad { i8*, i32 } ; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIi to i8*) ; CHECK-NEXT: br label %[[JOIN]] ; CHECK: [[JOIN]]: @@ -333,7 +333,7 @@ ; CHECK-NEXT: call void @opaque() [[NUW:#[0-9]+]] ; CHECK-NEXT: br label %[[FIX:[^\s]+]] ; CHECK: lpad: -; CHECK-NEXT: landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 +; CHECK-NEXT: landingpad { i8*, i32 } ; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIi to i8*) ; CHECK-NEXT: br label %[[FIX]] ; CHECK: [[FIX]]: Index: test/Transforms/Inline/inline_returns_twice.ll =================================================================== --- test/Transforms/Inline/inline_returns_twice.ll +++ test/Transforms/Inline/inline_returns_twice.ll @@ -37,7 +37,7 @@ ret i32 %add } -define i32 @inner3() { +define i32 @inner3() personality i8* null { entry: %invoke = invoke i32 @a() returns_twice to label %cont unwind label %lpad @@ -47,7 +47,7 @@ ret i32 %add lpad: - %lp = landingpad i32 personality i8* null cleanup + %lp = landingpad i32 cleanup resume i32 %lp } @@ -60,7 +60,7 @@ ret i32 %add } -define i32 @inner4() returns_twice { +define i32 @inner4() returns_twice personality i8* null { entry: %invoke = invoke i32 @a() returns_twice to label %cont unwind label %lpad @@ -70,7 +70,7 @@ ret i32 %add lpad: - %lp = landingpad i32 personality i8* null cleanup + %lp = landingpad i32 cleanup resume i32 %lp } Index: test/Transforms/Inline/invoke-cleanup.ll =================================================================== --- test/Transforms/Inline/invoke-cleanup.ll +++ test/Transforms/Inline/invoke-cleanup.ll @@ -6,13 +6,13 @@ @exception_type2 = external global i8 -define internal void @inner() { +define internal void @inner() personality i8* null { invoke void @external_func() to label %cont unwind label %lpad cont: ret void lpad: - %lp = landingpad i32 personality i8* null + %lp = landingpad i32 catch i8* @exception_type1 resume i32 %lp } @@ -21,13 +21,13 @@ ; this call site (PR17872), otherwise C++ destructors will not be ; called when they should be. -define void @outer() { +define void @outer() personality i8* null { invoke void @inner() to label %cont unwind label %lpad cont: ret void lpad: - %lp = landingpad i32 personality i8* null + %lp = landingpad i32 cleanup catch i8* @exception_type2 resume i32 %lp Index: test/Transforms/Inline/invoke-combine-clauses.ll =================================================================== --- test/Transforms/Inline/invoke-combine-clauses.ll +++ test/Transforms/Inline/invoke-combine-clauses.ll @@ -12,13 +12,13 @@ ; inlined function caused "catch i8* @exception_outer" to appear ; multiple times in the resulting landingpad. -define internal void @inner_multiple_resume() { +define internal void @inner_multiple_resume() personality i8* null { invoke void @external_func() to label %cont unwind label %lpad cont: ret void lpad: - %lp = landingpad i32 personality i8* null + %lp = landingpad i32 catch i8* @exception_inner %cond = load i1, i1* @condition br i1 %cond, label %resume1, label %resume2 @@ -28,13 +28,13 @@ resume i32 2 } -define void @outer_multiple_resume() { +define void @outer_multiple_resume() personality i8* null { invoke void @inner_multiple_resume() to label %cont unwind label %lpad cont: ret void lpad: - %lp = landingpad i32 personality i8* null + %lp = landingpad i32 catch i8* @exception_outer resume i32 %lp } @@ -50,25 +50,25 @@ ; inlined function caused "catch i8* @exception_outer" to appear ; multiple times in the resulting landingpad. -define internal void @inner_resume_and_call() { +define internal void @inner_resume_and_call() personality i8* null { call void @external_func() invoke void @external_func() to label %cont unwind label %lpad cont: ret void lpad: - %lp = landingpad i32 personality i8* null + %lp = landingpad i32 catch i8* @exception_inner resume i32 %lp } -define void @outer_resume_and_call() { +define void @outer_resume_and_call() personality i8* null { invoke void @inner_resume_and_call() to label %cont unwind label %lpad cont: ret void lpad: - %lp = landingpad i32 personality i8* null + %lp = landingpad i32 catch i8* @exception_outer resume i32 %lp } @@ -86,26 +86,26 @@ ; function (since the outer function's landingpad will not be ; reachable), but it's OK to include this clause. -define internal void @inner_no_resume_or_call() { +define internal void @inner_no_resume_or_call() personality i8* null { invoke void @external_func() to label %cont unwind label %lpad cont: ret void lpad: - %lp = landingpad i32 personality i8* null + %lp = landingpad i32 catch i8* @exception_inner ; A landingpad might have no "resume" if a C++ destructor aborts. call void @abort() noreturn nounwind unreachable } -define void @outer_no_resume_or_call() { +define void @outer_no_resume_or_call() personality i8* null { invoke void @inner_no_resume_or_call() to label %cont unwind label %lpad cont: ret void lpad: - %lp = landingpad i32 personality i8* null + %lp = landingpad i32 catch i8* @exception_outer resume i32 %lp } Index: test/Transforms/Inline/invoke-cost.ll =================================================================== --- test/Transforms/Inline/invoke-cost.ll +++ test/Transforms/Inline/invoke-cost.ll @@ -10,7 +10,7 @@ declare void @__cxa_end_catch() declare void @_ZSt9terminatev() -define void @inner1() { +define void @inner1() personality i32 (...)* @__gxx_personality_v0 { entry: invoke void @f() to label %cont1 unwind label %terminate.lpad @@ -27,7 +27,7 @@ ret void terminate.lpad: - landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + landingpad {i8*, i32} catch i8* null call void @_ZSt9terminatev() noreturn nounwind unreachable Index: test/Transforms/Inline/invoke_test-1.ll =================================================================== --- test/Transforms/Inline/invoke_test-1.ll +++ test/Transforms/Inline/invoke_test-1.ll @@ -12,7 +12,7 @@ } ; caller returns true if might_throw throws an exception... -define i32 @caller() { +define i32 @caller() personality i32 (...)* @__gxx_personality_v0 { invoke void @callee( ) to label %cont unwind label %exc @@ -20,7 +20,7 @@ ret i32 0 exc: ; preds = %0 - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup ret i32 1 } Index: test/Transforms/Inline/invoke_test-2.ll =================================================================== --- test/Transforms/Inline/invoke_test-2.ll +++ test/Transforms/Inline/invoke_test-2.ll @@ -6,7 +6,7 @@ declare void @might_throw() -define internal i32 @callee() { +define internal i32 @callee() personality i32 (...)* @__gxx_personality_v0 { invoke void @might_throw( ) to label %cont unwind label %exc @@ -14,13 +14,13 @@ ret i32 0 exc: ; preds = %0 - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup ret i32 1 } ; caller returns true if might_throw throws an exception... callee cannot throw. -define i32 @caller() { +define i32 @caller() personality i32 (...)* @__gxx_personality_v0 { %X = invoke i32 @callee( ) to label %cont unwind label %UnreachableExceptionHandler ; <i32> [#uses=1] @@ -28,7 +28,7 @@ ret i32 %X UnreachableExceptionHandler: ; preds = %0 - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup ret i32 -1 } Index: test/Transforms/Inline/invoke_test-3.ll =================================================================== --- test/Transforms/Inline/invoke_test-3.ll +++ test/Transforms/Inline/invoke_test-3.ll @@ -5,7 +5,7 @@ declare void @might_throw() -define internal i32 @callee() { +define internal i32 @callee() personality i32 (...)* @__gxx_personality_v0 { invoke void @might_throw( ) to label %cont unwind label %exc @@ -14,14 +14,14 @@ exc: ; preds = %0a ; This just rethrows the exception! - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup resume { i8*, i32 } %exn } ; caller returns true if might_throw throws an exception... which gets ; propagated by callee. -define i32 @caller() { +define i32 @caller() personality i32 (...)* @__gxx_personality_v0 { %X = invoke i32 @callee( ) to label %cont unwind label %Handler ; <i32> [#uses=1] @@ -30,7 +30,7 @@ Handler: ; preds = %0 ; This consumes an exception thrown by might_throw - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup ret i32 1 } Index: test/Transforms/InstCombine/2003-10-29-CallSiteResolve.ll =================================================================== --- test/Transforms/InstCombine/2003-10-29-CallSiteResolve.ll +++ test/Transforms/InstCombine/2003-10-29-CallSiteResolve.ll @@ -2,7 +2,7 @@ declare i32* @bar() -define float* @foo() { +define float* @foo() personality i32 (...)* @__gxx_personality_v0 { %tmp.11 = invoke float* bitcast (i32* ()* @bar to float* ()*)( ) to label %invoke_cont unwind label %X ; <float*> [#uses=1] @@ -10,7 +10,7 @@ ret float* %tmp.11 X: ; preds = %0 - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup ret float* null } Index: test/Transforms/InstCombine/2004-01-13-InstCombineInvokePHI.ll =================================================================== --- test/Transforms/InstCombine/2004-01-13-InstCombineInvokePHI.ll +++ test/Transforms/InstCombine/2004-01-13-InstCombineInvokePHI.ll @@ -9,7 +9,7 @@ declare i8* @test() -define i32 @foo() { +define i32 @foo() personality i32 (...)* @__gxx_personality_v0 { entry: br i1 true, label %cont, label %call @@ -23,7 +23,7 @@ ret i32 %V N: ; preds = %call - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup ret i32 0 } Index: test/Transforms/InstCombine/2008-05-09-SinkOfInvoke.ll =================================================================== --- test/Transforms/InstCombine/2008-05-09-SinkOfInvoke.ll +++ test/Transforms/InstCombine/2008-05-09-SinkOfInvoke.ll @@ -9,7 +9,7 @@ declare i32** @__ctype_tolower_loc() readnone -define void @_ZNSt5ctypeIcEC2EPiPKtbm(%"struct.std::ctype<char>"* %this, i32* %unnamed_arg, i16* %__table, i8 zeroext %__del, i64 %__refs) { +define void @_ZNSt5ctypeIcEC2EPiPKtbm(%"struct.std::ctype<char>"* %this, i32* %unnamed_arg, i16* %__table, i8 zeroext %__del, i64 %__refs) personality i32 (...)* @__gxx_personality_v0 { entry: %tmp8 = invoke i32* @_ZNSt6locale5facet15_S_get_c_localeEv( ) to label %invcont unwind label %lpad ; <i32*> [#uses=0] @@ -29,7 +29,7 @@ ret void lpad: ; preds = %invcont31, %invcont, %entry - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup unreachable } Index: test/Transforms/InstCombine/AddOverFlow.ll =================================================================== --- test/Transforms/InstCombine/AddOverFlow.ll +++ test/Transforms/InstCombine/AddOverFlow.ll @@ -39,7 +39,7 @@ !0 = !{i16 0, i16 32768} ; [0, 32767] !1 = !{i16 0, i16 32769} ; [0, 32768] -define i16 @add_bounded_values(i16 %a, i16 %b) { +define i16 @add_bounded_values(i16 %a, i16 %b) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { ; CHECK-LABEL: @add_bounded_values( entry: %c = call i16 @bounded(i16 %a), !range !0 @@ -50,12 +50,12 @@ ; CHECK: add nuw i16 %c, %d ret i16 %e lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } filter [0 x i8*] zeroinitializer ret i16 42 } -define i16 @add_bounded_values_2(i16 %a, i16 %b) { +define i16 @add_bounded_values_2(i16 %a, i16 %b) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { ; CHECK-LABEL: @add_bounded_values_2( entry: %c = call i16 @bounded(i16 %a), !range !1 @@ -67,7 +67,7 @@ ; CHECK: add i16 %c, %d ret i16 %e lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } filter [0 x i8*] zeroinitializer ret i16 42 } Index: test/Transforms/InstCombine/LandingPadClauses.ll =================================================================== --- test/Transforms/InstCombine/LandingPadClauses.ll +++ test/Transforms/InstCombine/LandingPadClauses.ll @@ -11,7 +11,7 @@ declare void @bar() -define void @foo_generic() { +define void @foo_generic() personality i32 (i32, i64, i8*, i8*)* @generic_personality { ; CHECK-LABEL: @foo_generic( invoke void @bar() to label %cont.a unwind label %lpad.a @@ -43,7 +43,7 @@ ret void lpad.a: - %a = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @generic_personality + %a = landingpad { i8*, i32 } catch i32* @T1 catch i32* @T2 catch i32* @T1 @@ -55,7 +55,7 @@ ; CHECK-NEXT: unreachable lpad.b: - %b = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @generic_personality + %b = landingpad { i8*, i32 } filter [0 x i32*] zeroinitializer catch i32* @T1 unreachable @@ -64,7 +64,7 @@ ; CHECK-NEXT: unreachable lpad.c: - %c = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @generic_personality + %c = landingpad { i8*, i32 } catch i32* @T1 filter [1 x i32*] [i32* @T1] catch i32* @T2 @@ -75,7 +75,7 @@ ; CHECK-NEXT: unreachable lpad.d: - %d = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @generic_personality + %d = landingpad { i8*, i32 } filter [3 x i32*] zeroinitializer unreachable ; CHECK: %d = landingpad @@ -83,7 +83,7 @@ ; CHECK-NEXT: unreachable lpad.e: - %e = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @generic_personality + %e = landingpad { i8*, i32 } catch i32* @T1 filter [3 x i32*] [i32* @T1, i32* @T2, i32* @T2] unreachable @@ -93,7 +93,7 @@ ; CHECK-NEXT: unreachable lpad.f: - %f = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @generic_personality + %f = landingpad { i8*, i32 } filter [2 x i32*] [i32* @T2, i32* @T1] filter [1 x i32*] [i32* @T1] unreachable @@ -102,7 +102,7 @@ ; CHECK-NEXT: unreachable lpad.g: - %g = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @generic_personality + %g = landingpad { i8*, i32 } filter [1 x i32*] [i32* @T1] catch i32* @T3 filter [2 x i32*] [i32* @T2, i32* @T1] @@ -113,7 +113,7 @@ ; CHECK-NEXT: unreachable lpad.h: - %h = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @generic_personality + %h = landingpad { i8*, i32 } filter [2 x i32*] [i32* @T1, i32* null] filter [1 x i32*] zeroinitializer unreachable @@ -122,7 +122,7 @@ ; CHECK-NEXT: unreachable lpad.i: - %i = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @generic_personality + %i = landingpad { i8*, i32 } cleanup filter [0 x i32*] zeroinitializer unreachable @@ -131,7 +131,7 @@ ; CHECK-NEXT: unreachable } -define void @foo_cxx() { +define void @foo_cxx() personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0 { ; CHECK-LABEL: @foo_cxx( invoke void @bar() to label %cont.a unwind label %lpad.a @@ -148,7 +148,7 @@ ret void lpad.a: - %a = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0 + %a = landingpad { i8*, i32 } catch i32* null catch i32* @T1 unreachable @@ -157,7 +157,7 @@ ; CHECK-NEXT: unreachable lpad.b: - %b = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0 + %b = landingpad { i8*, i32 } filter [1 x i32*] zeroinitializer unreachable ; CHECK: %b = landingpad @@ -165,7 +165,7 @@ ; CHECK-NEXT: unreachable lpad.c: - %c = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0 + %c = landingpad { i8*, i32 } filter [2 x i32*] [i32* @T1, i32* null] unreachable ; CHECK: %c = landingpad @@ -173,7 +173,7 @@ ; CHECK-NEXT: unreachable lpad.d: - %d = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0 + %d = landingpad { i8*, i32 } cleanup catch i32* null unreachable @@ -182,7 +182,7 @@ ; CHECK-NEXT: unreachable } -define void @foo_objc() { +define void @foo_objc() personality i32 (i32, i64, i8*, i8*)* @__objc_personality_v0 { ; CHECK-LABEL: @foo_objc( invoke void @bar() to label %cont.a unwind label %lpad.a @@ -199,7 +199,7 @@ ret void lpad.a: - %a = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__objc_personality_v0 + %a = landingpad { i8*, i32 } catch i32* null catch i32* @T1 unreachable @@ -208,7 +208,7 @@ ; CHECK-NEXT: unreachable lpad.b: - %b = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__objc_personality_v0 + %b = landingpad { i8*, i32 } filter [1 x i32*] zeroinitializer unreachable ; CHECK: %b = landingpad @@ -216,7 +216,7 @@ ; CHECK-NEXT: unreachable lpad.c: - %c = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__objc_personality_v0 + %c = landingpad { i8*, i32 } filter [2 x i32*] [i32* @T1, i32* null] unreachable ; CHECK: %c = landingpad @@ -224,7 +224,7 @@ ; CHECK-NEXT: unreachable lpad.d: - %d = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__objc_personality_v0 + %d = landingpad { i8*, i32 } cleanup catch i32* null unreachable @@ -233,7 +233,7 @@ ; CHECK-NEXT: unreachable } -define void @foo_seh() { +define void @foo_seh() personality i32 (...)* @__C_specific_handler { ; CHECK-LABEL: @foo_seh( invoke void @bar() to label %cont.a unwind label %lpad.a @@ -250,7 +250,7 @@ ret void lpad.a: - %a = landingpad { i8*, i32 } personality i32 (...)* @__C_specific_handler + %a = landingpad { i8*, i32 } catch i32* null catch i32* @T1 unreachable @@ -259,7 +259,7 @@ ; CHECK-NEXT: unreachable lpad.b: - %b = landingpad { i8*, i32 } personality i32 (...)* @__C_specific_handler + %b = landingpad { i8*, i32 } filter [1 x i32*] zeroinitializer unreachable ; CHECK: %b = landingpad @@ -267,7 +267,7 @@ ; CHECK-NEXT: unreachable lpad.c: - %c = landingpad { i8*, i32 } personality i32 (...)* @__C_specific_handler + %c = landingpad { i8*, i32 } filter [2 x i32*] [i32* @T1, i32* null] unreachable ; CHECK: %c = landingpad @@ -275,7 +275,7 @@ ; CHECK-NEXT: unreachable lpad.d: - %d = landingpad { i8*, i32 } personality i32 (...)* @__C_specific_handler + %d = landingpad { i8*, i32 } cleanup catch i32* null unreachable Index: test/Transforms/InstCombine/call.ll =================================================================== --- test/Transforms/InstCombine/call.ll +++ test/Transforms/InstCombine/call.ll @@ -123,7 +123,7 @@ ; rdar://7590304 declare void @test8a() -define i8* @test8() { +define i8* @test8() personality i32 (...)* @__gxx_personality_v0 { ; CHECK-LABEL: @test8( ; CHECK-NEXT: invoke void @test8a() ; Don't turn this into "unreachable": the callee and caller don't agree in @@ -136,7 +136,7 @@ unreachable try.handler: ; preds = %entry - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup ret i8* null } Index: test/Transforms/InstCombine/cast.ll =================================================================== --- test/Transforms/InstCombine/cast.ll +++ test/Transforms/InstCombine/cast.ll @@ -100,7 +100,7 @@ } declare i32 @__gxx_personality_v0(...) -define void @test_invoke_vararg_cast(i32* %a, i32* %b) { +define void @test_invoke_vararg_cast(i32* %a, i32* %b) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: %0 = bitcast i32* %b to i8* %1 = bitcast i32* %a to i64* @@ -111,7 +111,7 @@ ret void lpad: ; preds = %entry - %2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %2 = landingpad { i8*, i32 } cleanup ret void ; CHECK-LABEL: test_invoke_vararg_cast Index: test/Transforms/InstCombine/crash.ll =================================================================== --- test/Transforms/InstCombine/crash.ll +++ test/Transforms/InstCombine/crash.ll @@ -131,11 +131,11 @@ ret i32 0 } -define void @test5() { +define void @test5() personality i32 (...)* @__gxx_personality_v0 { store i1 true, i1* undef %r = invoke i32 @test5a() to label %exit unwind label %unwind unwind: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup br label %exit exit: @@ -159,7 +159,7 @@ %class.RuleBasedBreakIterator = type { i64 ()* } %class.UStack = type { i8** } -define i32 @_ZN22RuleBasedBreakIterator15checkDictionaryEi(%class.RuleBasedBreakIterator* %this, i32 %x) align 2 { +define i32 @_ZN22RuleBasedBreakIterator15checkDictionaryEi(%class.RuleBasedBreakIterator* %this, i32 %x) align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: %breaks = alloca %class.UStack, align 4 ; <%class.UStack*> [#uses=3] call void @_ZN6UStackC1Ei(%class.UStack* %breaks, i32 0) @@ -167,13 +167,13 @@ br i1 %tobool, label %cond.end, label %cond.false terminate.handler: ; preds = %ehcleanup - %exc = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %exc = landingpad { i8*, i32 } cleanup call void @_ZSt9terminatev() noreturn nounwind unreachable ehcleanup: ; preds = %cond.false - %exc1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %exc1 = landingpad { i8*, i32 } catch i8* null invoke void @_ZN6UStackD1Ev(%class.UStack* %breaks) to label %cont unwind label %terminate.handler @@ -207,7 +207,7 @@ ; rdar://7590304 -define i8* @test10(i8* %self, i8* %tmp3) { +define i8* @test10(i8* %self, i8* %tmp3) personality i32 (...)* @__gxx_personality_v0 { entry: store i1 true, i1* undef store i1 true, i1* undef @@ -218,7 +218,7 @@ unreachable try.handler: ; preds = %entry - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} catch i8* null ret i8* %self } @@ -376,7 +376,7 @@ declare void @test18b() noreturn declare void @test18foo(double**) declare void @test18a() noreturn -define fastcc void @test18x(i8* %t0, i1 %b) uwtable align 2 { +define fastcc void @test18x(i8* %t0, i1 %b) uwtable align 2 personality i32 (...)* @__gxx_personality_v0 { entry: br i1 %b, label %e1, label %e2 e1: @@ -389,7 +389,7 @@ to label %u unwind label %lpad lpad: %t5 = phi double** [ %t2, %e1 ], [ %t4, %e2 ] - %lpad.nonloopexit262 = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + %lpad.nonloopexit262 = landingpad { i8*, i32 } cleanup call void @test18foo(double** %t5) unreachable Index: test/Transforms/InstCombine/gepphigep.ll =================================================================== --- test/Transforms/InstCombine/gepphigep.ll +++ test/Transforms/InstCombine/gepphigep.ll @@ -59,7 +59,7 @@ ; Check that instcombine doesn't insert GEPs before landingpad. -define i32 @test3(%struct3* %dm, i1 %tmp4, i64 %tmp9, i64 %tmp19, i64 %tmp20, i64 %tmp21) { +define i32 @test3(%struct3* %dm, i1 %tmp4, i64 %tmp9, i64 %tmp19, i64 %tmp20, i64 %tmp21) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { bb: %tmp = getelementptr inbounds %struct3, %struct3* %dm, i64 0 br i1 %tmp4, label %bb1, label %bb2 @@ -84,7 +84,7 @@ ret i32 0 bb5: - %tmp27 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) catch i8* bitcast (i8** @_ZTIi to i8*) + %tmp27 = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %tmp34 = getelementptr inbounds %struct4, %struct4* %phi, i64 %tmp21, i32 1 %tmp35 = getelementptr inbounds %struct2, %struct2* %tmp34, i64 0, i32 1 %tmp25 = load i32, i32* %tmp35, align 4 @@ -92,7 +92,7 @@ ; CHECK-LABEL: @test3( ; CHECK: bb5: -; CHECK-NEXT: {{.*}}landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) +; CHECK-NEXT: {{.*}}landingpad { i8*, i32 } } @_ZTIi = external constant i8* Index: test/Transforms/InstCombine/invoke.ll =================================================================== --- test/Transforms/InstCombine/invoke.ll +++ test/Transforms/InstCombine/invoke.ll @@ -8,7 +8,7 @@ ; CHECK-LABEL: @f1( -define i64 @f1() nounwind uwtable ssp { +define i64 @f1() nounwind uwtable ssp personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: ; CHECK: nvoke noalias i8* undef() %call = invoke noalias i8* undef() @@ -20,7 +20,7 @@ ret i64 %0 lpad: - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %1 = landingpad { i8*, i32 } filter [0 x i8*] zeroinitializer %2 = extractvalue { i8*, i32 } %1, 0 tail call void @__cxa_call_unexpected(i8* %2) noreturn nounwind @@ -28,7 +28,7 @@ } ; CHECK-LABEL: @f2( -define i64 @f2() nounwind uwtable ssp { +define i64 @f2() nounwind uwtable ssp personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: ; CHECK: nvoke noalias i8* null() %call = invoke noalias i8* null() @@ -40,7 +40,7 @@ ret i64 %0 lpad: - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %1 = landingpad { i8*, i32 } filter [0 x i8*] zeroinitializer %2 = extractvalue { i8*, i32 } %1, 0 tail call void @__cxa_call_unexpected(i8* %2) noreturn nounwind @@ -48,7 +48,7 @@ } ; CHECK-LABEL: @f3( -define void @f3() nounwind uwtable ssp { +define void @f3() nounwind uwtable ssp personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { ; CHECK: invoke void @llvm.donothing() %call = invoke noalias i8* @_Znwm(i64 13) to label %invoke.cont unwind label %lpad @@ -57,7 +57,7 @@ ret void lpad: - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %1 = landingpad { i8*, i32 } filter [0 x i8*] zeroinitializer %2 = extractvalue { i8*, i32 } %1, 0 tail call void @__cxa_call_unexpected(i8* %2) noreturn nounwind Index: test/Transforms/InstCombine/malloc-free-delete.ll =================================================================== --- test/Transforms/InstCombine/malloc-free-delete.ll +++ test/Transforms/InstCombine/malloc-free-delete.ll @@ -127,7 +127,7 @@ declare void @_ZN1AC2Ev(i8* %this) ; CHECK-LABEL: @test7( -define void @test7() { +define void @test7() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: %nt = alloca i8 ; CHECK-NOT: call {{.*}}@_ZnwmRKSt9nothrow_t( @@ -139,7 +139,7 @@ unreachable lpad.i: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) cleanup + %0 = landingpad { i8*, i32 } cleanup ; CHECK-NOT: call {{.*}}@_ZdlPvRKSt9nothrow_t( call void @_ZdlPvRKSt9nothrow_t(i8* %call.i, i8* %nt) builtin nounwind resume { i8*, i32 } %0 Index: test/Transforms/InstCombine/objsize-64.ll =================================================================== --- test/Transforms/InstCombine/objsize-64.ll +++ test/Transforms/InstCombine/objsize-64.ll @@ -18,7 +18,7 @@ ; CHECK-LABEL: @f2( -define i64 @f2(i8** %esc) nounwind uwtable ssp { +define i64 @f2(i8** %esc) nounwind uwtable ssp personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: ; CHECK: invoke noalias i8* @_Znwm(i64 13) %call = invoke noalias i8* @_Znwm(i64 13) @@ -31,7 +31,7 @@ ret i64 %0 lpad: - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %1 = landingpad { i8*, i32 } filter [0 x i8*] zeroinitializer %2 = extractvalue { i8*, i32 } %1, 0 tail call void @__cxa_call_unexpected(i8* %2) noreturn nounwind Index: test/Transforms/InstSimplify/2011-09-05-InsertExtractValue.ll =================================================================== --- test/Transforms/InstSimplify/2011-09-05-InsertExtractValue.ll +++ test/Transforms/InstSimplify/2011-09-05-InsertExtractValue.ll @@ -2,13 +2,13 @@ declare void @bar() -define void @test1() { +define void @test1() personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0 { entry: invoke void @bar() to label %cont unwind label %lpad cont: ret void lpad: - %ex = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0 cleanup + %ex = landingpad { i8*, i32 } cleanup %exc_ptr = extractvalue { i8*, i32 } %ex, 0 %filter = extractvalue { i8*, i32 } %ex, 1 %exc_ptr2 = insertvalue { i8*, i32 } undef, i8* %exc_ptr, 0 Index: test/Transforms/JumpThreading/landing-pad.ll =================================================================== --- test/Transforms/JumpThreading/landing-pad.ll +++ test/Transforms/JumpThreading/landing-pad.ll @@ -42,7 +42,7 @@ ret void } -define void @_Z3fn1v() uwtable { +define void @_Z3fn1v() uwtable personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: %call = call noalias i8* @_Znwm() #8 invoke void @_ZN24CompositeEditCommandImplC2Ev() @@ -68,13 +68,13 @@ ret void lpad: ; preds = %entry - %4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %4 = landingpad { i8*, i32 } cleanup call void @_ZdlPv() #9 unreachable lpad1: ; preds = %_ZN1DC1Ev.exit, %_ZN15EditCommandImpl5applyEv.exit - %5 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %5 = landingpad { i8*, i32 } cleanup %6 = load i32, i32* %1, align 4 %tobool.i.i.i = icmp eq i32 %6, 0 @@ -91,7 +91,7 @@ resume { i8*, i32 } undef terminate.lpad: ; No predecessors! - %7 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %7 = landingpad { i8*, i32 } catch i8* null unreachable } Index: test/Transforms/LCSSA/invoke-dest.ll =================================================================== --- test/Transforms/LCSSA/invoke-dest.ll +++ test/Transforms/LCSSA/invoke-dest.ll @@ -9,7 +9,7 @@ @.str32190 = external constant [92 x i8], align 1 ; <[92 x i8]*> [#uses=1] @.str41 = external constant [25 x i8], align 1 ; <[25 x i8]*> [#uses=1] -define void @_ZN8EtherBus10initializeEv() { +define void @_ZN8EtherBus10initializeEv() personality i32 (...)* @__gxx_personality_v0 { entry: br i1 undef, label %_ZN7cObjectnwEj.exit, label %bb.i @@ -110,17 +110,17 @@ to label %.noexc unwind label %lpad119 ; <i8*> [#uses=1] lpad: ; preds = %_ZN7cObjectnwEj.exit - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup br label %Unwind lpad119: ; preds = %bb106, %invcont104, %invcont103, %bb102, %bb49, %bb34, %bb12, %invcont10, %invcont9, %bb8 - %exn119 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn119 = landingpad {i8*, i32} cleanup unreachable lpad123: ; preds = %.noexc - %exn123 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn123 = landingpad {i8*, i32} cleanup %tmp5 = icmp eq i8* %tmp4, null ; <i1> [#uses=1] br i1 %tmp5, label %Unwind, label %bb.i2 Index: test/Transforms/LoopRotate/multiple-exits.ll =================================================================== --- test/Transforms/LoopRotate/multiple-exits.ll +++ test/Transforms/LoopRotate/multiple-exits.ll @@ -87,7 +87,7 @@ @_ZTIi = external constant i8* ; Verify dominators. -define void @test3(i32 %x) { +define void @test3(i32 %x) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: %cmp2 = icmp eq i32 0, %x br i1 %cmp2, label %try.cont.loopexit, label %for.body.lr.ph @@ -106,7 +106,7 @@ br i1 %cmp, label %for.cond.try.cont.loopexit_crit_edge, label %for.body lpad: ; preds = %for.body - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %1 = extractvalue { i8*, i32 } %0, 0 %2 = extractvalue { i8*, i32 } %0, 1 @@ -132,7 +132,7 @@ br i1 %cmp.i, label %for.cond.i.invoke.cont2.loopexit_crit_edge, label %for.body.i lpad.i: ; preds = %for.body.i - %5 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %5 = landingpad { i8*, i32 } catch i8* bitcast (i8** @_ZTIi to i8*) %6 = extractvalue { i8*, i32 } %5, 0 %7 = extractvalue { i8*, i32 } %5, 1 @@ -149,7 +149,7 @@ br label %invoke.cont2 lpad1.i: ; preds = %catch.i - %9 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %9 = landingpad { i8*, i32 } cleanup %10 = extractvalue { i8*, i32 } %9, 0 %11 = extractvalue { i8*, i32 } %9, 1 Index: test/Transforms/LoopSimplify/2007-10-28-InvokeCrash.ll =================================================================== --- test/Transforms/LoopSimplify/2007-10-28-InvokeCrash.ll +++ test/Transforms/LoopSimplify/2007-10-28-InvokeCrash.ll @@ -3,7 +3,7 @@ target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-s0:0:64-f80:32:32" target triple = "i686-pc-mingw32" -define void @func() { +define void @func() personality i32 (...)* @__gxx_personality_v0 { bb_init: br label %bb_main @@ -18,7 +18,7 @@ br label %bb_main invcont17.normaldest.normaldest: ; No predecessors! - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} catch i8* null store i32 %tmp23, i32* undef br label %bb_main Index: test/Transforms/LoopSimplify/2011-12-14-LandingpadHeader.ll =================================================================== --- test/Transforms/LoopSimplify/2011-12-14-LandingpadHeader.ll +++ test/Transforms/LoopSimplify/2011-12-14-LandingpadHeader.ll @@ -3,7 +3,7 @@ @catchtypeinfo = external unnamed_addr constant { i8*, i8*, i8* } -define void @main() uwtable ssp { +define void @main() uwtable ssp personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @f1() to label %try.cont19 unwind label %catch @@ -17,7 +17,7 @@ ; CHECK: br label %catch catch: ; preds = %if.else, %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } catch i8* bitcast ({ i8*, i8*, i8* }* @catchtypeinfo to i8*) invoke void @f3() to label %if.else unwind label %eh.resume @@ -30,7 +30,7 @@ ret void eh.resume: ; preds = %catch - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %1 = landingpad { i8*, i32 } cleanup catch i8* bitcast ({ i8*, i8*, i8* }* @catchtypeinfo to i8*) resume { i8*, i32 } undef Index: test/Transforms/LoopSimplify/dbg-loc.ll =================================================================== --- test/Transforms/LoopSimplify/dbg-loc.ll +++ test/Transforms/LoopSimplify/dbg-loc.ll @@ -47,12 +47,12 @@ ; CHECK: catch.preheader.split-lp: ; CHECK: br label %catch, !dbg [[LPAD_PREHEADER_LOC]] -define void @with_landingpad() uwtable ssp { +define void @with_landingpad() uwtable ssp personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @f1() to label %try.cont19 unwind label %catch, !dbg !13 catch: ; preds = %if.else, %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } catch i8* bitcast ({ i8*, i8*, i8* }* @catchtypeinfo to i8*), !dbg !13 invoke void @f3() to label %if.else unwind label %eh.resume, !dbg !13 @@ -63,7 +63,7 @@ ret void, !dbg !13 eh.resume: ; preds = %catch - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %1 = landingpad { i8*, i32 } cleanup catch i8* bitcast ({ i8*, i8*, i8* }* @catchtypeinfo to i8*), !dbg !13 resume { i8*, i32 } undef, !dbg !13 } Index: test/Transforms/LoopStrengthReduce/dominate-assert.ll =================================================================== --- test/Transforms/LoopStrengthReduce/dominate-assert.ll +++ test/Transforms/LoopStrengthReduce/dominate-assert.ll @@ -4,7 +4,7 @@ declare i8* @_Znwm() declare i32 @__gxx_personality_v0(...) declare void @g() -define void @f() { +define void @f() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { bb0: br label %bb1 bb1: @@ -18,7 +18,7 @@ %v3 = invoke noalias i8* @_Znwm() to label %bb5 unwind label %bb4 bb4: - %v4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %v4 = landingpad { i8*, i32 } cleanup br label %bb9 bb5: @@ -32,7 +32,7 @@ bb7: unreachable bb8: - %v7 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %v7 = landingpad { i8*, i32 } cleanup br label %bb9 bb9: @@ -40,7 +40,7 @@ } -define void @h() { +define void @h() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { bb1: invoke void @g() optsize to label %bb2 unwind label %bb5 @@ -54,17 +54,17 @@ bb4: ret void bb5: - %tmp = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %tmp = landingpad { i8*, i32 } cleanup invoke void @g() optsize to label %bb4 unwind label %bb7 bb6: - %tmp1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %tmp1 = landingpad { i8*, i32 } cleanup %arraydestroy.isempty = icmp eq i8* undef, %arrayctor.cur ret void bb7: - %lpad.nonloopexit = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %lpad.nonloopexit = landingpad { i8*, i32 } catch i8* null ret void } Index: test/Transforms/LoopUnswitch/2011-09-26-EHCrash.ll =================================================================== --- test/Transforms/LoopUnswitch/2011-09-26-EHCrash.ll +++ test/Transforms/LoopUnswitch/2011-09-26-EHCrash.ll @@ -6,7 +6,7 @@ %class.MyContainer.1.3.19.29 = type { [6 x %class.MyMemVarClass.0.2.18.28*] } %class.MyMemVarClass.0.2.18.28 = type { i32 } -define void @_ZN11MyContainer1fEi(%class.MyContainer.1.3.19.29* %this, i32 %doit) uwtable ssp align 2 { +define void @_ZN11MyContainer1fEi(%class.MyContainer.1.3.19.29* %this, i32 %doit) uwtable ssp align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: br label %for.cond @@ -38,7 +38,7 @@ br label %for.inc lpad: ; preds = %delete.notnull - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %1 = landingpad { i8*, i32 } cleanup %2 = extractvalue { i8*, i32 } %1, 0 %3 = extractvalue { i8*, i32 } %1, 1 Index: test/Transforms/LoopUnswitch/2012-04-30-LoopUnswitch-LPad-Crash.ll =================================================================== --- test/Transforms/LoopUnswitch/2012-04-30-LoopUnswitch-LPad-Crash.ll +++ test/Transforms/LoopUnswitch/2012-04-30-LoopUnswitch-LPad-Crash.ll @@ -8,7 +8,7 @@ %class.B.21.41.65.101.137.157.177.197.237.241.245.249.261.293.301.337.345.378 = type { %class.A.20.40.64.100.136.156.176.196.236.240.244.248.260.292.300.336.344.377* } %class.A.20.40.64.100.136.156.176.196.236.240.244.248.260.292.300.336.344.377 = type { i8 } -define void @_Z23get_reconstruction_pathv() uwtable ssp { +define void @_Z23get_reconstruction_pathv() uwtable ssp personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: %c = alloca %class.D.22.42.66.102.138.158.178.198.238.242.246.250.262.294.302.338.346.379, align 8 br label %for.cond @@ -33,7 +33,7 @@ br i1 undef, label %for.cond3, label %for.end lpad: ; preds = %for.end, %invoke.cont4, %for.cond3, %invoke.cont, %for.cond - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } cleanup resume { i8*, i32 } undef Index: test/Transforms/LowerInvoke/2003-12-10-Crash.ll =================================================================== --- test/Transforms/LowerInvoke/2003-12-10-Crash.ll +++ test/Transforms/LowerInvoke/2003-12-10-Crash.ll @@ -6,7 +6,7 @@ declare void @bar() -define void @foo() { +define void @foo() personality i32 (...)* @__gxx_personality_v0 { then: invoke void @baz( ) to label %invoke_cont.0 unwind label %try_catch @@ -15,7 +15,7 @@ to label %try_exit unwind label %try_catch try_catch: ; preds = %invoke_cont.0, %then %__tmp.0 = phi i32* [ null, %invoke_cont.0 ], [ null, %then ] ; <i32*> [#uses=0] - %res = landingpad { i8* } personality i32 (...)* @__gxx_personality_v0 + %res = landingpad { i8* } cleanup ret void try_exit: ; preds = %invoke_cont.0 Index: test/Transforms/LowerInvoke/lowerinvoke.ll =================================================================== --- test/Transforms/LowerInvoke/lowerinvoke.ll +++ test/Transforms/LowerInvoke/lowerinvoke.ll @@ -2,7 +2,7 @@ declare i32 @external_func(i64 %arg) -define i32 @invoke_test(i64 %arg) { +define i32 @invoke_test(i64 %arg) personality i8* null { entry: %result = invoke fastcc i32 @external_func(i64 inreg %arg) to label %cont unwind label %lpad @@ -10,7 +10,7 @@ ret i32 %result lpad: %phi = phi i32 [ 99, %entry ] - %lp = landingpad { i8*, i32 } personality i8* null cleanup + %lp = landingpad { i8*, i32 } cleanup ret i32 %phi } Index: test/Transforms/Mem2Reg/crash.ll =================================================================== --- test/Transforms/Mem2Reg/crash.ll +++ test/Transforms/Mem2Reg/crash.ll @@ -3,7 +3,7 @@ declare i32 @test1f() -define i32 @test1() { +define i32 @test1() personality i32 (...)* @__gxx_personality_v0 { entry: %whichFlag = alloca i32 %A = invoke i32 @test1f() @@ -18,7 +18,7 @@ ret i32 %B lpad86: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup br label %bb15 Index: test/Transforms/MergeFunc/2011-02-08-RemoveEqual.ll =================================================================== --- test/Transforms/MergeFunc/2011-02-08-RemoveEqual.ll +++ test/Transforms/MergeFunc/2011-02-08-RemoveEqual.ll @@ -22,7 +22,7 @@ @.str = external constant [1 x i8], align 1 @_ZTVN2kc22impl_fileline_FileLineE = external constant [13 x i32 (...)*], align 32 -define void @_ZN2kc22impl_fileline_FileLineC2EPNS_20impl_casestring__StrEi(%"struct.kc::impl_fileline_FileLine"* %this, %"struct.kc::impl_casestring__Str"* %_file, i32 %_line) align 2 { +define void @_ZN2kc22impl_fileline_FileLineC2EPNS_20impl_casestring__StrEi(%"struct.kc::impl_fileline_FileLine"* %this, %"struct.kc::impl_casestring__Str"* %_file, i32 %_line) align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: %this_addr = alloca %"struct.kc::impl_fileline_FileLine"*, align 4 %_file_addr = alloca %"struct.kc::impl_casestring__Str"*, align 4 @@ -75,7 +75,7 @@ ret void lpad: ; preds = %bb - %eh_ptr = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %eh_ptr = landingpad { i8*, i32 } cleanup %exn = extractvalue { i8*, i32 } %eh_ptr, 0 store i8* %exn, i8** %eh_exception @@ -148,7 +148,7 @@ ret void } -define void @_ZN2kc22impl_fileline_FileLineC1EPNS_20impl_casestring__StrEi(%"struct.kc::impl_fileline_FileLine"* %this, %"struct.kc::impl_casestring__Str"* %_file, i32 %_line) align 2 { +define void @_ZN2kc22impl_fileline_FileLineC1EPNS_20impl_casestring__StrEi(%"struct.kc::impl_fileline_FileLine"* %this, %"struct.kc::impl_casestring__Str"* %_file, i32 %_line) align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: %this_addr = alloca %"struct.kc::impl_fileline_FileLine"*, align 4 %_file_addr = alloca %"struct.kc::impl_casestring__Str"*, align 4 @@ -201,7 +201,7 @@ ret void lpad: ; preds = %bb - %eh_ptr = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %eh_ptr = landingpad { i8*, i32 } cleanup %exn = extractvalue { i8*, i32 } %eh_ptr, 0 store i8* %exn, i8** %eh_exception Index: test/Transforms/MergeFunc/call-and-invoke-with-ranges.ll =================================================================== --- test/Transforms/MergeFunc/call-and-invoke-with-ranges.ll +++ test/Transforms/MergeFunc/call-and-invoke-with-ranges.ll @@ -26,18 +26,18 @@ ret i8 %out } -define i8 @invoke_with_range() { +define i8 @invoke_with_range() personality i8* undef { %out = invoke i8 @dummy() to label %next unwind label %lpad, !range !0 next: ret i8 %out lpad: - %pad = landingpad { i8*, i32 } personality i8* undef cleanup + %pad = landingpad { i8*, i32 } cleanup resume { i8*, i32 } zeroinitializer } -define i8 @invoke_no_range() { +define i8 @invoke_no_range() personality i8* undef { ; CHECK-LABEL: @invoke_no_range() ; CHECK-NEXT: invoke i8 @dummy %out = invoke i8 @dummy() to label %next unwind label %lpad @@ -46,11 +46,11 @@ ret i8 %out lpad: - %pad = landingpad { i8*, i32 } personality i8* undef cleanup + %pad = landingpad { i8*, i32 } cleanup resume { i8*, i32 } zeroinitializer } -define i8 @invoke_different_range() { +define i8 @invoke_different_range() personality i8* undef { ; CHECK-LABEL: @invoke_different_range() ; CHECK-NEXT: invoke i8 @dummy %out = invoke i8 @dummy() to label %next unwind label %lpad, !range !1 @@ -59,7 +59,7 @@ ret i8 %out lpad: - %pad = landingpad { i8*, i32 } personality i8* undef cleanup + %pad = landingpad { i8*, i32 } cleanup resume { i8*, i32 } zeroinitializer } @@ -71,7 +71,7 @@ ret i8 %out } -define i8 @invoke_with_same_range() { +define i8 @invoke_with_same_range() personality i8* undef { ; CHECK-LABEL: @invoke_with_same_range() ; CHECK: tail call i8 @invoke_with_range() %out = invoke i8 @dummy() to label %next unwind label %lpad, !range !0 @@ -80,7 +80,7 @@ ret i8 %out lpad: - %pad = landingpad { i8*, i32 } personality i8* undef cleanup + %pad = landingpad { i8*, i32 } cleanup resume { i8*, i32 } zeroinitializer } Index: test/Transforms/ObjCARC/basic.ll =================================================================== --- test/Transforms/ObjCARC/basic.ll +++ test/Transforms/ObjCARC/basic.ll @@ -1289,7 +1289,7 @@ ; CHECK: %tmp1 = tail call i8* @objc_retain(i8* %tmp) [[NUW]] ; CHECK-NEXT: invoke ; CHECK: } -define void @test20(double* %self) { +define void @test20(double* %self) personality i32 (...)* @__gxx_personality_v0 { if.then12: %tmp = bitcast double* %self to i8* %tmp1 = call i8* @objc_retain(i8* %tmp) nounwind @@ -1302,7 +1302,7 @@ lpad20: ; preds = %invoke.cont23, %if.then12 %tmp502 = phi double* [ undef, %invoke.cont23 ], [ %self, %if.then12 ] - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup unreachable Index: test/Transforms/ObjCARC/contract-testcases.ll =================================================================== --- test/Transforms/ObjCARC/contract-testcases.ll +++ test/Transforms/ObjCARC/contract-testcases.ll @@ -67,12 +67,12 @@ ; call, handle the case where it's an invoke in a different basic block. ; rdar://11714057 -; CHECK: define void @_Z6doTestP8NSString() { +; CHECK: define void @_Z6doTestP8NSString() personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) { ; CHECK: invoke.cont: ; preds = %entry ; CHECK-NEXT: call void asm sideeffect "mov\09r7, r7\09\09@ marker for objc_retainAutoreleaseReturnValue", ""() ; CHECK-NEXT: %tmp = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %call) [[NUW:#[0-9]+]] ; CHECK: } -define void @_Z6doTestP8NSString() { +define void @_Z6doTestP8NSString() personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) { entry: %call = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* ()*)() to label %invoke.cont unwind label %lpad @@ -82,7 +82,7 @@ unreachable lpad: ; preds = %entry - %tmp1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1 = landingpad { i8*, i32 } cleanup resume { i8*, i32 } undef } Index: test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll =================================================================== --- test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll +++ test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll @@ -34,7 +34,7 @@ @"\01L_OBJC_SELECTOR_REFERENCES_5" = internal global i8* getelementptr inbounds ([14 x i8], [14 x i8]* @"\01L_OBJC_METH_VAR_NAME_4", i64 0, i64 0), section "__DATA, __objc_selrefs, literal_pointers, no_dead_strip" @llvm.used = appending global [6 x i8*] [i8* bitcast (%struct._class_t** @"\01L_OBJC_CLASSLIST_REFERENCES_$_" to i8*), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01L_OBJC_METH_VAR_NAME_", i32 0, i32 0), i8* bitcast (i8** @"\01L_OBJC_SELECTOR_REFERENCES_" to i8*), i8* bitcast (%struct._class_t** @"\01L_OBJC_CLASSLIST_REFERENCES_$_1" to i8*), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @"\01L_OBJC_METH_VAR_NAME_4", i32 0, i32 0), i8* bitcast (i8** @"\01L_OBJC_SELECTOR_REFERENCES_5" to i8*)], section "llvm.metadata" -define i32 @main() uwtable ssp { +define i32 @main() uwtable ssp personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) { entry: %tmp = load %struct._class_t*, %struct._class_t** @"\01L_OBJC_CLASSLIST_REFERENCES_$_", align 8, !dbg !37 %tmp1 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8, !dbg !37, !invariant.load !38 @@ -54,7 +54,7 @@ br label %if.end, !dbg !43 lpad: ; preds = %entry - %tmp4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) + %tmp4 = landingpad { i8*, i32 } catch i8* null, !dbg !40 %tmp5 = extractvalue { i8*, i32 } %tmp4, 0, !dbg !40 %exn.adjusted = call i8* @objc_begin_catch(i8* %tmp5) nounwind, !dbg !44 Index: test/Transforms/ObjCARC/invoke.ll =================================================================== --- test/Transforms/ObjCARC/invoke.ll +++ test/Transforms/ObjCARC/invoke.ll @@ -18,7 +18,7 @@ ; CHECK: call void @objc_release(i8* %zipFile) [[NUW]], !clang.imprecise_release !0 ; CHECK: ret void ; CHECK-NEXT: } -define void @test0(i8* %zipFile) { +define void @test0(i8* %zipFile) personality i32 (...)* @__gxx_personality_v0 { entry: call i8* @objc_retain(i8* %zipFile) nounwind call void @use_pointer(i8* %zipFile) @@ -30,7 +30,7 @@ ret void lpad: ; preds = %entry - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup call void @objc_release(i8* %zipFile) nounwind, !clang.imprecise_release !0 ret void @@ -50,7 +50,7 @@ ; CHECK: done: ; CHECK-NEXT: ret void ; CHECK-NEXT: } -define void @test1(i8* %zipFile) { +define void @test1(i8* %zipFile) personality i32 (...)* @__gxx_personality_v0 { entry: call i8* @objc_retain(i8* %zipFile) nounwind call void @use_pointer(i8* %zipFile) @@ -62,7 +62,7 @@ br label %done lpad: ; preds = %entry - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup call void @callee() br label %done @@ -75,7 +75,7 @@ ; The optimizer should ignore invoke unwind paths consistently. ; PR12265 -; CHECK: define void @test2() { +; CHECK: define void @test2() personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) { ; CHECK: invoke.cont: ; CHECK-NEXT: call i8* @objc_retain ; CHECK-NOT: @objc_r @@ -85,7 +85,7 @@ ; CHECK: finally.rethrow: ; CHECK-NOT: @objc ; CHECK: } -define void @test2() { +define void @test2() personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) { entry: %call = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* ()*)() to label %invoke.cont unwind label %finally.rethrow, !clang.arc.no_objc_arc_exceptions !0 @@ -101,7 +101,7 @@ ret void finally.rethrow: ; preds = %invoke.cont, %entry - %tmp2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) + %tmp2 = landingpad { i8*, i32 } catch i8* null unreachable } @@ -113,7 +113,7 @@ ; CHECK-NEXT: call void @objc_release(i8* %p) [[NUW]] ; CHECK-NEXT: ret void ; CHECK-NEXT: } -define void @test3(i8* %p, i1 %b) { +define void @test3(i8* %p, i1 %b) personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) { entry: %0 = call i8* @objc_retain(i8* %p) call void @callee() @@ -128,7 +128,7 @@ to label %if.end unwind label %lpad, !clang.arc.no_objc_arc_exceptions !0 lpad: - %r = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) + %r = landingpad { i8*, i32 } cleanup ret void @@ -141,7 +141,7 @@ ; CHECK-LABEL: define void @test4( ; CHECK: lpad: -; CHECK-NEXT: %r = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) +; CHECK-NEXT: %r = landingpad { i8*, i32 } ; CHECK-NEXT: cleanup ; CHECK-NEXT: call void @objc_release(i8* %p) [[NUW]] ; CHECK-NEXT: ret void @@ -149,7 +149,7 @@ ; CHECK-NEXT: call void @objc_release(i8* %p) [[NUW]] ; CHECK-NEXT: ret void ; CHECK-NEXT: } -define void @test4(i8* %p, i1 %b) { +define void @test4(i8* %p, i1 %b) personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) { entry: %0 = call i8* @objc_retain(i8* %p) call void @callee() @@ -164,7 +164,7 @@ to label %if.end unwind label %lpad lpad: - %r = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) + %r = landingpad { i8*, i32 } cleanup call void @objc_release(i8* %p) ret void @@ -180,13 +180,13 @@ ; CHECK-LABEL: define void @test5( ; CHECK: call i8* @objc_retainAutoreleasedReturnValue(i8* %z) ; CHECK: } -define void @test5() { +define void @test5() personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) { entry: %z = invoke i8* @returner() to label %if.end unwind label %lpad, !clang.arc.no_objc_arc_exceptions !0 lpad: - %r13 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) + %r13 = landingpad { i8*, i32 } cleanup ret void @@ -200,13 +200,13 @@ ; CHECK-LABEL: define void @test6( ; CHECK: call i8* @objc_retain(i8* %z) ; CHECK: } -define void @test6() { +define void @test6() personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) { entry: %z = invoke i8* @returner() to label %if.end unwind label %lpad, !clang.arc.no_objc_arc_exceptions !0 lpad: - %r13 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) + %r13 = landingpad { i8*, i32 } cleanup ret void Index: test/Transforms/ObjCARC/path-overflow.ll =================================================================== --- test/Transforms/ObjCARC/path-overflow.ll +++ test/Transforms/ObjCARC/path-overflow.ll @@ -29,7 +29,7 @@ declare i32 @__objc_personality_v0(...) -define hidden void @test1() { +define hidden void @test1() personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) { entry: br i1 undef, label %msgSend.nullinit, label %msgSend.call @@ -864,7 +864,7 @@ } ; Function Attrs: ssp -define void @test3() #1 { +define void @test3() #1 personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) { entry: %call2 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i8*)*)(i8* undef, i8* undef, i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring to i8*)) to label %invoke.cont unwind label %lpad @@ -891,7 +891,7 @@ br label %invoke.cont8 lpad.i: ; preds = %land.end - %tmp13 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp13 = landingpad { i8*, i32 } cleanup unreachable @@ -914,7 +914,7 @@ br label %invoke.cont24 lpad.i1982: ; preds = %invoke.cont21 - %tmp28 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp28 = landingpad { i8*, i32 } cleanup unreachable @@ -940,7 +940,7 @@ br label %invoke.cont44 lpad.i1988: ; preds = %land.end43 - %tmp42 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp42 = landingpad { i8*, i32 } cleanup unreachable @@ -980,7 +980,7 @@ br label %invoke.cont91 lpad.i2000: ; preds = %invoke.cont71 - %tmp74 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp74 = landingpad { i8*, i32 } cleanup br label %ehcleanup102 @@ -1003,7 +1003,7 @@ br label %invoke.cont100 lpad.i2006: ; preds = %invoke.cont97 - %tmp82 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp82 = landingpad { i8*, i32 } cleanup unreachable @@ -1022,7 +1022,7 @@ br label %invoke.cont117 lpad.i2012: ; preds = %invoke.cont110 - %tmp98 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp98 = landingpad { i8*, i32 } cleanup unreachable @@ -1031,12 +1031,12 @@ to label %invoke.cont.i2022 unwind label %lpad156.body lpad: ; preds = %entry - %tmp118 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp118 = landingpad { i8*, i32 } cleanup br label %ehcleanup lpad3: ; preds = %land.rhs, %invoke.cont - %tmp119 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp119 = landingpad { i8*, i32 } cleanup br label %ehcleanup @@ -1044,12 +1044,12 @@ unreachable lpad16: ; preds = %invoke.cont8 - %tmp121 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp121 = landingpad { i8*, i32 } cleanup br label %ehcleanup26 lpad20: ; preds = %invoke.cont17 - %tmp122 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp122 = landingpad { i8*, i32 } cleanup br label %ehcleanup26 @@ -1057,32 +1057,32 @@ unreachable lpad35: ; preds = %land.rhs39, %invoke.cont24 - %tmp124 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp124 = landingpad { i8*, i32 } cleanup unreachable lpad51: ; preds = %invoke.cont44 - %tmp125 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp125 = landingpad { i8*, i32 } cleanup unreachable lpad61: ; preds = %land.rhs58 - %tmp127 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp127 = landingpad { i8*, i32 } cleanup unreachable lpad66.body.thread: ; preds = %invoke.cont62 - %tmp128 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp128 = landingpad { i8*, i32 } cleanup unreachable lpad66.body: ; preds = %land.end70 - %tmp129 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp129 = landingpad { i8*, i32 } cleanup unreachable lpad94: ; preds = %invoke.cont95, %invoke.cont91 - %tmp133 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp133 = landingpad { i8*, i32 } cleanup br label %ehcleanup102 @@ -1090,7 +1090,7 @@ unreachable lpad109: ; preds = %invoke.cont100 - %tmp134 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp134 = landingpad { i8*, i32 } cleanup unreachable @@ -1129,7 +1129,7 @@ br label %invoke.cont190 lpad.i2036: ; preds = %invoke.cont185 - %tmp168 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp168 = landingpad { i8*, i32 } cleanup br label %lpad183.body @@ -1156,7 +1156,7 @@ br label %invoke.cont207 lpad.i2042: ; preds = %invoke.cont204 - %tmp181 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp181 = landingpad { i8*, i32 } cleanup unreachable @@ -1193,7 +1193,7 @@ br label %invoke.cont231 lpad.i2054: ; preds = %invoke.cont228 - %tmp198 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp198 = landingpad { i8*, i32 } cleanup unreachable @@ -1258,7 +1258,7 @@ br label %invoke.cont281 lpad.i2066: ; preds = %invoke.cont278 - %tmp253 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp253 = landingpad { i8*, i32 } cleanup unreachable @@ -1326,7 +1326,7 @@ br label %invoke.cont373 lpad.i2078: ; preds = %invoke.cont370 - %tmp340 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp340 = landingpad { i8*, i32 } cleanup unreachable @@ -1353,7 +1353,7 @@ br label %invoke.cont392 lpad.i2084: ; preds = %invoke.cont383 - %tmp360 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp360 = landingpad { i8*, i32 } cleanup unreachable @@ -1384,7 +1384,7 @@ br label %invoke.cont405 lpad.i2090: ; preds = %invoke.cont402 - %tmp370 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp370 = landingpad { i8*, i32 } cleanup unreachable @@ -1411,7 +1411,7 @@ br label %invoke.cont418 lpad.i2096: ; preds = %invoke.cont412 - %tmp380 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp380 = landingpad { i8*, i32 } cleanup unreachable @@ -1442,7 +1442,7 @@ br label %invoke.cont432 lpad.i2102: ; preds = %invoke.cont429 - %tmp390 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp390 = landingpad { i8*, i32 } cleanup unreachable @@ -1459,7 +1459,7 @@ to label %invoke.cont443 unwind label %lpad381 lpad.i2108: ; preds = %invoke.cont435 - %tmp396 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp396 = landingpad { i8*, i32 } cleanup unreachable @@ -1474,7 +1474,7 @@ br label %invoke.cont449 lpad.i2114: ; preds = %invoke.cont443 - %tmp402 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp402 = landingpad { i8*, i32 } cleanup unreachable @@ -1497,7 +1497,7 @@ br label %invoke.cont458 lpad.i2120: ; preds = %invoke.cont455 - %tmp408 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp408 = landingpad { i8*, i32 } cleanup unreachable @@ -1516,7 +1516,7 @@ br label %invoke.cont466 lpad.i2126: ; preds = %invoke.cont460 - %tmp414 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp414 = landingpad { i8*, i32 } cleanup br label %ehcleanup477 @@ -1535,7 +1535,7 @@ br label %invoke.cont475 lpad.i2132: ; preds = %invoke.cont469 - %tmp420 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp420 = landingpad { i8*, i32 } cleanup br label %ehcleanup477 @@ -1584,7 +1584,7 @@ br label %invoke.cont521 lpad.i2138: ; preds = %msgSend.cont - %tmp468 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp468 = landingpad { i8*, i32 } cleanup unreachable @@ -1611,7 +1611,7 @@ br label %invoke.cont540 lpad.i2144: ; preds = %invoke.cont534 - %tmp486 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp486 = landingpad { i8*, i32 } cleanup unreachable @@ -1642,7 +1642,7 @@ to label %invoke.cont566 unwind label %lpad565 lpad.i2150: ; preds = %invoke.cont554 - %tmp500 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp500 = landingpad { i8*, i32 } cleanup call void @objc_release(i8* %tmp499) #3, !clang.imprecise_release !0 unreachable @@ -1659,17 +1659,17 @@ unreachable lpad156.body: ; preds = %invoke.cont117 - %tmp1157 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1157 = landingpad { i8*, i32 } cleanup unreachable lpad164.body: ; preds = %invoke.cont157 - %tmp1158 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1158 = landingpad { i8*, i32 } cleanup unreachable lpad183: ; preds = %invoke.cont184, %invoke.cont165 - %tmp1159 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1159 = landingpad { i8*, i32 } cleanup br label %lpad183.body @@ -1677,37 +1677,37 @@ unreachable lpad196: ; preds = %invoke.cont190 - %tmp1160 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1160 = landingpad { i8*, i32 } cleanup unreachable lpad200: ; preds = %invoke.cont197 - %tmp1161 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1161 = landingpad { i8*, i32 } cleanup unreachable lpad203: ; preds = %invoke.cont207, %invoke.cont201 - %tmp1162 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1162 = landingpad { i8*, i32 } cleanup unreachable lpad212.body: ; preds = %invoke.cont208 - %tmp1163 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1163 = landingpad { i8*, i32 } cleanup unreachable lpad220: ; preds = %invoke.cont213 - %tmp1164 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1164 = landingpad { i8*, i32 } cleanup br label %eh.resume lpad227: ; preds = %invoke.cont231, %invoke.cont221 - %tmp1166 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1166 = landingpad { i8*, i32 } cleanup br label %ehcleanup239 lpad236.body: ; preds = %invoke.cont232 - %tmp1167 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1167 = landingpad { i8*, i32 } cleanup br label %ehcleanup239 @@ -1715,27 +1715,27 @@ unreachable lpad244: ; preds = %invoke.cont245, %invoke.cont237 - %tmp1168 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1168 = landingpad { i8*, i32 } cleanup unreachable lpad249: ; preds = %invoke.cont247 - %tmp1169 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1169 = landingpad { i8*, i32 } cleanup unreachable lpad252: ; preds = %invoke.cont250 - %tmp1170 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1170 = landingpad { i8*, i32 } cleanup br label %ehcleanup263 lpad255: ; preds = %invoke.cont253 - %tmp1171 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1171 = landingpad { i8*, i32 } cleanup br label %ehcleanup263 lpad258: ; preds = %invoke.cont256 - %tmp1172 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1172 = landingpad { i8*, i32 } cleanup unreachable @@ -1743,107 +1743,107 @@ unreachable lpad265: ; preds = %invoke.cont259 - %tmp1173 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1173 = landingpad { i8*, i32 } cleanup unreachable lpad273: ; preds = %invoke.cont266 - %tmp1175 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1175 = landingpad { i8*, i32 } cleanup unreachable lpad277: ; preds = %invoke.cont274 - %tmp1176 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1176 = landingpad { i8*, i32 } cleanup unreachable lpad289: ; preds = %invoke.cont281 - %tmp1177 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1177 = landingpad { i8*, i32 } cleanup unreachable lpad301: ; preds = %invoke.cont290 - %tmp1180 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1180 = landingpad { i8*, i32 } cleanup unreachable lpad308: ; preds = %invoke.cont302 - %tmp1182 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1182 = landingpad { i8*, i32 } cleanup unreachable lpad311: ; preds = %invoke.cont309 - %tmp1183 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1183 = landingpad { i8*, i32 } cleanup unreachable lpad314: ; preds = %invoke.cont312 - %tmp1184 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1184 = landingpad { i8*, i32 } cleanup unreachable lpad320: ; preds = %invoke.cont315 - %tmp1186 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1186 = landingpad { i8*, i32 } cleanup unreachable lpad340.body.thread: ; preds = %land.rhs335 - %tmp1188 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1188 = landingpad { i8*, i32 } cleanup unreachable lpad340.body: ; preds = %land.end344 - %tmp1189 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1189 = landingpad { i8*, i32 } cleanup unreachable lpad360: ; preds = %invoke.cont345 - %tmp1191 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1191 = landingpad { i8*, i32 } cleanup br label %eh.resume lpad363: ; preds = %invoke.cont373, %invoke.cont361 - %tmp1192 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1192 = landingpad { i8*, i32 } cleanup unreachable lpad369: ; preds = %invoke.cont364 - %tmp1194 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1194 = landingpad { i8*, i32 } cleanup unreachable lpad381: ; preds = %invoke.cont466, %invoke.cont458, %invoke.cont449, %invoke.cont.i2106, %invoke.cont432, %invoke.cont422, %invoke.cont418, %invoke.cont408, %invoke.cont405, %invoke.cont395, %invoke.cont392, %invoke.cont382, %invoke.cont376 - %tmp1196 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1196 = landingpad { i8*, i32 } cleanup br label %ehcleanup477 lpad398: ; preds = %invoke.cont396 - %tmp1199 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1199 = landingpad { i8*, i32 } cleanup unreachable lpad401: ; preds = %invoke.cont399 - %tmp1200 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1200 = landingpad { i8*, i32 } cleanup unreachable lpad411: ; preds = %invoke.cont409 - %tmp1201 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1201 = landingpad { i8*, i32 } cleanup unreachable lpad425: ; preds = %invoke.cont423 - %tmp1203 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1203 = landingpad { i8*, i32 } cleanup br label %ehcleanup477 lpad428: ; preds = %invoke.cont426 - %tmp1204 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1204 = landingpad { i8*, i32 } cleanup unreachable lpad454: ; preds = %invoke.cont452 - %tmp1207 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1207 = landingpad { i8*, i32 } cleanup unreachable @@ -1851,47 +1851,47 @@ unreachable lpad489: ; preds = %invoke.cont546, %invoke.cont540, %invoke.cont528, %invoke.cont509, %invoke.cont499, %invoke.cont475 - %tmp1211 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1211 = landingpad { i8*, i32 } cleanup br label %ehcleanup560 lpad498: ; preds = %invoke.cont490 - %tmp1214 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1214 = landingpad { i8*, i32 } cleanup unreachable lpad505: ; preds = %invoke.cont503 - %tmp1215 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1215 = landingpad { i8*, i32 } cleanup unreachable lpad508: ; preds = %invoke.cont506 - %tmp1216 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1216 = landingpad { i8*, i32 } cleanup unreachable lpad514: ; preds = %msgSend.call - %tmp1217 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1217 = landingpad { i8*, i32 } cleanup unreachable lpad527: ; preds = %invoke.cont521 - %tmp1219 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1219 = landingpad { i8*, i32 } cleanup br label %ehcleanup560 lpad533: ; preds = %invoke.cont531 - %tmp1220 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1220 = landingpad { i8*, i32 } cleanup unreachable lpad545: ; preds = %invoke.cont543 - %tmp1222 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1222 = landingpad { i8*, i32 } cleanup unreachable lpad553: ; preds = %invoke.cont548 - %tmp1224 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1224 = landingpad { i8*, i32 } cleanup unreachable @@ -1899,17 +1899,17 @@ br label %eh.resume lpad565: ; preds = %invoke.cont.i2148 - %tmp1225 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1225 = landingpad { i8*, i32 } cleanup unreachable lpad571: ; preds = %invoke.cont566 - %tmp1227 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1227 = landingpad { i8*, i32 } cleanup unreachable lpad580: ; preds = %invoke.cont572 - %tmp1228 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp1228 = landingpad { i8*, i32 } cleanup br label %eh.resume @@ -1919,7 +1919,7 @@ @"OBJC_EHTYPE_$_NSException" = external global i8 -define void @test4() { +define void @test4() personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) { entry: br i1 undef, label %if.end13, label %if.then10 @@ -2173,7 +2173,7 @@ br label %if.end439 lpad: ; preds = %if.end399 - %2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) + %2 = landingpad { i8*, i32 } catch i8* @"OBJC_EHTYPE_$_NSException" unreachable Index: test/Transforms/ObjCARC/retain-not-declared.ll =================================================================== --- test/Transforms/ObjCARC/retain-not-declared.ll +++ test/Transforms/ObjCARC/retain-not-declared.ll @@ -34,7 +34,7 @@ ; CHECK: @objc_release( ; CHECK: @objc_release( ; CHECK: } -define void @test1(i8* %call88) nounwind { +define void @test1(i8* %call88) nounwind personality i32 (...)* @__gxx_personality_v0 { entry: %tmp1 = call i8* @objc_retainAutoreleasedReturnValue(i8* %call88) nounwind %call94 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*)*)(i8* %tmp1) @@ -51,12 +51,12 @@ unreachable lpad91: ; preds = %entry - %exn91 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn91 = landingpad {i8*, i32} cleanup unreachable lpad100: ; preds = %invoke.cont93 - %exn100 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn100 = landingpad {i8*, i32} cleanup call void @objc_release(i8* %tmp2) nounwind, !clang.imprecise_release !0 unreachable Index: test/Transforms/ObjCARC/split-backedge.ll =================================================================== --- test/Transforms/ObjCARC/split-backedge.ll +++ test/Transforms/ObjCARC/split-backedge.ll @@ -10,7 +10,7 @@ ; CHECK: call void @objc_release(i8* %call) [[NUW]] ; CHECK: call void @objc_release(i8* %call) [[NUW]] ; CHECK: call void @objc_release(i8* %cond) [[NUW]] -define void @test0() { +define void @test0() personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) { entry: br label %while.body @@ -34,7 +34,7 @@ br label %while.body lpad: ; preds = %invoke.cont, %while.body - %t4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) + %t4 = landingpad { i8*, i32 } catch i8* null ret void } Index: test/Transforms/PhaseOrdering/gdce.ll =================================================================== --- test/Transforms/PhaseOrdering/gdce.ll +++ test/Transforms/PhaseOrdering/gdce.ll @@ -67,7 +67,7 @@ ret void } -define linkonce_odr void @_ZN4BaseD0Ev(%class.Base* %this) unnamed_addr uwtable ssp align 2 { +define linkonce_odr void @_ZN4BaseD0Ev(%class.Base* %this) unnamed_addr uwtable ssp align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: %this.addr = alloca %class.Base*, align 8 %exn.slot = alloca i8* @@ -83,7 +83,7 @@ ret void lpad: ; preds = %entry - %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %1 = landingpad { i8*, i32 } cleanup %2 = extractvalue { i8*, i32 } %1, 0 store i8* %2, i8** %exn.slot Index: test/Transforms/PlaceSafepoints/invokes.ll =================================================================== --- test/Transforms/PlaceSafepoints/invokes.ll +++ test/Transforms/PlaceSafepoints/invokes.ll @@ -3,7 +3,7 @@ declare i64 addrspace(1)* @"some_call"(i64 addrspace(1)*) declare i32 @"personality_function"() -define i64 addrspace(1)* @test_basic(i64 addrspace(1)* %obj, i64 addrspace(1)* %obj1) gc "statepoint-example" { +define i64 addrspace(1)* @test_basic(i64 addrspace(1)* %obj, i64 addrspace(1)* %obj1) gc "statepoint-example" personality i32 ()* @"personality_function" { ; CHECK-LABEL: entry: entry: ; CHECK: invoke @@ -24,12 +24,12 @@ ; CHECK: ret i64 exceptional_return: - %landing_pad4 = landingpad {i8*, i32} personality i32 ()* @"personality_function" + %landing_pad4 = landingpad {i8*, i32} cleanup ret i64 addrspace(1)* %obj1 } -define i64 addrspace(1)* @test_two_invokes(i64 addrspace(1)* %obj, i64 addrspace(1)* %obj1) gc "statepoint-example" { +define i64 addrspace(1)* @test_two_invokes(i64 addrspace(1)* %obj, i64 addrspace(1)* %obj1) gc "statepoint-example" personality i32 ()* @"personality_function" { ; CHECK-LABEL: entry: entry: ; CHECK: invoke @@ -56,12 +56,12 @@ ; CHECK: ret i64 exceptional_return: - %landing_pad4 = landingpad {i8*, i32} personality i32 ()* @"personality_function" + %landing_pad4 = landingpad {i8*, i32} cleanup ret i64 addrspace(1)* %obj1 } -define i64 addrspace(1)* @test_phi_node(i1 %cond, i64 addrspace(1)* %obj) gc "statepoint-example" { +define i64 addrspace(1)* @test_phi_node(i1 %cond, i64 addrspace(1)* %obj) gc "statepoint-example" personality i32 ()* @"personality_function" { ; CHECK-LABEL: @test_phi_node ; CHECK-LABEL: entry: entry: @@ -94,7 +94,7 @@ ; CHECK: ret i64 addrspace(1)* exceptional_return: - %landing_pad4 = landingpad {i8*, i32} personality i32 ()* @"personality_function" + %landing_pad4 = landingpad {i8*, i32} cleanup ret i64 addrspace(1)* %obj } @@ -108,4 +108,4 @@ entry: call void @do_safepoint() ret void -} \ No newline at end of file +} Index: test/Transforms/PlaceSafepoints/patchable-statepoints.ll =================================================================== --- test/Transforms/PlaceSafepoints/patchable-statepoints.ll +++ test/Transforms/PlaceSafepoints/patchable-statepoints.ll @@ -3,7 +3,7 @@ declare void @f() declare i32 @personality_function() -define void @test_id() gc "statepoint-example" { +define void @test_id() gc "statepoint-example" personality i32 ()* @personality_function { ; CHECK-LABEL: @test_id( entry: ; CHECK-LABEL: entry: @@ -14,11 +14,11 @@ ret void exceptional_return: - %landing_pad4 = landingpad {i8*, i32} personality i32 ()* @personality_function cleanup + %landing_pad4 = landingpad {i8*, i32} cleanup ret void } -define void @test_num_patch_bytes() gc "statepoint-example" { +define void @test_num_patch_bytes() gc "statepoint-example" personality i32 ()* @personality_function { ; CHECK-LABEL: @test_num_patch_bytes( entry: ; CHECK-LABEL: entry: @@ -29,7 +29,7 @@ ret void exceptional_return: - %landing_pad4 = landingpad {i8*, i32} personality i32 ()* @personality_function cleanup + %landing_pad4 = landingpad {i8*, i32} cleanup ret void } Index: test/Transforms/PlaceSafepoints/statepoint-calling-conventions.ll =================================================================== --- test/Transforms/PlaceSafepoints/statepoint-calling-conventions.ll +++ test/Transforms/PlaceSafepoints/statepoint-calling-conventions.ll @@ -3,7 +3,7 @@ ; Ensure that the gc.statepoint calls / invokes we generate carry over ; the right calling conventions. -define i64 addrspace(1)* @test_invoke_format(i64 addrspace(1)* %obj, i64 addrspace(1)* %obj1) gc "statepoint-example" { +define i64 addrspace(1)* @test_invoke_format(i64 addrspace(1)* %obj, i64 addrspace(1)* %obj1) gc "statepoint-example" personality i32 ()* @personality { ; CHECK-LABEL: @test_invoke_format( ; CHECK-LABEL: entry: ; CHECK: invoke coldcc i32 (i64, i32, i64 addrspace(1)* (i64 addrspace(1)*)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_p1i64p1i64f(i64 2882400000, i32 0, i64 addrspace(1)* (i64 addrspace(1)*)* @callee, i32 1, i32 0, i64 addrspace(1)* %obj, i32 0, i32 0) @@ -15,7 +15,7 @@ ret i64 addrspace(1)* %ret_val exceptional_return: - %landing_pad4 = landingpad {i8*, i32} personality i32 ()* @personality + %landing_pad4 = landingpad {i8*, i32} cleanup ret i64 addrspace(1)* %obj1 } Index: test/Transforms/PlaceSafepoints/statepoint-format.ll =================================================================== --- test/Transforms/PlaceSafepoints/statepoint-format.ll +++ test/Transforms/PlaceSafepoints/statepoint-format.ll @@ -3,7 +3,7 @@ ; Ensure that the gc.statepoint calls / invokes we generate have the ; set of arguments we expect it to have. -define i64 addrspace(1)* @test_invoke_format(i64 addrspace(1)* %obj, i64 addrspace(1)* %obj1) gc "statepoint-example" { +define i64 addrspace(1)* @test_invoke_format(i64 addrspace(1)* %obj, i64 addrspace(1)* %obj1) gc "statepoint-example" personality i32 ()* @personality { ; CHECK-LABEL: @test_invoke_format( ; CHECK-LABEL: entry: ; CHECK: invoke i32 (i64, i32, i64 addrspace(1)* (i64 addrspace(1)*)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_p1i64p1i64f(i64 2882400000, i32 0, i64 addrspace(1)* (i64 addrspace(1)*)* @callee, i32 1, i32 0, i64 addrspace(1)* %obj, i32 0, i32 0) @@ -15,7 +15,7 @@ ret i64 addrspace(1)* %ret_val exceptional_return: - %landing_pad4 = landingpad {i8*, i32} personality i32 ()* @personality + %landing_pad4 = landingpad {i8*, i32} cleanup ret i64 addrspace(1)* %obj1 } Index: test/Transforms/PruneEH/recursivetest.ll =================================================================== --- test/Transforms/PruneEH/recursivetest.ll +++ test/Transforms/PruneEH/recursivetest.ll @@ -1,23 +1,23 @@ ; RUN: opt < %s -prune-eh -S | not grep invoke -define internal i32 @foo() { +define internal i32 @foo() personality i32 (...)* @__gxx_personality_v0 { invoke i32 @foo( ) to label %Normal unwind label %Except ; <i32>:1 [#uses=0] Normal: ; preds = %0 ret i32 12 Except: ; preds = %0 - landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + landingpad { i8*, i32 } catch i8* null ret i32 123 } -define i32 @caller() { +define i32 @caller() personality i32 (...)* @__gxx_personality_v0 { invoke i32 @foo( ) to label %Normal unwind label %Except ; <i32>:1 [#uses=0] Normal: ; preds = %0 ret i32 0 Except: ; preds = %0 - landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + landingpad { i8*, i32 } catch i8* null ret i32 1 } Index: test/Transforms/PruneEH/seh-nounwind.ll =================================================================== --- test/Transforms/PruneEH/seh-nounwind.ll +++ test/Transforms/PruneEH/seh-nounwind.ll @@ -10,13 +10,13 @@ ret i32 %div } -define i32 @main() nounwind { +define i32 @main() nounwind personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) { entry: %call = invoke i32 @div(i32 10, i32 0) to label %__try.cont unwind label %lpad lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) + %0 = landingpad { i8*, i32 } catch i8* null br label %__try.cont Index: test/Transforms/PruneEH/simpletest.ll =================================================================== --- test/Transforms/PruneEH/simpletest.ll +++ test/Transforms/PruneEH/simpletest.ll @@ -7,7 +7,7 @@ ret void } -define i32 @caller() { +define i32 @caller() personality i32 (...)* @__gxx_personality_v0 { invoke void @foo( ) to label %Normal unwind label %Except @@ -15,7 +15,7 @@ ret i32 0 Except: ; preds = %0 - landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + landingpad { i8*, i32 } catch i8* null ret i32 1 } Index: test/Transforms/Reg2Mem/crash.ll =================================================================== --- test/Transforms/Reg2Mem/crash.ll +++ test/Transforms/Reg2Mem/crash.ll @@ -13,13 +13,13 @@ declare void @_Z12xxxdtsP10xxxpq() -define hidden void @_ZN12xxxyzIi9xxxwLi29ELi0EE4f3NewES0_i() ssp align 2 { +define hidden void @_ZN12xxxyzIi9xxxwLi29ELi0EE4f3NewES0_i() ssp align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) { bb: invoke void @f4_() to label %bb1 unwind label %.thread .thread: ; preds = %bb - %tmp = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp = landingpad { i8*, i32 } cleanup br label %bb13 @@ -32,13 +32,13 @@ to label %bb6 unwind label %bb2 bb2: ; preds = %.noexc - %tmp3 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp3 = landingpad { i8*, i32 } cleanup invoke void @f3() to label %.body unwind label %bb4 bb4: ; preds = %bb2 - %tmp5 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp5 = landingpad { i8*, i32 } catch i8* null unreachable @@ -54,13 +54,13 @@ ret void bb8: ; preds = %_ZN6xxxdIN12xxxyzIi9xxxwLi29ELi0EE4fr1jS3_.exit - %tmp9 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp9 = landingpad { i8*, i32 } cleanup br label %_ZN10xxxpqdlev.exit bb10: ; preds = %bb6, %bb1 %.1 = phi i1 [ true, %bb1 ], [ false, %bb6 ] - %tmp11 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp11 = landingpad { i8*, i32 } cleanup br label %.body @@ -80,7 +80,7 @@ resume { i8*, i32 } undef bb14: ; preds = %bb13, %.body - %tmp15 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) + %tmp15 = landingpad { i8*, i32 } catch i8* null unreachable } Index: test/Transforms/RewriteStatepointsForGC/live-vector.ll =================================================================== --- test/Transforms/RewriteStatepointsForGC/live-vector.ll +++ test/Transforms/RewriteStatepointsForGC/live-vector.ll @@ -55,7 +55,7 @@ declare i32 @fake_personality_function() ; When a statepoint is an invoke rather than a call -define <2 x i64 addrspace(1)*> @test4(<2 x i64 addrspace(1)*>* %ptr) gc "statepoint-example" { +define <2 x i64 addrspace(1)*> @test4(<2 x i64 addrspace(1)*>* %ptr) gc "statepoint-example" personality i32 ()* @fake_personality_function { ; CHECK-LABEL: test4 ; CHECK: load ; CHECK-NEXT: extractelement @@ -86,7 +86,7 @@ ; CHECK-NEXT: insertelement ; CHECK-NEXT: ret <2 x i64 addrspace(1)*> %14 exceptional_return: ; preds = %entry - %landing_pad4 = landingpad { i8*, i32 } personality i32 ()* @fake_personality_function + %landing_pad4 = landingpad { i8*, i32 } cleanup ret <2 x i64 addrspace(1)*> %obj } Index: test/Transforms/RewriteStatepointsForGC/preprocess.ll =================================================================== --- test/Transforms/RewriteStatepointsForGC/preprocess.ll +++ test/Transforms/RewriteStatepointsForGC/preprocess.ll @@ -40,7 +40,7 @@ ; Need to delete unreachable gc.statepoint invoke - tested seperately given ; a correct implementation could only remove the instructions, not the block -define void @test8() gc "statepoint-example" { +define void @test8() gc "statepoint-example" personality i32 ()* undef { ; CHECK-LABEL: test8 ; CHECK-NOT: gc.statepoint ret void @@ -53,7 +53,7 @@ ret void exceptional_return: ; preds = %entry - %landing_pad4 = landingpad { i8*, i32 } personality i32 ()* undef + %landing_pad4 = landingpad { i8*, i32 } cleanup ret void } Index: test/Transforms/RewriteStatepointsForGC/relocate_invoke_result.ll =================================================================== --- test/Transforms/RewriteStatepointsForGC/relocate_invoke_result.ll +++ test/Transforms/RewriteStatepointsForGC/relocate_invoke_result.ll @@ -10,13 +10,13 @@ declare i32* @fake_personality_function() ; Function Attrs: nounwind -define i64* addrspace(1)* @test() gc "statepoint-example" { +define i64* addrspace(1)* @test() gc "statepoint-example" personality i32* ()* @fake_personality_function { entry: %obj = invoke i64* addrspace(1)* @non_gc_call() to label %normal_dest unwind label %unwind_dest unwind_dest: - %lpad = landingpad { i8*, i32 } personality i32* ()* @fake_personality_function + %lpad = landingpad { i8*, i32 } cleanup resume { i8*, i32 } undef Index: test/Transforms/RewriteStatepointsForGC/rematerialize-derived-pointers.ll =================================================================== --- test/Transforms/RewriteStatepointsForGC/rematerialize-derived-pointers.ll +++ test/Transforms/RewriteStatepointsForGC/rematerialize-derived-pointers.ll @@ -137,7 +137,7 @@ declare i32 @fake_personality_function() -define void @"test_invoke"(i32 addrspace(1)* %base) gc "statepoint-example" { +define void @"test_invoke"(i32 addrspace(1)* %base) gc "statepoint-example" personality i32 ()* @fake_personality_function { ; CHECK-LABEL: test_invoke entry: %ptr.gep = getelementptr i32, i32 addrspace(1)* %base, i32 15 @@ -163,7 +163,7 @@ exception: ; CHECK-LABEL: exception: - %landing_pad4 = landingpad { i8*, i32 } personality i32 ()* @fake_personality_function + %landing_pad4 = landingpad { i8*, i32 } cleanup ; CHECK: gc.relocate ; CHECK: bitcast Index: test/Transforms/SCCP/2003-08-26-InvokeHandling.ll =================================================================== --- test/Transforms/SCCP/2003-08-26-InvokeHandling.ll +++ test/Transforms/SCCP/2003-08-26-InvokeHandling.ll @@ -3,7 +3,7 @@ declare void @foo() -define i32 @test(i1 %cond) { +define i32 @test(i1 %cond) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { Entry: br i1 %cond, label %Inv, label %Cont Inv: ; preds = %Entry @@ -12,7 +12,7 @@ Ok: ; preds = %Inv br label %Cont LPad: - %val = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %val = landingpad { i8*, i32 } catch i8* null br label %Cont Cont: ; preds = %Ok, %Inv, %Entry Index: test/Transforms/SCCP/2004-11-16-DeadInvoke.ll =================================================================== --- test/Transforms/SCCP/2004-11-16-DeadInvoke.ll +++ test/Transforms/SCCP/2004-11-16-DeadInvoke.ll @@ -2,13 +2,13 @@ declare i32 @foo() -define void @caller() { +define void @caller() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { br i1 true, label %T, label %F F: ; preds = %0 %X = invoke i32 @foo( ) to label %T unwind label %LP ; <i32> [#uses=0] LP: - %val = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %val = landingpad { i8*, i32 } catch i8* null br label %T T: Index: test/Transforms/SCCP/2007-05-16-InvokeCrash.ll =================================================================== --- test/Transforms/SCCP/2007-05-16-InvokeCrash.ll +++ test/Transforms/SCCP/2007-05-16-InvokeCrash.ll @@ -1,7 +1,7 @@ ; RUN: opt < %s -sccp -disable-output ; PR1431 -define void @_ada_bench() { +define void @_ada_bench() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: br label %cond_next cond_next: ; preds = %cond_next, %entry @@ -31,7 +31,7 @@ bb177: ; preds = %bb149 unreachable cleanup: ; preds = %bb149, %bb114, %bb67 - %val = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %val = landingpad { i8*, i32 } cleanup resume { i8*, i32 } %val } Index: test/Transforms/SCCP/2009-01-14-IPSCCP-Invoke.ll =================================================================== --- test/Transforms/SCCP/2009-01-14-IPSCCP-Invoke.ll +++ test/Transforms/SCCP/2009-01-14-IPSCCP-Invoke.ll @@ -2,12 +2,12 @@ ; RUN: opt < %s -ipsccp -S | grep "ret i32 undef" ; PR3325 -define i32 @main() { +define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { %tmp1 = invoke i32 @f() to label %UnifiedReturnBlock unwind label %lpad lpad: - %val = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %val = landingpad { i8*, i32 } cleanup unreachable Index: test/Transforms/SCCP/ipsccp-basic.ll =================================================================== --- test/Transforms/SCCP/ipsccp-basic.ll +++ test/Transforms/SCCP/ipsccp-basic.ll @@ -82,7 +82,7 @@ ret {i64,i64} %b } -define i64 @test4b() { +define i64 @test4b() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { %a = invoke {i64,i64} @test4a() to label %A unwind label %B A: @@ -90,7 +90,7 @@ %c = call i64 @test4c(i64 %b) ret i64 %c B: - %val = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %val = landingpad { i8*, i32 } catch i8* null ret i64 0 } @@ -116,14 +116,14 @@ ret {i64,i64} %b } -define i64 @test5b() { +define i64 @test5b() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { %a = invoke {i64,i64} @test5a() to label %A unwind label %B A: %c = call i64 @test5c({i64,i64} %a) ret i64 %c B: - %val = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %val = landingpad { i8*, i32 } catch i8* null ret i64 0 } Index: test/Transforms/SLPVectorizer/X86/ordering.ll =================================================================== --- test/Transforms/SLPVectorizer/X86/ordering.ll +++ test/Transforms/SLPVectorizer/X86/ordering.ll @@ -21,7 +21,7 @@ declare i8* @objc_msgSend(i8*, i8*, ...) declare i32 @personality_v0(...) -define void @invoketest() { +define void @invoketest() personality i8* bitcast (i32 (...)* @personality_v0 to i8*) { entry: br i1 undef, label %cond.true, label %cond.false @@ -67,7 +67,7 @@ br label %if.end98 lpad: - %l = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @personality_v0 to i8*) + %l = landingpad { i8*, i32 } cleanup resume { i8*, i32 } %l Index: test/Transforms/SLPVectorizer/X86/phi_landingpad.ll =================================================================== --- test/Transforms/SLPVectorizer/X86/phi_landingpad.ll +++ test/Transforms/SLPVectorizer/X86/phi_landingpad.ll @@ -2,7 +2,8 @@ target datalayout = "f64:64:64-v64:64:64" -define void @test_phi_in_landingpad() { +define void @test_phi_in_landingpad() personality i8* + bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @foo() to label %inner unwind label %lpad @@ -16,8 +17,7 @@ lpad: %x1 = phi double [ undef, %entry ], [ undef, %inner ] %y1 = phi double [ undef, %entry ], [ undef, %inner ] - landingpad { i8*, i32 } personality i8* - bitcast (i32 (...)* @__gxx_personality_v0 to i8*) catch i8* null + landingpad { i8*, i32 } catch i8* null br label %done done: Index: test/Transforms/ScalarRepl/2011-09-22-PHISpeculateInvoke.ll =================================================================== --- test/Transforms/ScalarRepl/2011-09-22-PHISpeculateInvoke.ll +++ test/Transforms/ScalarRepl/2011-09-22-PHISpeculateInvoke.ll @@ -10,7 +10,7 @@ declare i32 @extern_fn2(i32) declare i32 @__gcc_personality_v0(i32, i64, i8*, i8*) -define void @odd_fn(i1) noinline { +define void @odd_fn(i1) noinline personality i32 (i32, i64, i8*, i8*)* @__gcc_personality_v0 { %retptr1 = alloca i32 %retptr2 = alloca i32 br i1 %0, label %then, label %else @@ -30,7 +30,7 @@ ret void unwind: ; preds = %then - %info = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__gcc_personality_v0 + %info = landingpad { i8*, i32 } cleanup call void @extern_fn(i32* null) unreachable Index: test/Transforms/SimplifyCFG/2003-08-05-InvokeCrash.ll =================================================================== --- test/Transforms/SimplifyCFG/2003-08-05-InvokeCrash.ll +++ test/Transforms/SimplifyCFG/2003-08-05-InvokeCrash.ll @@ -2,13 +2,13 @@ ; ; RUN: opt < %s -simplifycfg -disable-output -define i32 @test() { +define i32 @test() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { %A = invoke i32 @test( ) to label %Ret unwind label %Ret2 ; <i32> [#uses=1] Ret: ; preds = %0 ret i32 %A Ret2: ; preds = %0 - %val = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %val = landingpad { i8*, i32 } catch i8* null ret i32 undef } Index: test/Transforms/SimplifyCFG/2005-10-02-InvokeSimplify.ll =================================================================== --- test/Transforms/SimplifyCFG/2005-10-02-InvokeSimplify.ll +++ test/Transforms/SimplifyCFG/2005-10-02-InvokeSimplify.ll @@ -1,10 +1,10 @@ ; RUN: opt < %s -simplifycfg -disable-output -define i1 @foo() { +define i1 @foo() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { %X = invoke i1 @foo( ) to label %N unwind label %F ; <i1> [#uses=1] F: ; preds = %0 - %val = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %val = landingpad { i8*, i32 } catch i8* null ret i1 false N: ; preds = %0 Index: test/Transforms/SimplifyCFG/2007-11-22-InvokeNoUnwind.ll =================================================================== --- test/Transforms/SimplifyCFG/2007-11-22-InvokeNoUnwind.ll +++ test/Transforms/SimplifyCFG/2007-11-22-InvokeNoUnwind.ll @@ -4,7 +4,7 @@ declare i32 @func(i8*) nounwind -define i32 @test() { +define i32 @test() personality i32 (...)* @__gxx_personality_v0 { invoke i32 @func( i8* null ) to label %Cont unwind label %Other ; <i32>:1 [#uses=0] @@ -12,7 +12,7 @@ ret i32 0 Other: ; preds = %0 - landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + landingpad { i8*, i32 } catch i8* null ret i32 1 } Index: test/Transforms/SimplifyCFG/2010-03-30-InvokeCrash.ll =================================================================== --- test/Transforms/SimplifyCFG/2010-03-30-InvokeCrash.ll +++ test/Transforms/SimplifyCFG/2010-03-30-InvokeCrash.ll @@ -5,7 +5,7 @@ declare void @bar(i32) -define void @foo() { +define void @foo() personality i32 (...)* @__gxx_personality_v0 { entry: invoke void @bar(i32 undef) to label %r unwind label %u @@ -14,7 +14,7 @@ ret void u: ; preds = %entry - %val = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + %val = landingpad { i8*, i32 } cleanup resume { i8*, i32 } %val } Index: test/Transforms/SimplifyCFG/2011-09-05-TrivialLPad.ll =================================================================== --- test/Transforms/SimplifyCFG/2011-09-05-TrivialLPad.ll +++ test/Transforms/SimplifyCFG/2011-09-05-TrivialLPad.ll @@ -5,7 +5,7 @@ declare void @bar() -define i32 @foo() { +define i32 @foo() personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0 { entry: invoke void @bar() to label %return unwind label %lpad @@ -14,7 +14,7 @@ ret i32 0 lpad: - %lp = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0 + %lp = landingpad { i8*, i32 } cleanup resume { i8*, i32 } %lp } Index: test/Transforms/SimplifyCFG/UnreachableEliminate.ll =================================================================== --- test/Transforms/SimplifyCFG/UnreachableEliminate.ll +++ test/Transforms/SimplifyCFG/UnreachableEliminate.ll @@ -13,7 +13,7 @@ ret void } -define void @test2() { +define void @test2() personality i32 (...)* @__gxx_personality_v0 { ; CHECK-LABEL: @test2( ; CHECK: entry: ; CHECK-NEXT: call void @test2() @@ -22,7 +22,7 @@ invoke void @test2( ) to label %N unwind label %U U: - %res = landingpad { i8* } personality i32 (...)* @__gxx_personality_v0 + %res = landingpad { i8* } cleanup unreachable N: Index: test/Transforms/SimplifyCFG/duplicate-landingpad.ll =================================================================== --- test/Transforms/SimplifyCFG/duplicate-landingpad.ll +++ test/Transforms/SimplifyCFG/duplicate-landingpad.ll @@ -6,7 +6,7 @@ ; CHECK-LABEL: @test1 -define void @test1() { +define void @test1() personality i32 (...)* @__gxx_personality_v0 { entry: ; CHECK-LABEL: entry: ; CHECK: to label %invoke2 unwind label %lpad2 @@ -23,17 +23,17 @@ ret void lpad1: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup br label %shared_resume lpad2: ; CHECK-LABEL: lpad2: -; CHECK: landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 +; CHECK: landingpad { i8*, i32 } ; CHECK-NEXT: cleanup ; CHECK-NEXT: call void @fn() ; CHECK-NEXT: ret void - %exn2 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn2 = landingpad {i8*, i32} cleanup br label %shared_resume @@ -43,7 +43,7 @@ } ; Don't trigger if blocks aren't the same/empty -define void @neg1() { +define void @neg1() personality i32 (...)* @__gxx_personality_v0 { ; CHECK-LABEL: @neg1 entry: ; CHECK-LABEL: entry: @@ -61,13 +61,13 @@ ret void lpad1: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} filter [0 x i8*] zeroinitializer call void @fn() br label %shared_resume lpad2: - %exn2 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn2 = landingpad {i8*, i32} cleanup br label %shared_resume @@ -77,7 +77,7 @@ } ; Should not trigger when the landing pads are not the exact same -define void @neg2() { +define void @neg2() personality i32 (...)* @__gxx_personality_v0 { ; CHECK-LABEL: @neg2 entry: ; CHECK-LABEL: entry: @@ -95,12 +95,12 @@ ret void lpad1: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} filter [0 x i8*] zeroinitializer br label %shared_resume lpad2: - %exn2 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn2 = landingpad {i8*, i32} cleanup br label %shared_resume Index: test/Transforms/SimplifyCFG/invoke.ll =================================================================== --- test/Transforms/SimplifyCFG/invoke.ll +++ test/Transforms/SimplifyCFG/invoke.ll @@ -10,7 +10,7 @@ ; CHECK-LABEL: @f1( -define i8* @f1() nounwind uwtable ssp { +define i8* @f1() nounwind uwtable ssp personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: ; CHECK: call void @llvm.trap() ; CHECK: unreachable @@ -21,7 +21,7 @@ ret i8* %call lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } filter [0 x i8*] zeroinitializer %1 = extractvalue { i8*, i32 } %0, 0 tail call void @__cxa_call_unexpected(i8* %1) noreturn nounwind @@ -29,7 +29,7 @@ } ; CHECK-LABEL: @f2( -define i8* @f2() nounwind uwtable ssp { +define i8* @f2() nounwind uwtable ssp personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: ; CHECK: call void @llvm.trap() ; CHECK: unreachable @@ -40,7 +40,7 @@ ret i8* %call lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } filter [0 x i8*] zeroinitializer %1 = extractvalue { i8*, i32 } %0, 0 tail call void @__cxa_call_unexpected(i8* %1) noreturn nounwind @@ -48,7 +48,7 @@ } ; CHECK-LABEL: @f3( -define i32 @f3() nounwind uwtable ssp { +define i32 @f3() nounwind uwtable ssp personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { ; CHECK-NEXT: entry entry: ; CHECK-NEXT: ret i32 3 @@ -59,7 +59,7 @@ ret i32 3 lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } filter [0 x i8*] zeroinitializer %1 = extractvalue { i8*, i32 } %0, 0 tail call void @__cxa_call_unexpected(i8* %1) noreturn nounwind @@ -67,7 +67,7 @@ } ; CHECK-LABEL: @f4( -define i32 @f4() nounwind uwtable ssp { +define i32 @f4() nounwind uwtable ssp personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { ; CHECK-NEXT: entry entry: ; CHECK-NEXT: call i32 @read_only() @@ -79,7 +79,7 @@ ret i32 %call lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } filter [0 x i8*] zeroinitializer %1 = extractvalue { i8*, i32 } %0, 0 tail call void @__cxa_call_unexpected(i8* %1) noreturn nounwind @@ -87,7 +87,7 @@ } ; CHECK-LABEL: @f5( -define i32 @f5(i1 %cond, i8* %a, i8* %b) { +define i32 @f5(i1 %cond, i8* %a, i8* %b) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: br i1 %cond, label %x, label %y @@ -110,7 +110,7 @@ lpad: ; CHECK-NOT: phi %phi2 = phi i8* [%a, %x], [%b, %y] - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } filter [0 x i8*] zeroinitializer ; CHECK: __cxa_call_unexpected(i8* %a) tail call void @__cxa_call_unexpected(i8* %phi2) noreturn nounwind @@ -118,7 +118,7 @@ } ; CHECK-LABEL: @f6( -define void @f6() { +define void @f6() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @purefn() to label %invoke.cont1 unwind label %lpad @@ -133,7 +133,7 @@ lpad: ; CHECK-NOT: phi %tmp = phi i8* [ null, %invoke.cont1 ], [ null, %entry ] - landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + landingpad { i8*, i32 } cleanup ret void } Index: test/Transforms/SimplifyCFG/invoke_unwind.ll =================================================================== --- test/Transforms/SimplifyCFG/invoke_unwind.ll +++ test/Transforms/SimplifyCFG/invoke_unwind.ll @@ -4,7 +4,7 @@ ; This testcase checks to see if the simplifycfg pass is converting invoke ; instructions to call instructions if the handler just rethrows the exception. -define i32 @test1() { +define i32 @test1() personality i32 (...)* @__gxx_personality_v0 { ; CHECK-LABEL: @test1( ; CHECK-NEXT: call void @bar() ; CHECK-NEXT: ret i32 0 @@ -12,7 +12,7 @@ to label %1 unwind label %Rethrow ret i32 0 Rethrow: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} catch i8* null resume { i8*, i32 } %exn } Index: test/Transforms/SimplifyCFG/seh-nounwind.ll =================================================================== --- test/Transforms/SimplifyCFG/seh-nounwind.ll +++ test/Transforms/SimplifyCFG/seh-nounwind.ll @@ -10,13 +10,13 @@ ret i32 %div } -define i32 @main() nounwind { +define i32 @main() nounwind personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) { entry: %call = invoke i32 @div(i32 10, i32 0) to label %__try.cont unwind label %lpad lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) + %0 = landingpad { i8*, i32 } catch i8* null br label %__try.cont Index: test/Transforms/SimplifyCFG/statepoint-invoke-unwind.ll =================================================================== --- test/Transforms/SimplifyCFG/statepoint-invoke-unwind.ll +++ test/Transforms/SimplifyCFG/statepoint-invoke-unwind.ll @@ -6,7 +6,7 @@ declare i32 @llvm.experimental.gc.statepoint.p0f_p1i64f(i64, i32, i64 addrspace(1)* ()*, i32, i32, ...) declare i32* @fake_personality_function() -define i32 @test() gc "statepoint-example" { +define i32 @test() gc "statepoint-example" personality i32* ()* @fake_personality_function { ; CHECK-LABEL: test entry: ; CHECK-LABEL: entry: @@ -15,7 +15,7 @@ to label %normal unwind label %exception exception: - %lpad = landingpad { i8*, i32 } personality i32* ()* @fake_personality_function + %lpad = landingpad { i8*, i32 } cleanup ret i32 0 Index: test/Verifier/dominates.ll =================================================================== --- test/Verifier/dominates.ll +++ test/Verifier/dominates.ll @@ -10,14 +10,14 @@ } declare i32 @g() -define void @f2(i32 %x) { +define void @f2(i32 %x) personality i32 ()* @g { bb0: %y1 = invoke i32 @g() to label %bb1 unwind label %bb2 bb1: ret void bb2: %y2 = phi i32 [%y1, %bb0] - %y3 = landingpad i32 personality i32 ()* @g + %y3 = landingpad i32 cleanup ret void ; CHECK: Instruction does not dominate all uses! @@ -26,13 +26,13 @@ ; CHECK-NEXT: %y2 = phi i32 [ %y1, %bb0 ] } -define void @f3(i32 %x) { +define void @f3(i32 %x) personality i32 ()* @g { bb0: %y1 = invoke i32 @g() to label %bb1 unwind label %bb2 bb1: ret void bb2: - %y2 = landingpad i32 personality i32 ()* @g + %y2 = landingpad i32 cleanup br label %bb3 bb3: Index: test/Verifier/invoke.ll =================================================================== --- test/Verifier/invoke.ll +++ test/Verifier/invoke.ll @@ -29,7 +29,7 @@ declare i8 @llvm.expect.i8(i8,i8) declare i32 @fn(i8 (i8, i8)*) -define void @f1() { +define void @f1() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: ; OK invoke void @llvm.donothing() @@ -39,12 +39,12 @@ ret void contb: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } filter [0 x i8*] zeroinitializer ret void } -define i8 @f2() { +define i8 @f2() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: ; CHECK: Cannot invoke an intrinsinc other than donothing or patchpoint invoke void @llvm.trap() @@ -54,7 +54,7 @@ ret i8 3 lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } filter [0 x i8*] zeroinitializer ret i8 2 } @@ -66,14 +66,14 @@ ret i32 %call } -define void @f4() { +define void @f4() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: invoke void @llvm.donothing() to label %cont unwind label %cont cont: ; CHECK: Block containing LandingPadInst must be jumped to only by the unwind edge of an invoke. - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %0 = landingpad { i8*, i32 } filter [0 x i8*] zeroinitializer ret void } Index: test/Verifier/range-2.ll =================================================================== --- test/Verifier/range-2.ll +++ test/Verifier/range-2.ll @@ -47,7 +47,7 @@ } ; We can annotate the range of the return value of an INVOKE. -define void @invoke_all(i8* %x) { +define void @invoke_all(i8* %x) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { entry: %v1 = invoke i8 @f1(i8* %x) to label %cont unwind label %lpad, !range !0 %v2 = invoke i8 @f2(i8* %x) to label %cont unwind label %lpad, !range !1 @@ -59,7 +59,7 @@ ret void lpad: - %4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + %4 = landingpad { i8*, i32 } filter [0 x i8*] zeroinitializer ret void } Index: test/Verifier/statepoint.ll =================================================================== --- test/Verifier/statepoint.ll +++ test/Verifier/statepoint.ll @@ -52,7 +52,7 @@ } ; Basic test for invoke statepoints -define i8 addrspace(1)* @test3(i8 addrspace(1)* %obj, i8 addrspace(1)* %obj1) gc "statepoint-example" { +define i8 addrspace(1)* @test3(i8 addrspace(1)* %obj, i8 addrspace(1)* %obj1) gc "statepoint-example" personality i32 ()* @"personality_function" { ; CHECK-LABEL: test3 entry: ; CHECK-LABEL: entry @@ -73,7 +73,7 @@ ; CHECK-LABEL: exceptional_return ; CHECK: gc.relocate ; CHECK: gc.relocate - %landing_pad = landingpad { i8*, i32 } personality i32 ()* @"personality_function" + %landing_pad = landingpad { i8*, i32 } cleanup %relocate_token = extractvalue { i8*, i32 } %landing_pad, 1 %obj.relocated1 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(i32 %relocate_token, i32 12, i32 12) Index: tools/verify-uselistorder/verify-uselistorder.cpp =================================================================== --- tools/verify-uselistorder/verify-uselistorder.cpp +++ tools/verify-uselistorder/verify-uselistorder.cpp @@ -205,6 +205,8 @@ map(F.getPrefixData()); if (F.hasPrologueData()) map(F.getPrologueData()); + if (F.hasPersonalityFn()) + map(F.getPersonalityFn()); } // Function bodies. @@ -474,6 +476,8 @@ changeValueUseList(F.getPrefixData()); if (F.hasPrologueData()) changeValueUseList(F.getPrologueData()); + if (F.hasPersonalityFn()) + changeValueUseList(F.getPersonalityFn()); } // Function bodies. Index: unittests/IR/DominatorTreeTest.cpp =================================================================== --- unittests/IR/DominatorTreeTest.cpp +++ unittests/IR/DominatorTreeTest.cpp @@ -217,7 +217,7 @@ std::unique_ptr<Module> makeLLVMModule(DPass *P) { const char *ModuleStrig = "declare i32 @g()\n" \ - "define void @f(i32 %x) {\n" \ + "define void @f(i32 %x) personality i32 ()* @g {\n" \ "bb0:\n" \ " %y1 = add i32 %x, 1\n" \ " %y2 = add i32 %x, 1\n" \ @@ -226,7 +226,7 @@ " %y4 = add i32 %x, 1\n" \ " br label %bb4\n" \ "bb2:\n" \ - " %y5 = landingpad i32 personality i32 ()* @g\n" \ + " %y5 = landingpad i32\n" \ " cleanup\n" \ " br label %bb4\n" \ "bb3:\n" \ Index: unittests/IR/IRBuilderTest.cpp =================================================================== --- unittests/IR/IRBuilderTest.cpp +++ unittests/IR/IRBuilderTest.cpp @@ -104,8 +104,7 @@ TEST_F(IRBuilderTest, LandingPadName) { IRBuilder<> Builder(BB); - LandingPadInst *LP = Builder.CreateLandingPad(Builder.getInt32Ty(), - Builder.getInt32(0), 0, "LP"); + LandingPadInst *LP = Builder.CreateLandingPad(Builder.getInt32Ty(), 0, "LP"); EXPECT_EQ(LP->getName(), "LP"); }