summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/BitCodeFormat.rst4
-rw-r--r--docs/LangRef.rst35
-rw-r--r--include/llvm/Analysis/LibCallSemantics.h2
-rw-r--r--include/llvm/Bitcode/LLVMBitCodes.h3
-rw-r--r--include/llvm/IR/Function.h19
-rw-r--r--include/llvm/IR/IRBuilder.h4
-rw-r--r--include/llvm/IR/Instructions.h33
-rw-r--r--include/llvm/IR/User.h13
-rw-r--r--lib/Analysis/LibCallSemantics.cpp5
-rw-r--r--lib/AsmParser/LLParser.cpp15
-rw-r--r--lib/Bitcode/Reader/BitcodeReader.cpp47
-rw-r--r--lib/Bitcode/Writer/BitcodeWriter.cpp5
-rw-r--r--lib/Bitcode/Writer/ValueEnumerator.cpp10
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp4
-rw-r--r--lib/CodeGen/DwarfEHPrepare.cpp17
-rw-r--r--lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp10
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp6
-rw-r--r--lib/CodeGen/ShadowStackGCLowering.cpp10
-rw-r--r--lib/CodeGen/SjLjEHPrepare.cpp2
-rw-r--r--lib/CodeGen/WinEHPrepare.cpp17
-rw-r--r--lib/IR/AsmWriter.cpp12
-rw-r--r--lib/IR/Core.cpp7
-rw-r--r--lib/IR/Function.cpp32
-rw-r--r--lib/IR/Instructions.cpp38
-rw-r--r--lib/IR/TypeFinder.cpp3
-rw-r--r--lib/IR/Verifier.cpp25
-rw-r--r--lib/Linker/LinkModules.cpp5
-rw-r--r--lib/Target/X86/X86WinEHState.cpp10
-rw-r--r--lib/Transforms/IPO/GlobalDCE.cpp3
-rw-r--r--lib/Transforms/IPO/PruneEH.cpp2
-rw-r--r--lib/Transforms/InstCombine/InstructionCombining.cpp10
-rw-r--r--lib/Transforms/Utils/InlineFunction.cpp38
-rw-r--r--lib/Transforms/Utils/Local.cpp7
-rw-r--r--test/Analysis/CallGraph/do-nothing-intrinsic.ll4
-rw-r--r--test/Analysis/Dominators/invoke.ll4
-rw-r--r--test/Analysis/LazyCallGraph/basic.ll4
-rw-r--r--test/Analysis/Lint/cppeh-catch-intrinsics-clean.ll10
-rw-r--r--test/Analysis/Lint/cppeh-catch-intrinsics.ll26
-rw-r--r--test/Assembler/invalid-landingpad.ll4
-rw-r--r--test/Bitcode/miscInstructions.3.2.ll12
-rw-r--r--test/CodeGen/AArch64/arm64-big-endian-eh.ll8
-rw-r--r--test/CodeGen/AArch64/br-to-eh-lpad.ll6
-rw-r--r--test/CodeGen/AArch64/pic-eh-stubs.ll4
-rw-r--r--test/CodeGen/ARM/2009-08-31-LSDA-Name.ll4
-rw-r--r--test/CodeGen/ARM/2010-07-26-GlobalMerge.ll4
-rw-r--r--test/CodeGen/ARM/2010-08-04-EHCrash.ll4
-rw-r--r--test/CodeGen/ARM/2011-05-04-MultipleLandingPadSuccs.ll10
-rw-r--r--test/CodeGen/ARM/2011-12-19-sjlj-clobber.ll4
-rw-r--r--test/CodeGen/ARM/2012-04-24-SplitEHCriticalEdge.ll8
-rw-r--r--test/CodeGen/ARM/2014-05-14-DwarfEHCrash.ll4
-rw-r--r--test/CodeGen/ARM/arm-ttype-target2.ll4
-rw-r--r--test/CodeGen/ARM/big-endian-eh-unwind.ll8
-rw-r--r--test/CodeGen/ARM/crash.ll4
-rw-r--r--test/CodeGen/ARM/debug-frame-no-debug.ll5
-rw-r--r--test/CodeGen/ARM/debug-frame.ll5
-rw-r--r--test/CodeGen/ARM/dwarf-eh.ll4
-rw-r--r--test/CodeGen/ARM/eh-dispcont.ll4
-rw-r--r--test/CodeGen/ARM/eh-resume-darwin.ll4
-rw-r--r--test/CodeGen/ARM/ehabi-filters.ll6
-rw-r--r--test/CodeGen/ARM/ehabi-handlerdata-nounwind.ll4
-rw-r--r--test/CodeGen/ARM/ehabi-handlerdata.ll4
-rw-r--r--test/CodeGen/ARM/ehabi.ll5
-rw-r--r--test/CodeGen/ARM/global-merge.ll4
-rw-r--r--test/CodeGen/ARM/gv-stubs-crash.ll4
-rw-r--r--test/CodeGen/ARM/invoke-donothing-assert.ll10
-rw-r--r--test/CodeGen/ARM/sjlj-prepare-critical-edge.ll18
-rw-r--r--test/CodeGen/ARM/sjljehprepare-lower-empty-struct.ll4
-rw-r--r--test/CodeGen/Generic/2007-02-25-invoke.ll4
-rw-r--r--test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll4
-rw-r--r--test/CodeGen/Generic/2007-12-17-InvokeAsm.ll4
-rw-r--r--test/CodeGen/Generic/2007-12-31-UnusedSelector.ll6
-rw-r--r--test/CodeGen/Generic/2009-11-16-BadKillsCrash.ll6
-rw-r--r--test/CodeGen/Generic/donothing.ll4
-rw-r--r--test/CodeGen/Generic/exception-handling.ll4
-rw-r--r--test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll4
-rw-r--r--test/CodeGen/Mips/eh.ll4
-rw-r--r--test/CodeGen/Mips/ehframe-indirect.ll5
-rw-r--r--test/CodeGen/Mips/insn-zero-size-bb.ll4
-rw-r--r--test/CodeGen/Mips/mips16ex.ll6
-rw-r--r--test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll4
-rw-r--r--test/CodeGen/PowerPC/extra-toc-reg-deps.ll32
-rw-r--r--test/CodeGen/PowerPC/fast-isel-icmp-split.ll4
-rw-r--r--test/CodeGen/PowerPC/glob-comp-aa-crash.ll6
-rw-r--r--test/CodeGen/PowerPC/pr18663-2.ll14
-rw-r--r--test/CodeGen/PowerPC/preincprep-invoke.ll4
-rw-r--r--test/CodeGen/SPARC/exception.ll4
-rw-r--r--test/CodeGen/Thumb/sjljehprepare-lower-vector.ll4
-rw-r--r--test/CodeGen/Thumb2/constant-islands.ll46
-rw-r--r--test/CodeGen/WinEH/cppeh-alloca-sink.ll10
-rw-r--r--test/CodeGen/WinEH/cppeh-catch-all.ll6
-rw-r--r--test/CodeGen/WinEH/cppeh-catch-and-throw.ll8
-rw-r--r--test/CodeGen/WinEH/cppeh-catch-scalar.ll6
-rw-r--r--test/CodeGen/WinEH/cppeh-catch-unwind.ll20
-rw-r--r--test/CodeGen/WinEH/cppeh-cleanup-invoke.ll6
-rw-r--r--test/CodeGen/WinEH/cppeh-demote-liveout.ll4
-rw-r--r--test/CodeGen/WinEH/cppeh-frame-vars.ll6
-rw-r--r--test/CodeGen/WinEH/cppeh-inalloca.ll6
-rw-r--r--test/CodeGen/WinEH/cppeh-min-unwind.ll6
-rw-r--r--test/CodeGen/WinEH/cppeh-mixed-catch-and-cleanup.ll4
-rw-r--r--test/CodeGen/WinEH/cppeh-multi-catch.ll8
-rw-r--r--test/CodeGen/WinEH/cppeh-nested-1.ll10
-rw-r--r--test/CodeGen/WinEH/cppeh-nested-2.ll18
-rw-r--r--test/CodeGen/WinEH/cppeh-nested-3.ll14
-rw-r--r--test/CodeGen/WinEH/cppeh-nested-rethrow.ll12
-rw-r--r--test/CodeGen/WinEH/cppeh-nonalloca-frame-values.ll6
-rw-r--r--test/CodeGen/WinEH/cppeh-prepared-catch-all.ll4
-rw-r--r--test/CodeGen/WinEH/cppeh-prepared-catch-reordered.ll8
-rw-r--r--test/CodeGen/WinEH/cppeh-prepared-catch.ll14
-rw-r--r--test/CodeGen/WinEH/cppeh-prepared-cleanups.ll18
-rw-r--r--test/CodeGen/WinEH/cppeh-shared-empty-catch.ll8
-rw-r--r--test/CodeGen/WinEH/cppeh-similar-catch-blocks.ll24
-rw-r--r--test/CodeGen/WinEH/cppeh-state-calc-1.ll24
-rw-r--r--test/CodeGen/WinEH/seh-catch-all.ll4
-rw-r--r--test/CodeGen/WinEH/seh-inlined-finally.ll8
-rw-r--r--test/CodeGen/WinEH/seh-outlined-finally.ll6
-rw-r--r--test/CodeGen/WinEH/seh-prepared-basic.ll4
-rw-r--r--test/CodeGen/WinEH/seh-resume-phi.ll6
-rw-r--r--test/CodeGen/WinEH/seh-simple.ll20
-rw-r--r--test/CodeGen/X86/2007-05-05-Personality.ll4
-rw-r--r--test/CodeGen/X86/2008-04-17-CoalescerBug.ll6
-rw-r--r--test/CodeGen/X86/2008-05-28-LocalRegAllocBug.ll4
-rw-r--r--test/CodeGen/X86/2009-03-13-PHIElimBug.ll4
-rw-r--r--test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll4
-rw-r--r--test/CodeGen/X86/2009-09-10-LoadFoldingBug.ll4
-rw-r--r--test/CodeGen/X86/2009-11-25-ImpDefBug.ll4
-rw-r--r--test/CodeGen/X86/2010-04-06-SSEDomainFixCrash.ll4
-rw-r--r--test/CodeGen/X86/2010-04-30-LocalAlloc-LandingPad.ll8
-rw-r--r--test/CodeGen/X86/2010-08-04-MingWCrash.ll4
-rw-r--r--test/CodeGen/X86/2012-01-10-UndefExceptionEdge.ll4
-rw-r--r--test/CodeGen/X86/2012-05-19-CoalescerCrash.ll16
-rw-r--r--test/CodeGen/X86/2012-11-30-misched-dbg.ll4
-rw-r--r--test/CodeGen/X86/asm-label2.ll4
-rw-r--r--test/CodeGen/X86/block-placement.ll8
-rw-r--r--test/CodeGen/X86/branchfolding-landingpads.ll6
-rw-r--r--test/CodeGen/X86/catch.ll4
-rw-r--r--test/CodeGen/X86/cfi.ll4
-rw-r--r--test/CodeGen/X86/code_placement_eh.ll6
-rw-r--r--test/CodeGen/X86/dwarf-eh-prepare.ll24
-rw-r--r--test/CodeGen/X86/eh-label.ll4
-rw-r--r--test/CodeGen/X86/exception-label.ll4
-rw-r--r--test/CodeGen/X86/fast-isel-cmp-branch.ll4
-rw-r--r--test/CodeGen/X86/fast-isel-gep.ll4
-rw-r--r--test/CodeGen/X86/gcc_except_table.ll4
-rw-r--r--test/CodeGen/X86/gcc_except_table_functions.ll4
-rw-r--r--test/CodeGen/X86/global-sections.ll4
-rw-r--r--test/CodeGen/X86/inalloca-invoke.ll4
-rw-r--r--test/CodeGen/X86/indirect-hidden.ll8
-rw-r--r--test/CodeGen/X86/large-gep-chain.ll10
-rw-r--r--test/CodeGen/X86/patchpoint-invoke.ll4
-rw-r--r--test/CodeGen/X86/personality.ll6
-rw-r--r--test/CodeGen/X86/personality_size.ll4
-rw-r--r--test/CodeGen/X86/pr3522.ll4
-rw-r--r--test/CodeGen/X86/scev-interchange.ll44
-rw-r--r--test/CodeGen/X86/seh-catch-all-win32.ll4
-rw-r--r--test/CodeGen/X86/seh-catch-all.ll4
-rw-r--r--test/CodeGen/X86/seh-except-finally.ll6
-rw-r--r--test/CodeGen/X86/seh-filter.ll4
-rw-r--r--test/CodeGen/X86/seh-finally.ll6
-rw-r--r--test/CodeGen/X86/seh-safe-div-win32.ll4
-rw-r--r--test/CodeGen/X86/seh-safe-div.ll4
-rw-r--r--test/CodeGen/X86/setjmp-spills.ll4
-rw-r--r--test/CodeGen/X86/split-eh-lpad-edges.ll4
-rw-r--r--test/CodeGen/X86/stack-protector.ll32
-rw-r--r--test/CodeGen/X86/statepoint-invoke.ll22
-rw-r--r--test/CodeGen/X86/statepoint-stack-usage.ll6
-rw-r--r--test/CodeGen/X86/win32-eh-states.ll6
-rw-r--r--test/CodeGen/X86/win32-eh.ll12
-rw-r--r--test/CodeGen/X86/win64_call_epi.ll4
-rw-r--r--test/CodeGen/X86/win64_eh.ll4
-rw-r--r--test/CodeGen/X86/win_eh_prepare.ll8
-rw-r--r--test/CodeGen/XCore/exception.ll4
-rw-r--r--test/DebugInfo/AArch64/eh_frame_personality.ll4
-rw-r--r--test/DebugInfo/AArch64/frameindices.ll4
-rw-r--r--test/DebugInfo/SystemZ/eh_frame_personality.ll4
-rw-r--r--test/DebugInfo/X86/arange-and-stub.ll4
-rw-r--r--test/DebugInfo/X86/sret.ll10
-rw-r--r--test/DebugInfo/inline-debug-info-multiret.ll4
-rw-r--r--test/DebugInfo/inline-debug-info.ll4
-rw-r--r--test/ExecutionEngine/MCJIT/Inputs/multi-module-eh-b.ll4
-rw-r--r--test/ExecutionEngine/MCJIT/eh-lg-pic.ll4
-rw-r--r--test/ExecutionEngine/MCJIT/eh-sm-pic.ll4
-rw-r--r--test/ExecutionEngine/MCJIT/eh.ll4
-rw-r--r--test/ExecutionEngine/MCJIT/multi-module-eh-a.ll4
-rw-r--r--test/ExecutionEngine/OrcMCJIT/Inputs/multi-module-eh-b.ll4
-rw-r--r--test/ExecutionEngine/OrcMCJIT/eh-lg-pic.ll4
-rw-r--r--test/ExecutionEngine/OrcMCJIT/eh-sm-pic.ll4
-rw-r--r--test/ExecutionEngine/OrcMCJIT/eh.ll4
-rw-r--r--test/ExecutionEngine/OrcMCJIT/multi-module-eh-a.ll4
-rw-r--r--test/Feature/callingconventions.ll8
-rw-r--r--test/Feature/calltest.ll4
-rw-r--r--test/Feature/exception.ll4
-rw-r--r--test/Feature/seh-nounwind.ll4
-rw-r--r--test/Instrumentation/AddressSanitizer/instrument-no-return.ll4
-rw-r--r--test/LTO/X86/linkonce_odr_func.ll4
-rw-r--r--test/Other/2008-10-15-MissingSpace.ll4
-rw-r--r--test/Other/2009-03-31-CallGraph.ll6
-rw-r--r--test/Transforms/ADCE/2003-09-10-UnwindInstFail.ll4
-rw-r--r--test/Transforms/ADCE/2005-02-17-PHI-Invoke-Crash.ll8
-rw-r--r--test/Transforms/ADCE/dce_pure_invoke.ll4
-rw-r--r--test/Transforms/ArgumentPromotion/crash.ll4
-rw-r--r--test/Transforms/BDCE/dce-pure.ll4
-rw-r--r--test/Transforms/BDCE/order.ll4
-rw-r--r--test/Transforms/CodeExtractor/2004-03-18-InvokeHandling.ll4
-rw-r--r--test/Transforms/CodeExtractor/2004-11-12-InvokeExtract.ll4
-rw-r--r--test/Transforms/DeadArgElim/2009-03-17-MRE-Invoke.ll8
-rw-r--r--test/Transforms/FunctionAttrs/nocapture.ll4
-rw-r--r--test/Transforms/GVN/2010-05-08-OneBit.ll4
-rw-r--r--test/Transforms/GVN/2011-09-07-TypeIdFor.ll4
-rw-r--r--test/Transforms/GVN/cond_br2.ll4
-rw-r--r--test/Transforms/GlobalOpt/cleanup-pointer-root-users.ll4
-rw-r--r--test/Transforms/GlobalOpt/invoke.ll4
-rw-r--r--test/Transforms/IPConstantProp/return-argument.ll4
-rw-r--r--test/Transforms/IPConstantProp/return-constant.ll4
-rw-r--r--test/Transforms/IndVarSimplify/2004-04-05-InvokeCastCrash.ll8
-rw-r--r--test/Transforms/IndVarSimplify/2005-02-11-InvokeCrash.ll4
-rw-r--r--test/Transforms/IndVarSimplify/2005-02-17-TruncateExprCrash.ll6
-rw-r--r--test/Transforms/IndVarSimplify/crash.ll6
-rw-r--r--test/Transforms/IndVarSimplify/interesting-invoke-use.ll4
-rw-r--r--test/Transforms/Inline/2003-09-14-InlineValue.ll4
-rw-r--r--test/Transforms/Inline/2003-09-22-PHINodeInlineFail.ll4
-rw-r--r--test/Transforms/Inline/2003-09-22-PHINodesInExceptionDest.ll4
-rw-r--r--test/Transforms/Inline/2003-09-22-PHINodesInNormalInvokeDest.ll4
-rw-r--r--test/Transforms/Inline/2006-11-09-InlineCGUpdate-2.ll12
-rw-r--r--test/Transforms/Inline/2006-11-09-InlineCGUpdate.ll8
-rw-r--r--test/Transforms/Inline/2007-04-15-InlineEH.ll4
-rw-r--r--test/Transforms/Inline/callgraph-update.ll4
-rw-r--r--test/Transforms/Inline/crash.ll12
-rw-r--r--test/Transforms/Inline/debug-invoke.ll4
-rw-r--r--test/Transforms/Inline/inline-invoke-tail.ll4
-rw-r--r--test/Transforms/Inline/inline-invoke-with-asm-call.ll4
-rw-r--r--test/Transforms/Inline/inline_invoke.ll46
-rw-r--r--test/Transforms/Inline/inline_returns_twice.ll8
-rw-r--r--test/Transforms/Inline/invoke-cleanup.ll8
-rw-r--r--test/Transforms/Inline/invoke-combine-clauses.ll24
-rw-r--r--test/Transforms/Inline/invoke-cost.ll4
-rw-r--r--test/Transforms/Inline/invoke_test-1.ll4
-rw-r--r--test/Transforms/Inline/invoke_test-2.ll8
-rw-r--r--test/Transforms/Inline/invoke_test-3.ll8
-rw-r--r--test/Transforms/InstCombine/2003-10-29-CallSiteResolve.ll4
-rw-r--r--test/Transforms/InstCombine/2004-01-13-InstCombineInvokePHI.ll4
-rw-r--r--test/Transforms/InstCombine/2008-05-09-SinkOfInvoke.ll4
-rw-r--r--test/Transforms/InstCombine/AddOverFlow.ll8
-rw-r--r--test/Transforms/InstCombine/LandingPadClauses.ll50
-rw-r--r--test/Transforms/InstCombine/call.ll4
-rw-r--r--test/Transforms/InstCombine/cast.ll4
-rw-r--r--test/Transforms/InstCombine/crash.ll18
-rw-r--r--test/Transforms/InstCombine/gepphigep.ll6
-rw-r--r--test/Transforms/InstCombine/invoke.ll12
-rw-r--r--test/Transforms/InstCombine/malloc-free-delete.ll4
-rw-r--r--test/Transforms/InstCombine/objsize-64.ll4
-rw-r--r--test/Transforms/InstSimplify/2011-09-05-InsertExtractValue.ll4
-rw-r--r--test/Transforms/JumpThreading/landing-pad.ll8
-rw-r--r--test/Transforms/LCSSA/invoke-dest.ll8
-rw-r--r--test/Transforms/LoopRotate/multiple-exits.ll8
-rw-r--r--test/Transforms/LoopSimplify/2007-10-28-InvokeCrash.ll4
-rw-r--r--test/Transforms/LoopSimplify/2011-12-14-LandingpadHeader.ll6
-rw-r--r--test/Transforms/LoopSimplify/dbg-loc.ll6
-rw-r--r--test/Transforms/LoopStrengthReduce/dominate-assert.ll14
-rw-r--r--test/Transforms/LoopUnswitch/2011-09-26-EHCrash.ll4
-rw-r--r--test/Transforms/LoopUnswitch/2012-04-30-LoopUnswitch-LPad-Crash.ll4
-rw-r--r--test/Transforms/LowerInvoke/2003-12-10-Crash.ll4
-rw-r--r--test/Transforms/LowerInvoke/lowerinvoke.ll4
-rw-r--r--test/Transforms/Mem2Reg/crash.ll4
-rw-r--r--test/Transforms/MergeFunc/2011-02-08-RemoveEqual.ll8
-rw-r--r--test/Transforms/MergeFunc/call-and-invoke-with-ranges.ll16
-rw-r--r--test/Transforms/ObjCARC/basic.ll4
-rw-r--r--test/Transforms/ObjCARC/contract-testcases.ll6
-rw-r--r--test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll4
-rw-r--r--test/Transforms/ObjCARC/invoke.ll32
-rw-r--r--test/Transforms/ObjCARC/path-overflow.ll172
-rw-r--r--test/Transforms/ObjCARC/retain-not-declared.ll6
-rw-r--r--test/Transforms/ObjCARC/split-backedge.ll4
-rw-r--r--test/Transforms/PhaseOrdering/gdce.ll4
-rw-r--r--test/Transforms/PlaceSafepoints/invokes.ll14
-rw-r--r--test/Transforms/PlaceSafepoints/patchable-statepoints.ll8
-rw-r--r--test/Transforms/PlaceSafepoints/statepoint-calling-conventions.ll4
-rw-r--r--test/Transforms/PlaceSafepoints/statepoint-format.ll4
-rw-r--r--test/Transforms/PruneEH/recursivetest.ll8
-rw-r--r--test/Transforms/PruneEH/seh-nounwind.ll4
-rw-r--r--test/Transforms/PruneEH/simpletest.ll4
-rw-r--r--test/Transforms/Reg2Mem/crash.ll14
-rw-r--r--test/Transforms/RewriteStatepointsForGC/live-vector.ll4
-rw-r--r--test/Transforms/RewriteStatepointsForGC/preprocess.ll4
-rw-r--r--test/Transforms/RewriteStatepointsForGC/relocate_invoke_result.ll4
-rw-r--r--test/Transforms/RewriteStatepointsForGC/rematerialize-derived-pointers.ll4
-rw-r--r--test/Transforms/SCCP/2003-08-26-InvokeHandling.ll4
-rw-r--r--test/Transforms/SCCP/2004-11-16-DeadInvoke.ll4
-rw-r--r--test/Transforms/SCCP/2007-05-16-InvokeCrash.ll4
-rw-r--r--test/Transforms/SCCP/2009-01-14-IPSCCP-Invoke.ll4
-rw-r--r--test/Transforms/SCCP/ipsccp-basic.ll8
-rw-r--r--test/Transforms/SLPVectorizer/X86/ordering.ll4
-rw-r--r--test/Transforms/SLPVectorizer/X86/phi_landingpad.ll6
-rw-r--r--test/Transforms/SafeStack/escape-gep-invoke.ll4
-rw-r--r--test/Transforms/SafeStack/invoke.ll4
-rw-r--r--test/Transforms/ScalarRepl/2011-09-22-PHISpeculateInvoke.ll4
-rw-r--r--test/Transforms/SimplifyCFG/2003-08-05-InvokeCrash.ll4
-rw-r--r--test/Transforms/SimplifyCFG/2005-10-02-InvokeSimplify.ll4
-rw-r--r--test/Transforms/SimplifyCFG/2007-11-22-InvokeNoUnwind.ll4
-rw-r--r--test/Transforms/SimplifyCFG/2010-03-30-InvokeCrash.ll4
-rw-r--r--test/Transforms/SimplifyCFG/2011-09-05-TrivialLPad.ll4
-rw-r--r--test/Transforms/SimplifyCFG/UnreachableEliminate.ll4
-rw-r--r--test/Transforms/SimplifyCFG/duplicate-landingpad.ll20
-rw-r--r--test/Transforms/SimplifyCFG/invoke.ll24
-rw-r--r--test/Transforms/SimplifyCFG/invoke_unwind.ll4
-rw-r--r--test/Transforms/SimplifyCFG/seh-nounwind.ll4
-rw-r--r--test/Transforms/SimplifyCFG/statepoint-invoke-unwind.ll4
-rw-r--r--test/Verifier/dominates.ll8
-rw-r--r--test/Verifier/invoke.ll12
-rw-r--r--test/Verifier/range-2.ll4
-rw-r--r--test/Verifier/statepoint.ll4
-rw-r--r--tools/verify-uselistorder/verify-uselistorder.cpp4
-rw-r--r--unittests/IR/DominatorTreeTest.cpp4
-rw-r--r--unittests/IR/IRBuilderTest.cpp3
313 files changed, 1350 insertions, 1258 deletions
diff --git a/docs/BitCodeFormat.rst b/docs/BitCodeFormat.rst
index 4b398a4e956..25ea421ed08 100644
--- a/docs/BitCodeFormat.rst
+++ b/docs/BitCodeFormat.rst
@@ -741,7 +741,7 @@ global variable. The operand fields are:
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 @@ function. The operand fields are:
* *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
^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/docs/LangRef.rst b/docs/LangRef.rst
index 637973fb17c..1b9df6547d5 100644
--- a/docs/LangRef.rst
+++ b/docs/LangRef.rst
@@ -635,8 +635,9 @@ attributes <paramattrs>`), optional :ref:`function attributes <fnattrs>`,
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
@@ -683,7 +684,8 @@ Syntax::
[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 +1132,14 @@ A function may have prologue data but no body. This has similar semantics
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
@@ -7283,8 +7293,8 @@ Syntax:
::
- <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>
@@ -7296,14 +7306,13 @@ The '``landingpad``' instruction is used by `LLVM's exception handling
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 :ref:`personality function <personalityfn>` 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
@@ -7318,7 +7327,7 @@ Semantics:
""""""""""
The '``landingpad``' instruction defines the values which are set by the
-personality function (``pers_fn``) upon re-entry to the function, and
+:ref:`personality function <personalityfn>` upon re-entry to the function, and
therefore the "result type" of the ``landingpad`` instruction. As with
calling conventions, how the personality function results are
represented in LLVM IR is target specific.
@@ -7341,8 +7350,6 @@ The ``landingpad`` instruction has several restrictions:
pad block.
- A basic block that is not a landing pad block may not include a
'``landingpad``' instruction.
-- All '``landingpad``' instructions in a function must have the same
- personality function.
Example:
""""""""
@@ -7350,13 +7357,13 @@ Example:
.. code-block:: llvm
;; A landing pad which can catch an integer.
- %res = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0
+ %res = landingpad { i8*, i32 }
catch i8** @_ZTIi
;; A landing pad that is a cleanup.
- %res = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0
+ %res = landingpad { i8*, i32 }
cleanup
;; A landing pad which can catch an integer and can only throw a double.
- %res = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0
+ %res = landingpad { i8*, i32 }
catch i8** @_ZTIi
filter [1 x i8**] [@_ZTId]
diff --git a/include/llvm/Analysis/LibCallSemantics.h b/include/llvm/Analysis/LibCallSemantics.h
index 0f0ca304fcc..170e2a49a8e 100644
--- a/include/llvm/Analysis/LibCallSemantics.h
+++ b/include/llvm/Analysis/LibCallSemantics.h
@@ -206,7 +206,7 @@ class InvokeInst;
llvm_unreachable("invalid enum");
}
- bool canSimplifyInvokeNoUnwind(const InvokeInst *II);
+ bool canSimplifyInvokeNoUnwind(const Function *F);
} // end namespace llvm
diff --git a/include/llvm/Bitcode/LLVMBitCodes.h b/include/llvm/Bitcode/LLVMBitCodes.h
index 01dede12da9..3a311aa5877 100644
--- a/include/llvm/Bitcode/LLVMBitCodes.h
+++ b/include/llvm/Bitcode/LLVMBitCodes.h
@@ -342,7 +342,7 @@ namespace bitc {
// 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 @@ namespace bitc {
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 {
diff --git a/include/llvm/IR/Function.h b/include/llvm/IR/Function.h
index 6c228eae633..02ea056de39 100644
--- a/include/llvm/IR/Function.h
+++ b/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 @@ private:
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 @@ ilist_traits<Argument>::getSymTab(Function *F) {
return F ? &F->getValueSymbolTable() : nullptr;
}
+template <>
+struct OperandTraits<Function> : public OptionalOperandTraits<Function> {};
+
+DEFINE_TRANSPARENT_OPERAND_ACCESSORS(Function, Value)
+
} // End llvm namespace
#endif
diff --git a/include/llvm/IR/IRBuilder.h b/include/llvm/IR/IRBuilder.h
index adf692469ad..3f3665a807e 100644
--- a/include/llvm/IR/IRBuilder.h
+++ b/include/llvm/IR/IRBuilder.h
@@ -1556,9 +1556,9 @@ public:
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);
}
//===--------------------------------------------------------------------===//
diff --git a/include/llvm/IR/Instructions.h b/include/llvm/IR/Instructions.h
index 41c3bba19c8..218537d9e00 100644
--- a/include/llvm/IR/Instructions.h
+++ b/include/llvm/IR/Instructions.h
@@ -2437,34 +2437,27 @@ private:
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 @@ public:
/// 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 @@ public:
};
template <>
-struct OperandTraits<LandingPadInst> : public HungoffOperandTraits<2> {
+struct OperandTraits<LandingPadInst> : public HungoffOperandTraits<1> {
};
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(LandingPadInst, Value)
diff --git a/include/llvm/IR/User.h b/include/llvm/IR/User.h
index 14439d3b30e..93614fab575 100644
--- a/include/llvm/IR/User.h
+++ b/include/llvm/IR/User.h
@@ -150,6 +150,19 @@ public:
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.
diff --git a/lib/Analysis/LibCallSemantics.cpp b/lib/Analysis/LibCallSemantics.cpp
index e98540ba7e9..003c81e87b6 100644
--- a/lib/Analysis/LibCallSemantics.cpp
+++ b/lib/Analysis/LibCallSemantics.cpp
@@ -80,9 +80,8 @@ EHPersonality llvm::classifyEHPersonality(const Value *Pers) {
.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.
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp
index 064b74304a9..a121e59e1f1 100644
--- a/lib/AsmParser/LLParser.cpp
+++ b/lib/AsmParser/LLParser.cpp
@@ -4057,7 +4057,7 @@ bool LLParser::ParseTypeAndBasicBlock(BasicBlock *&BB, LocTy &Loc,
/// 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();
@@ -4139,6 +4139,7 @@ bool LLParser::ParseFunctionHeader(Function *&Fn, bool isDefine) {
LocTy UnnamedAddrLoc;
Constant *Prefix = nullptr;
Constant *Prologue = nullptr;
+ Constant *PersonalityFn = nullptr;
Comdat *C;
if (ParseArgumentList(ArgList, isVarArg) ||
@@ -4155,7 +4156,9 @@ bool LLParser::ParseFunctionHeader(Function *&Fn, bool isDefine) {
(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))
@@ -4254,6 +4257,7 @@ bool LLParser::ParseFunctionHeader(Function *&Fn, bool isDefine) {
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);
@@ -5105,14 +5109,11 @@ int LLParser::ParsePHI(Instruction *&Inst, PerFunctionState &PFS) {
/// ::= '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){
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp
index 10e0410c025..ccb9d5dd038 100644
--- a/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -150,6 +150,7 @@ class BitcodeReader : public GVMaterializer {
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;
@@ -2031,11 +2032,13 @@ std::error_code BitcodeReader::resolveGlobalAndAliasInits() {
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;
@@ -2093,6 +2096,19 @@ std::error_code BitcodeReader::resolveGlobalAndAliasInits() {
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();
}
@@ -3023,6 +3039,9 @@ std::error_code BitcodeReader::parseModule(bool Resume,
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
@@ -3976,21 +3995,35 @@ std::error_code BitcodeReader::parseFunctionBody(Function *F) {
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");
+
+ if (!F->hasPersonalityFn())
+ F->setPersonalityFn(cast<Constant>(PersFn));
+ else if (F->getPersonalityFn() != cast<Constant>(PersFn))
+ return error("Personality function mismatch");
+ }
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 =
diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp
index cb8fafd3450..6da329d3b23 100644
--- a/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -695,7 +695,7 @@ static void WriteModuleInfo(const Module *M, const ValueEnumerator &VE,
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());
@@ -712,6 +712,8 @@ static void WriteModuleInfo(const Module *M, const ValueEnumerator &VE,
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);
@@ -1859,7 +1861,6 @@ static void WriteInstruction(const Instruction &I, unsigned InstID,
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) {
diff --git a/lib/Bitcode/Writer/ValueEnumerator.cpp b/lib/Bitcode/Writer/ValueEnumerator.cpp
index 74d4dd89bb4..fbbe93f6877 100644
--- a/lib/Bitcode/Writer/ValueEnumerator.cpp
+++ b/lib/Bitcode/Writer/ValueEnumerator.cpp
@@ -93,6 +93,9 @@ static OrderMap orderModule(const Module &M) {
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 @@ static UseListOrderStack predictUseListOrder(const Module &M) {
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 @@ ValueEnumerator::ValueEnumerator(const Module &M,
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
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 4c194c263b0..3c2f1d9ebcf 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -548,6 +548,10 @@ void AsmPrinter::EmitFunctionHeader() {
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();
diff --git a/lib/CodeGen/DwarfEHPrepare.cpp b/lib/CodeGen/DwarfEHPrepare.cpp
index 42656fb08db..e019dfbc8f7 100644
--- a/lib/CodeGen/DwarfEHPrepare.cpp
+++ b/lib/CodeGen/DwarfEHPrepare.cpp
@@ -181,27 +181,22 @@ size_t DwarfEHPrepare::pruneUnreachableResumes(
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);
diff --git a/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
index e6116245bb4..ecaa2c97271 100644
--- a/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
+++ b/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
@@ -259,8 +259,8 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf,
// 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 @@ void llvm::ComputeUsesVAFloatArgument(const CallInst &I,
/// 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);
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 22f592afae7..ec5a6bfa3dd 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -938,8 +938,10 @@ bool SelectionDAGISel::PrepareEHLandingPad() {
// 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)) {
diff --git a/lib/CodeGen/ShadowStackGCLowering.cpp b/lib/CodeGen/ShadowStackGCLowering.cpp
index 7c0b2bb4569..e7b2a8e72d2 100644
--- a/lib/CodeGen/ShadowStackGCLowering.cpp
+++ b/lib/CodeGen/ShadowStackGCLowering.cpp
@@ -144,10 +144,14 @@ public:
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);
diff --git a/lib/CodeGen/SjLjEHPrepare.cpp b/lib/CodeGen/SjLjEHPrepare.cpp
index 42d277ebed0..116fd5be033 100644
--- a/lib/CodeGen/SjLjEHPrepare.cpp
+++ b/lib/CodeGen/SjLjEHPrepare.cpp
@@ -227,7 +227,7 @@ Value *SjLjEHPrepare::setupFunctionContext(Function &F,
// 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(
diff --git a/lib/CodeGen/WinEHPrepare.cpp b/lib/CodeGen/WinEHPrepare.cpp
index 6bdc9c95d61..7934a4d9da2 100644
--- a/lib/CodeGen/WinEHPrepare.cpp
+++ b/lib/CodeGen/WinEHPrepare.cpp
@@ -111,7 +111,7 @@ private:
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 @@ bool WinEHPrepare::runOnFunction(Function &Fn) {
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 @@ static bool isCatchBlock(BasicBlock *BB) {
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 @@ static BasicBlock *createStubLandingPad(Function *Handler,
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 @@ static BasicBlock *createStubLandingPad(Function *Handler,
// 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 @@ void WinEHPrepare::addStubInvokeToHandlerIfNeeded(Function *Handler,
// 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 @@ bool WinEHPrepare::outlineHandler(ActionHandler *Action, Function *SrcFn,
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 @@ bool WinEHPrepare::outlineHandler(ActionHandler *Action, Function *SrcFn,
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 =
diff --git a/lib/IR/AsmWriter.cpp b/lib/IR/AsmWriter.cpp
index 05f7e08555f..23393ccd5c0 100644
--- a/lib/IR/AsmWriter.cpp
+++ b/lib/IR/AsmWriter.cpp
@@ -109,6 +109,10 @@ static OrderMap orderModule(const Module *M) {
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())
@@ -2540,6 +2544,10 @@ void AssemblyWriter::printFunction(const Function *F) {
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);
@@ -2782,8 +2790,8 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
} 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";
diff --git a/lib/IR/Core.cpp b/lib/IR/Core.cpp
index d476434542e..23e923d4112 100644
--- a/lib/IR/Core.cpp
+++ b/lib/IR/Core.cpp
@@ -2249,11 +2249,8 @@ LLVMValueRef LLVMBuildInvoke(LLVMBuilderRef B, LLVMValueRef Fn,
}
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) {
diff --git a/lib/IR/Function.cpp b/lib/IR/Function.cpp
index 2b439bb46bf..bc57dee0af0 100644
--- a/lib/IR/Function.cpp
+++ b/lib/IR/Function.cpp
@@ -248,8 +248,8 @@ void Function::eraseFromParent() {
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 @@ Function::~Function() {
// 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 @@ void Function::dropAllReferences() {
// Metadata is stored in a side-table.
clearMetadata();
+
+ setPersonalityFn(nullptr);
}
void Function::addAttribute(unsigned i, Attribute::AttrKind attr) {
@@ -426,6 +431,10 @@ void Function::copyAttributesFrom(const GlobalValue *Src) {
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 @@ Optional<uint64_t> Function::getEntryCount() const {
}
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);
+ }
+}
diff --git a/lib/IR/Instructions.cpp b/lib/IR/Instructions.cpp
index 0e2fe391aa6..d45b5110536 100644
--- a/lib/IR/Instructions.cpp
+++ b/lib/IR/Instructions.cpp
@@ -153,18 +153,16 @@ Value *PHINode::hasConstantValue() const {
// 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(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(NumReservedValues, NameStr);
}
LandingPadInst::LandingPadInst(const LandingPadInst &LP)
@@ -180,28 +178,22 @@ LandingPadInst::LandingPadInst(const LandingPadInst &LP)
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::init(Value *PersFn, unsigned NumReservedValues,
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);
}
diff --git a/lib/IR/TypeFinder.cpp b/lib/IR/TypeFinder.cpp
index 1d2b808d650..7accc5bef53 100644
--- a/lib/IR/TypeFinder.cpp
+++ b/lib/IR/TypeFinder.cpp
@@ -50,6 +50,9 @@ void TypeFinder::run(const Module &M, bool onlyNamed) {
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)
diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp
index 13b451a06b2..51d1cdbb117 100644
--- a/lib/IR/Verifier.cpp
+++ b/lib/IR/Verifier.cpp
@@ -181,11 +181,6 @@ class Verifier : public InstVisitor<Verifier>, VerifierSupport {
/// \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 @@ class Verifier : public InstVisitor<Verifier>, VerifierSupport {
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 @@ public:
// FIXME: We strip const here because the inst visitor strips const.
visit(const_cast<Function &>(F));
InstsInThisBlock.clear();
- PersonalityFn = nullptr;
SawFrameEscape = false;
return !Broken;
@@ -1757,6 +1750,8 @@ void Verifier::visitFunction(const Function &F) {
"invalid linkage type for function declaration", &F);
Assert(MDs.empty(), "function without a body cannot have metadata", &F,
MDs.empty() ? nullptr : MDs.front().second);
+ Assert(!F.hasPersonalityFn(),
+ "Function declaration shouldn't have a personality routine", &F);
} else {
// Verify that this function (which has a body) is not named "llvm.*". It
// is not legal to define intrinsics.
@@ -2795,22 +2790,16 @@ void Verifier::visitLandingPadInst(LandingPadInst &LPI) {
&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)) {
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index 484a457876b..7ae8c025e33 100644
--- a/lib/Linker/LinkModules.cpp
+++ b/lib/Linker/LinkModules.cpp
@@ -1194,6 +1194,11 @@ bool ModuleLinker::linkFunctionBody(Function &Dst, Function &Src) {
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()) {
diff --git a/lib/Target/X86/X86WinEHState.cpp b/lib/Target/X86/X86WinEHState.cpp
index 356d0a77132..673141105b3 100644
--- a/lib/Target/X86/X86WinEHState.cpp
+++ b/lib/Target/X86/X86WinEHState.cpp
@@ -146,16 +146,10 @@ bool WinEHStatePass::runOnFunction(Function &F) {
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);
diff --git a/lib/Transforms/IPO/GlobalDCE.cpp b/lib/Transforms/IPO/GlobalDCE.cpp
index ba04c80508c..61d0ff94a34 100644
--- a/lib/Transforms/IPO/GlobalDCE.cpp
+++ b/lib/Transforms/IPO/GlobalDCE.cpp
@@ -228,6 +228,9 @@ void GlobalDCE::GlobalIsNeeded(GlobalValue *G) {
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)
diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp
index 1943b930cbf..ade31d05525 100644
--- a/lib/Transforms/IPO/PruneEH.cpp
+++ b/lib/Transforms/IPO/PruneEH.cpp
@@ -177,7 +177,7 @@ bool PruneEH::SimplifyFunction(Function *F) {
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);
diff --git a/lib/Transforms/InstCombine/InstructionCombining.cpp b/lib/Transforms/InstCombine/InstructionCombining.cpp
index 9d602c6a9e2..d690a795e00 100644
--- a/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -2353,7 +2353,8 @@ Instruction *InstCombiner::visitLandingPadInst(LandingPadInst &LI) {
// 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 @@ Instruction *InstCombiner::visitLandingPadInst(LandingPadInst &LI) {
// 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 @@ bool InstCombiner::run() {
}
// 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 @@ static bool AddReachableCodeToWorklist(BasicBlock *BB, const DataLayout &DL,
}
// 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');
diff --git a/lib/Transforms/Utils/InlineFunction.cpp b/lib/Transforms/Utils/InlineFunction.cpp
index ddeaff06d3c..d2d60d7cd9f 100644
--- a/lib/Transforms/Utils/InlineFunction.cpp
+++ b/lib/Transforms/Utils/InlineFunction.cpp
@@ -949,35 +949,23 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI,
}
// 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
diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp
index 70c77b06d62..57b4e23f226 100644
--- a/lib/Transforms/Utils/Local.cpp
+++ b/lib/Transforms/Utils/Local.cpp
@@ -1173,10 +1173,11 @@ static void changeToCall(InvokeInst *II) {
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 @@ static bool markAliveBlocks(BasicBlock *BB,
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 @@ static bool markAliveBlocks(BasicBlock *BB,
/// 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())
diff --git a/test/Analysis/CallGraph/do-nothing-intrinsic.ll b/test/Analysis/CallGraph/do-nothing-intrinsic.ll
index f28ad10f57c..54623717083 100644
--- a/test/Analysis/CallGraph/do-nothing-intrinsic.ll
+++ b/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
diff --git a/test/Analysis/Dominators/invoke.ll b/test/Analysis/Dominators/invoke.ll
index ce5f992d8f4..ab0afd4354a 100644
--- a/test/Analysis/Dominators/invoke.ll
+++ b/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 @@ bb1:
%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
}
diff --git a/test/Analysis/LazyCallGraph/basic.ll b/test/Analysis/LazyCallGraph/basic.ll
index 7c13d2bef39..fce453bc15d 100644
--- a/test/Analysis/LazyCallGraph/basic.ll
+++ b/test/Analysis/LazyCallGraph/basic.ll
@@ -63,7 +63,7 @@ entry:
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 @@ exit:
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 }
}
diff --git a/test/Analysis/Lint/cppeh-catch-intrinsics-clean.ll b/test/Analysis/Lint/cppeh-catch-intrinsics-clean.ll
index 8cd44c86a72..743ebace700 100644
--- a/test/Analysis/Lint/cppeh-catch-intrinsics-clean.ll
+++ b/test/Analysis/Lint/cppeh-catch-intrinsics-clean.ll
@@ -12,13 +12,13 @@ declare void @llvm.eh.endcatch()
@_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 @@ eh.resume: ; preds = %catch.dispatch
}
; 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 @@ invoke.cont:
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 @@ lpad: ; preds = %entry
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
diff --git a/test/Analysis/Lint/cppeh-catch-intrinsics.ll b/test/Analysis/Lint/cppeh-catch-intrinsics.ll
index 3a0c487c290..19480a2f60f 100644
--- a/test/Analysis/Lint/cppeh-catch-intrinsics.ll
+++ b/test/Analysis/Lint/cppeh-catch-intrinsics.ll
@@ -13,7 +13,7 @@ declare void @llvm.eh.endcatch()
@_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 @@ entry:
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 @@ eh.resume: ; preds = %catch.dispatch
}
; 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 @@ entry:
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 @@ eh.resume: ; preds = %catch.dispatch
}
; 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 @@ entry:
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 @@ eh.resume: ; preds = %catch.dispatch
}
; 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 @@ entry:
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 @@ try.cont: ; preds = %invoke.cont2, %entr
}
; 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 @@ entry:
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 @@ eh.resume: ; preds = %catch.dispatch
}
; 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 @@ invoke.cont:
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 @@ lpad: ; preds = %entry
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
diff --git a/test/Assembler/invalid-landingpad.ll b/test/Assembler/invalid-landingpad.ll
index c8eab4ac6ae..44bf8db1768 100644
--- a/test/Assembler/invalid-landingpad.ll
+++ b/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
}
diff --git a/test/Bitcode/miscInstructions.3.2.ll b/test/Bitcode/miscInstructions.3.2.ll
index bed26c22147..6b899510726 100644
--- a/test/Bitcode/miscInstructions.3.2.ll
+++ b/test/Bitcode/miscInstructions.3.2.ll
@@ -13,27 +13,33 @@ entry:
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
diff --git a/test/CodeGen/AArch64/arm64-big-endian-eh.ll b/test/CodeGen/AArch64/arm64-big-endian-eh.ll
index a51703a8fc4..77d52e32d3a 100644
--- a/test/CodeGen/AArch64/arm64-big-endian-eh.ll
+++ b/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 @@ try.cont: ; preds = %entry, %invoke.cont
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 @@ eh.resume: ; preds = %lpad1
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
diff --git a/test/CodeGen/AArch64/br-to-eh-lpad.ll b/test/CodeGen/AArch64/br-to-eh-lpad.ll
index f304ba4ca28..2ac9e904333 100644
--- a/test/CodeGen/AArch64/br-to-eh-lpad.ll
+++ b/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 @@ invoke.cont43:
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
diff --git a/test/CodeGen/AArch64/pic-eh-stubs.ll b/test/CodeGen/AArch64/pic-eh-stubs.ll
index f761a87783c..143558f7b2c 100644
--- a/test/CodeGen/AArch64/pic-eh-stubs.ll
+++ b/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
diff --git a/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll b/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll
index 2f6e428351d..d402c16ccac 100644
--- a/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll
+++ b/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 @@ return: ; preds = %invcont
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
diff --git a/test/CodeGen/ARM/2010-07-26-GlobalMerge.ll b/test/CodeGen/ARM/2010-07-26-GlobalMerge.ll
index b02efea929f..a876d998e75 100644
--- a/test/CodeGen/ARM/2010-07-26-GlobalMerge.ll
+++ b/test/CodeGen/ARM/2010-07-26-GlobalMerge.ll
@@ -40,7 +40,7 @@ entry:
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 @@ try.cont: ; preds = %lpad
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
diff --git a/test/CodeGen/ARM/2010-08-04-EHCrash.ll b/test/CodeGen/ARM/2010-08-04-EHCrash.ll
index 13214c52153..69482cc8b35 100644
--- a/test/CodeGen/ARM/2010-08-04-EHCrash.ll
+++ b/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 @@ return: ; preds = %entry
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
diff --git a/test/CodeGen/ARM/2011-05-04-MultipleLandingPadSuccs.ll b/test/CodeGen/ARM/2011-05-04-MultipleLandingPadSuccs.ll
index 2af3e3e6bd4..559b027fb11 100644
--- a/test/CodeGen/ARM/2011-05-04-MultipleLandingPadSuccs.ll
+++ b/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 @@ for.cond.backedge:
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 @@ call8.i.i.i.noexc:
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 @@ eh.resume:
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
diff --git a/test/CodeGen/ARM/2011-12-19-sjlj-clobber.ll b/test/CodeGen/ARM/2011-12-19-sjlj-clobber.ll
index 40d1f628aaa..b00cc51d984 100644
--- a/test/CodeGen/ARM/2011-12-19-sjlj-clobber.ll
+++ b/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 @@ bb14: ; preds = %bb11
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
diff --git a/test/CodeGen/ARM/2012-04-24-SplitEHCriticalEdge.ll b/test/CodeGen/ARM/2012-04-24-SplitEHCriticalEdge.ll
index 69d72bd8339..ce0dcc70952 100644
--- a/test/CodeGen/ARM/2012-04-24-SplitEHCriticalEdge.ll
+++ b/test/CodeGen/ARM/2012-04-24-SplitEHCriticalEdge.ll
@@ -25,13 +25,13 @@ declare void @__cxa_end_catch()
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 @@ try.cont: ; preds = %invoke.cont2, %entr
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 @@ eh.resume: ; preds = %lpad1, %lpad
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
}
diff --git a/test/CodeGen/ARM/2014-05-14-DwarfEHCrash.ll b/test/CodeGen/ARM/2014-05-14-DwarfEHCrash.ll
index 1e40e4afe5c..feae48646cd 100644
--- a/test/CodeGen/ARM/2014-05-14-DwarfEHCrash.ll
+++ b/test/CodeGen/ARM/2014-05-14-DwarfEHCrash.ll
@@ -8,13 +8,13 @@ target triple = "armv4t--linux-androideabi"
@_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
diff --git a/test/CodeGen/ARM/arm-ttype-target2.ll b/test/CodeGen/ARM/arm-ttype-target2.ll
index 754a16d9087..ef19d24d7d4 100644
--- a/test/CodeGen/ARM/arm-ttype-target2.ll
+++ b/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
diff --git a/test/CodeGen/ARM/big-endian-eh-unwind.ll b/test/CodeGen/ARM/big-endian-eh-unwind.ll
index 630dfed4467..7df5f30570e 100644
--- a/test/CodeGen/ARM/big-endian-eh-unwind.ll
+++ b/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 @@ try.cont: ; preds = %entry, %invoke.cont
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 @@ eh.resume: ; preds = %lpad1
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
diff --git a/test/CodeGen/ARM/crash.ll b/test/CodeGen/ARM/crash.ll
index 3b01d8113b9..3b7a897e10c 100644
--- a/test/CodeGen/ARM/crash.ll
+++ b/test/CodeGen/ARM/crash.ll
@@ -74,7 +74,7 @@ bb:
%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 @@ false:
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
diff --git a/test/CodeGen/ARM/debug-frame-no-debug.ll b/test/CodeGen/ARM/debug-frame-no-debug.ll
index 81702c6e749..8a07f261f41 100644
--- a/test/CodeGen/ARM/debug-frame-no-debug.ll
+++ b/test/CodeGen/ARM/debug-frame-no-debug.ll
@@ -34,14 +34,13 @@ declare void @_Z5printddddd(double, double, double, double, double)
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 @@ try.cont:
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 @@ eh.resume:
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)
diff --git a/test/CodeGen/ARM/debug-frame.ll b/test/CodeGen/ARM/debug-frame.ll
index 134829254e3..cc07400c2e1 100644
--- a/test/CodeGen/ARM/debug-frame.ll
+++ b/test/CodeGen/ARM/debug-frame.ll
@@ -73,14 +73,13 @@ declare void @_Z5printddddd(double, double, double, double, double)
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 @@ try.cont:
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 @@ eh.resume:
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)
diff --git a/test/CodeGen/ARM/dwarf-eh.ll b/test/CodeGen/ARM/dwarf-eh.ll
index c890206b353..68f8e95b5e7 100644
--- a/test/CodeGen/ARM/dwarf-eh.ll
+++ b/test/CodeGen/ARM/dwarf-eh.ll
@@ -17,7 +17,7 @@ target triple = "armv5e--netbsd-eabi"
@_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 @@ define void @f() uwtable {
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
diff --git a/test/CodeGen/ARM/eh-dispcont.ll b/test/CodeGen/ARM/eh-dispcont.ll
index 57ab15feca5..e9871aa7dc7 100644
--- a/test/CodeGen/ARM/eh-dispcont.ll
+++ b/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 @@ entry:
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
diff --git a/test/CodeGen/ARM/eh-resume-darwin.ll b/test/CodeGen/ARM/eh-resume-darwin.ll
index d1252f4c986..0cd49775cfb 100644
--- a/test/CodeGen/ARM/eh-resume-darwin.ll
+++ b/test/CodeGen/ARM/eh-resume-darwin.ll
@@ -5,7 +5,7 @@ declare void @func()
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 @@ cont:
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
}
diff --git a/test/CodeGen/ARM/ehabi-filters.ll b/test/CodeGen/ARM/ehabi-filters.ll
index f86b66c30c5..4faa29e2038 100644
--- a/test/CodeGen/ARM/ehabi-filters.ll
+++ b/test/CodeGen/ARM/ehabi-filters.ll
@@ -14,7 +14,7 @@ declare void @__cxa_throw(i8*, i8*, i8*)
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 @@ entry:
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.i: ; preds = %entry
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
diff --git a/test/CodeGen/ARM/ehabi-handlerdata-nounwind.ll b/test/CodeGen/ARM/ehabi-handlerdata-nounwind.ll
index 42ca9888abb..3d380bf8f22 100644
--- a/test/CodeGen/ARM/ehabi-handlerdata-nounwind.ll
+++ b/test/CodeGen/ARM/ehabi-handlerdata-nounwind.ll
@@ -25,12 +25,12 @@ declare i8* @__cxa_begin_catch(i8*)
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)
diff --git a/test/CodeGen/ARM/ehabi-handlerdata.ll b/test/CodeGen/ARM/ehabi-handlerdata.ll
index 7045902f99c..c53b36ffe18 100644
--- a/test/CodeGen/ARM/ehabi-handlerdata.ll
+++ b/test/CodeGen/ARM/ehabi-handlerdata.ll
@@ -23,12 +23,12 @@ declare i8* @__cxa_begin_catch(i8*)
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)
diff --git a/test/CodeGen/ARM/ehabi.ll b/test/CodeGen/ARM/ehabi.ll
index 088e48d2d79..923cffcf653 100644
--- a/test/CodeGen/ARM/ehabi.ll
+++ b/test/CodeGen/ARM/ehabi.ll
@@ -89,14 +89,13 @@ declare void @_Z5printddddd(double, double, double, double, double)
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 @@ try.cont:
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 @@ eh.resume:
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)
diff --git a/test/CodeGen/ARM/global-merge.ll b/test/CodeGen/ARM/global-merge.ll
index e8c8289098a..fd06f1eeca7 100644
--- a/test/CodeGen/ARM/global-merge.ll
+++ b/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*))
diff --git a/test/CodeGen/ARM/gv-stubs-crash.ll b/test/CodeGen/ARM/gv-stubs-crash.ll
index 6e82afeacf8..b1e6e4f7b17 100644
--- a/test/CodeGen/ARM/gv-stubs-crash.ll
+++ b/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:
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
diff --git a/test/CodeGen/ARM/invoke-donothing-assert.ll b/test/CodeGen/ARM/invoke-donothing-assert.ll
index aab3556c547..c6489e3a4ce 100644
--- a/test/CodeGen/ARM/invoke-donothing-assert.ll
+++ b/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 @@ invoke.cont75:
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 @@ eh.resume:
}
; 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 @@ _ZN3lol5ArrayIivvvvvvvED1Ev.exit:
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
diff --git a/test/CodeGen/ARM/sjlj-prepare-critical-edge.ll b/test/CodeGen/ARM/sjlj-prepare-critical-edge.ll
index f85203e381b..c7f47b0962d 100644
--- a/test/CodeGen/ARM/sjlj-prepare-critical-edge.ll
+++ b/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 @@ for.cond: ; preds = %entry, %for.cond
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 @@ lpad5: ; preds = %for.cond
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 @@ ehcleanup: ; preds = %lpad5, %lpad
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 @@ declare void @terminatev()
@.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 @@ invoke.cont6: ; preds = %_ZNSt3__113__vector
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 @@ eh.resume: ; preds = %ehcleanup
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)
diff --git a/test/CodeGen/ARM/sjljehprepare-lower-empty-struct.ll b/test/CodeGen/ARM/sjljehprepare-lower-empty-struct.ll
index 3cf2a08fe35..5d015738623 100644
--- a/test/CodeGen/ARM/sjljehprepare-lower-empty-struct.ll
+++ b/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:
unreachable
handler:
- %tmp = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @baz to i8*)
+ %tmp = landingpad { i8*, i32 }
cleanup
resume { i8*, i32 } undef
}
diff --git a/test/CodeGen/Generic/2007-02-25-invoke.ll b/test/CodeGen/Generic/2007-02-25-invoke.ll
index 7850cec35f9..4ca280d1587 100644
--- a/test/CodeGen/Generic/2007-02-25-invoke.ll
+++ b/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
}
diff --git a/test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll b/test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll
index 407696f4c2f..f0259ec6b12 100644
--- a/test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll
+++ b/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 @@ cond_next1328: ; preds = %cond_true235, %cond_true
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
}
diff --git a/test/CodeGen/Generic/2007-12-17-InvokeAsm.ll b/test/CodeGen/Generic/2007-12-17-InvokeAsm.ll
index 03ccbdfaf0c..fe7f463159a 100644
--- a/test/CodeGen/Generic/2007-12-17-InvokeAsm.ll
+++ b/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 @@ entry:
ret void
cleanup144: ; preds = %entry
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
cleanup
resume { i8*, i32 } %exn
}
diff --git a/test/CodeGen/Generic/2007-12-31-UnusedSelector.ll b/test/CodeGen/Generic/2007-12-31-UnusedSelector.ll
index d67559e4d85..59a7b64e0df 100644
--- a/test/CodeGen/Generic/2007-12-31-UnusedSelector.ll
+++ b/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 @@ bb14: ; preds = %lpad
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
diff --git a/test/CodeGen/Generic/2009-11-16-BadKillsCrash.ll b/test/CodeGen/Generic/2009-11-16-BadKillsCrash.ll
index b483009976c..a0455cfe1aa 100644
--- a/test/CodeGen/Generic/2009-11-16-BadKillsCrash.ll
+++ b/test/CodeGen/Generic/2009-11-16-BadKillsCrash.ll
@@ -19,7 +19,7 @@ declare i8* @__cxa_begin_catch(i8*) nounwind
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 @@ invcont38: ; preds = %invcont25, %bb1.i,
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
}
diff --git a/test/CodeGen/Generic/donothing.ll b/test/CodeGen/Generic/donothing.ll
index 3727b60a1a4..59ccf6be092 100644
--- a/test/CodeGen/Generic/donothing.ll
+++ b/test/CodeGen/Generic/donothing.ll
@@ -5,7 +5,7 @@ declare void @__cxa_call_unexpected(i8*)
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 @@ invoke.cont:
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
diff --git a/test/CodeGen/Generic/exception-handling.ll b/test/CodeGen/Generic/exception-handling.ll
index 376e1f196d6..6e2a8678e9a 100644
--- a/test/CodeGen/Generic/exception-handling.ll
+++ b/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 @@ _ZN6Gambit5ArrayIiEC2Ej.exit36:
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
}
diff --git a/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll b/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll
index a135c625fcc..a21906cf6dc 100644
--- a/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll
+++ b/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 @@ normal:
ret void
handler:
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
catch i8* null
ret void
}
diff --git a/test/CodeGen/Mips/eh.ll b/test/CodeGen/Mips/eh.ll
index fcbd99ef737..2f843d9da9a 100644
--- a/test/CodeGen/Mips/eh.ll
+++ b/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 @@ lpad: ; preds = %entry
; 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
diff --git a/test/CodeGen/Mips/ehframe-indirect.ll b/test/CodeGen/Mips/ehframe-indirect.ll
index dc06ef7840f..a51cfb7e0fc 100644
--- a/test/CodeGen/Mips/ehframe-indirect.ll
+++ b/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 @@ entry:
; 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
diff --git a/test/CodeGen/Mips/insn-zero-size-bb.ll b/test/CodeGen/Mips/insn-zero-size-bb.ll
index 9739c6f17fa..ea61c994ae1 100644
--- a/test/CodeGen/Mips/insn-zero-size-bb.ll
+++ b/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:
unreachable
return:
- %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @foo to i8*)
+ %0 = landingpad { i8*, i32 }
catch i8* null
ret void
}
diff --git a/test/CodeGen/Mips/mips16ex.ll b/test/CodeGen/Mips/mips16ex.ll
index 68b584604b2..c3a02261119 100644
--- a/test/CodeGen/Mips/mips16ex.ll
+++ b/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 @@ entry:
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 @@ try.cont: ; preds = %invoke.cont
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
diff --git a/test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll b/test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll
index 34122912349..bd496704890 100644
--- a/test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll
+++ b/test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll
@@ -19,7 +19,7 @@ target triple = "powerpc64-apple-darwin8"
; 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 @@ bb30.preheader: ; preds = %entry
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
diff --git a/test/CodeGen/PowerPC/extra-toc-reg-deps.ll b/test/CodeGen/PowerPC/extra-toc-reg-deps.ll
index 1056c5a57aa..488771807ce 100644
--- a/test/CodeGen/PowerPC/extra-toc-reg-deps.ll
+++ b/test/CodeGen/PowerPC/extra-toc-reg-deps.ll
@@ -61,7 +61,7 @@ target triple = "powerpc64-bgq-linux"
@.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 @@ _ZNK4Foam8ZoneMeshINS_9pointZoneENS_8polyMeshEE15checkDefinitionEb.exit: ; preds
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 @@ for.cond.cleanup69: ; preds = %_ZNSsD2Ev.exit
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 @@ if.else: ; preds = %for.cond.cleanup69
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 @@ if.then178: ; preds = %invoke.cont176
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 @@ if.end213: ; preds = %invoke.cont176
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 @@ invoke.cont231: ; preds = %_ZNSsD2Ev.exit1792
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 @@ invoke.cont243: ; preds = %invoke.cont231
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 @@ if.then292: ; preds = %_ZNSsD2Ev.exit1877
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 @@ invoke.cont676: ; preds = %invoke.cont674
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 @@ if.else888: ; preds = %_ZN4Foam11regionSpl
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 @@ invoke.cont906: ; preds = %call.i3116.noexc
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 @@ _ZNSsD2Ev.exit3204: ; preds = %lpad898
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 @@ eh.resume: ; preds = %_ZN4Foam4ListIiED2E
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
}
diff --git a/test/CodeGen/PowerPC/fast-isel-icmp-split.ll b/test/CodeGen/PowerPC/fast-isel-icmp-split.ll
index 459616eb969..e1f22781db3 100644
--- a/test/CodeGen/PowerPC/fast-isel-icmp-split.ll
+++ b/test/CodeGen/PowerPC/fast-isel-icmp-split.ll
@@ -9,7 +9,7 @@ target triple = "powerpc64-bgq-linux"
%"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 @@ if.then: ; preds = %invoke.cont.2
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
diff --git a/test/CodeGen/PowerPC/glob-comp-aa-crash.ll b/test/CodeGen/PowerPC/glob-comp-aa-crash.ll
index 66df6bb8669..88530a3f303 100644
--- a/test/CodeGen/PowerPC/glob-comp-aa-crash.ll
+++ b/test/CodeGen/PowerPC/glob-comp-aa-crash.ll
@@ -17,7 +17,7 @@ target triple = "powerpc64-bgq-linux"
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 @@ invoke.cont4: ; preds = %if.then
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
diff --git a/test/CodeGen/PowerPC/pr18663-2.ll b/test/CodeGen/PowerPC/pr18663-2.ll
index 6b54440c4d5..c77291e5145 100644
--- a/test/CodeGen/PowerPC/pr18663-2.ll
+++ b/test/CodeGen/PowerPC/pr18663-2.ll
@@ -46,7 +46,7 @@ declare void @_ZN4Foam7IOerror4exitEi() #0
; 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 @@ _ZN4Foam6stringC2ERKS0_.exit.i: ; preds = %invoke.cont
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 @@ memptr.end.i: ; preds = %invoke.cont8
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 @@ invoke.cont.i.i.i: ; preds = %.noexc205
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
diff --git a/test/CodeGen/PowerPC/preincprep-invoke.ll b/test/CodeGen/PowerPC/preincprep-invoke.ll
index 0e09ff1b774..8dbce9a3a08 100644
--- a/test/CodeGen/PowerPC/preincprep-invoke.ll
+++ b/test/CodeGen/PowerPC/preincprep-invoke.ll
@@ -11,7 +11,7 @@ declare void @_ZN13CStdOutStream5FlushEv()
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 @@ for.cond.i.i30: ; preds = %for.cond.i.i30, %in
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
}
diff --git a/test/CodeGen/SPARC/exception.ll b/test/CodeGen/SPARC/exception.ll
index 0af48d0b64b..f112328346d 100644
--- a/test/CodeGen/SPARC/exception.ll
+++ b/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 @@ entry:
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
diff --git a/test/CodeGen/Thumb/sjljehprepare-lower-vector.ll b/test/CodeGen/Thumb/sjljehprepare-lower-vector.ll
index ab082c79ba6..605fe4627c9 100644
--- a/test/CodeGen/Thumb/sjljehprepare-lower-vector.ll
+++ b/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:
unreachable
handler:
- %tmp = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @baz to i8*)
+ %tmp = landingpad { i8*, i32 }
cleanup
resume { i8*, i32 } undef
}
diff --git a/test/CodeGen/Thumb2/constant-islands.ll b/test/CodeGen/Thumb2/constant-islands.ll
index a64d72e86ef..583849195e6 100644
--- a/test/CodeGen/Thumb2/constant-islands.ll
+++ b/test/CodeGen/Thumb2/constant-islands.ll
@@ -76,7 +76,7 @@ declare %class.btCapsuleShape* @_ZN14btCapsuleShapeC1Eff(%class.btCapsuleShape*,
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 @@ for.inc: ; preds = %for.body
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 @@ invoke.cont4: ; preds = %lpad
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 @@ invoke.cont11: ; preds = %lpad8
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 @@ invoke.cont20: ; preds = %lpad17
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 @@ invoke.cont29: ; preds = %lpad26
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 @@ invoke.cont38: ; preds = %lpad35
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 @@ invoke.cont47: ; preds = %lpad44
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 @@ invoke.cont56: ; preds = %lpad53
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 @@ invoke.cont65: ; preds = %lpad62
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 @@ invoke.cont74: ; preds = %lpad71
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 @@ invoke.cont83: ; preds = %lpad80
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 @@ invoke.cont517: ; preds = %invoke.cont488
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 @@ lpad258: ; preds = %for.end
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 @@ lpad284: ; preds = %invoke.cont259
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 @@ lpad313: ; preds = %invoke.cont285
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 @@ lpad342: ; preds = %invoke.cont314
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 @@ lpad371: ; preds = %invoke.cont343
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 @@ lpad400: ; preds = %invoke.cont372
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 @@ lpad429: ; preds = %invoke.cont401
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 @@ lpad458: ; preds = %invoke.cont430
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 @@ lpad487: ; preds = %invoke.cont459
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 @@ eh.resume: ; preds = %lpad516, %lpad487,
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
diff --git a/test/CodeGen/WinEH/cppeh-alloca-sink.ll b/test/CodeGen/WinEH/cppeh-alloca-sink.ll
index d50237fa78a..cc6cec9e4d6 100644
--- a/test/CodeGen/WinEH/cppeh-alloca-sink.ll
+++ b/test/CodeGen/WinEH/cppeh-alloca-sink.ll
@@ -51,7 +51,7 @@ $"\01??_R0H@8" = comdat any
@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 @@ entry:
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 @@ eh.resume: ; preds = %lpad
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 @@ invoke.cont: ; preds = %while.body
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 @@ try.cont: ; preds = %invoke.cont2, %invo
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
diff --git a/test/CodeGen/WinEH/cppeh-catch-all.ll b/test/CodeGen/WinEH/cppeh-catch-all.ll
index a6c94d40079..266dd3e305c 100644
--- a/test/CodeGen/WinEH/cppeh-catch-all.ll
+++ b/test/CodeGen/WinEH/cppeh-catch-all.ll
@@ -25,7 +25,7 @@ target triple = "x86_64-pc-windows-msvc"
; 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 @@ invoke.cont: ; preds = %entry
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
diff --git a/test/CodeGen/WinEH/cppeh-catch-and-throw.ll b/test/CodeGen/WinEH/cppeh-catch-and-throw.ll
index c60a339f6ba..240ca987690 100644
--- a/test/CodeGen/WinEH/cppeh-catch-and-throw.ll
+++ b/test/CodeGen/WinEH/cppeh-catch-and-throw.ll
@@ -50,7 +50,7 @@ $_TI1H = comdat any
; 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 @@ entry:
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 @@ catch: ; preds = %lpad
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 @@ unreachable: ; preds = %catch, %entry
; 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: }
diff --git a/test/CodeGen/WinEH/cppeh-catch-scalar.ll b/test/CodeGen/WinEH/cppeh-catch-scalar.ll
index 4faef82a75f..172502cf73c 100644
--- a/test/CodeGen/WinEH/cppeh-catch-scalar.ll
+++ b/test/CodeGen/WinEH/cppeh-catch-scalar.ll
@@ -29,7 +29,7 @@ target triple = "x86_64-pc-windows-msvc"
; 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 @@ invoke.cont: ; preds = %entry
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
diff --git a/test/CodeGen/WinEH/cppeh-catch-unwind.ll b/test/CodeGen/WinEH/cppeh-catch-unwind.ll
index 0fd735be57a..6fd70d84b2a 100644
--- a/test/CodeGen/WinEH/cppeh-catch-unwind.ll
+++ b/test/CodeGen/WinEH/cppeh-catch-unwind.ll
@@ -31,7 +31,7 @@ $"\01??_R0H@8" = comdat any
@"\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 @@ $"\01??_R0H@8" = comdat any
; 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 @@ invoke.cont2: ; preds = %invoke.cont
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 @@ lpad1: ; preds = %invoke.cont
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 @@ try.cont: ; preds = %invoke.cont2, %invo
; 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 @@ eh.resume: ; preds = %catch.dispatch7
; 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: }
diff --git a/test/CodeGen/WinEH/cppeh-cleanup-invoke.ll b/test/CodeGen/WinEH/cppeh-cleanup-invoke.ll
index 5a570431510..7e5f659f2a4 100644
--- a/test/CodeGen/WinEH/cppeh-cleanup-invoke.ll
+++ b/test/CodeGen/WinEH/cppeh-cleanup-invoke.ll
@@ -26,7 +26,7 @@ $"\01??_R0H@8" = comdat any
@"\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 @@ invoke.cont2: ; preds = %invoke.cont
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
diff --git a/test/CodeGen/WinEH/cppeh-demote-liveout.ll b/test/CodeGen/WinEH/cppeh-demote-liveout.ll
index 48d9b39ca64..309952bfc94 100644
--- a/test/CodeGen/WinEH/cppeh-demote-liveout.ll
+++ b/test/CodeGen/WinEH/cppeh-demote-liveout.ll
@@ -19,14 +19,14 @@ declare i32 @llvm.eh.typeid.for(i8*)
@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
diff --git a/test/CodeGen/WinEH/cppeh-frame-vars.ll b/test/CodeGen/WinEH/cppeh-frame-vars.ll
index eeda4319a6e..1077ad0b876 100644
--- a/test/CodeGen/WinEH/cppeh-frame-vars.ll
+++ b/test/CodeGen/WinEH/cppeh-frame-vars.ll
@@ -62,7 +62,7 @@ $"\01??_R0H@8" = comdat any
; 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 @@ invoke.cont: ; preds = %for.body
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
diff --git a/test/CodeGen/WinEH/cppeh-inalloca.ll b/test/CodeGen/WinEH/cppeh-inalloca.ll
index 13471b8661a..3dc1348efff 100644
--- a/test/CodeGen/WinEH/cppeh-inalloca.ll
+++ b/test/CodeGen/WinEH/cppeh-inalloca.ll
@@ -45,7 +45,7 @@ $"\01??_R0H@8" = comdat any
; 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 @@ invoke.cont: ; preds = %entry
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
diff --git a/test/CodeGen/WinEH/cppeh-min-unwind.ll b/test/CodeGen/WinEH/cppeh-min-unwind.ll
index 3fffa47a081..b1f157ade29 100644
--- a/test/CodeGen/WinEH/cppeh-min-unwind.ll
+++ b/test/CodeGen/WinEH/cppeh-min-unwind.ll
@@ -30,7 +30,7 @@ target triple = "x86_64-pc-windows-msvc"
; 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 @@ invoke.cont: ; preds = %entry
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
diff --git a/test/CodeGen/WinEH/cppeh-mixed-catch-and-cleanup.ll b/test/CodeGen/WinEH/cppeh-mixed-catch-and-cleanup.ll
index 52f613276d5..1294d0b8ff3 100644
--- a/test/CodeGen/WinEH/cppeh-mixed-catch-and-cleanup.ll
+++ b/test/CodeGen/WinEH/cppeh-mixed-catch-and-cleanup.ll
@@ -35,7 +35,7 @@ target triple = "x86_64-pc-windows-msvc"
; 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 @@ invoke.cont: ; preds = %entry
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
diff --git a/test/CodeGen/WinEH/cppeh-multi-catch.ll b/test/CodeGen/WinEH/cppeh-multi-catch.ll
index 28340c60ad1..25224551cad 100644
--- a/test/CodeGen/WinEH/cppeh-multi-catch.ll
+++ b/test/CodeGen/WinEH/cppeh-multi-catch.ll
@@ -45,7 +45,7 @@ $"\01??_R0?AVSomeClass@@@8" = comdat any
@"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 @@ $"\01??_R0?AVSomeClass@@@8" = comdat any
; 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 @@ invoke.cont: ; preds = %entry
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 @@ invoke.cont: ; preds = %entry
; 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@@"
diff --git a/test/CodeGen/WinEH/cppeh-nested-1.ll b/test/CodeGen/WinEH/cppeh-nested-1.ll
index 2b13510c574..a5e80ac2b2a 100644
--- a/test/CodeGen/WinEH/cppeh-nested-1.ll
+++ b/test/CodeGen/WinEH/cppeh-nested-1.ll
@@ -39,7 +39,7 @@ $"\01??_R0H@8" = comdat any
; 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 @@ invoke.cont: ; preds = %entry
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 @@ try.cont: ; preds = %invoke.cont2, %invo
; 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 @@ eh.resume: ; %catch.dispatch3
; 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]], []
diff --git a/test/CodeGen/WinEH/cppeh-nested-2.ll b/test/CodeGen/WinEH/cppeh-nested-2.ll
index f12f3dbed08..385958b006d 100644
--- a/test/CodeGen/WinEH/cppeh-nested-2.ll
+++ b/test/CodeGen/WinEH/cppeh-nested-2.ll
@@ -49,7 +49,7 @@ target triple = "x86_64-pc-windows-msvc"
; 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 @@ invoke.cont5: ; preds = %invoke.cont4
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 @@ lpad: ; preds = %try.cont, %entry
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 @@ lpad: ; preds = %try.cont, %entry
; 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 @@ lpad1: ; preds = %invoke.cont4, %invo
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 @@ lpad1: ; preds = %invoke.cont4, %invo
; 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 @@ invoke.cont9: ; preds = %try.cont
; 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 @@ eh.resume: ; preds = %catch.dispatch11
; 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: }
diff --git a/test/CodeGen/WinEH/cppeh-nested-3.ll b/test/CodeGen/WinEH/cppeh-nested-3.ll
index c96abcc6e81..33faaf0f591 100644
--- a/test/CodeGen/WinEH/cppeh-nested-3.ll
+++ b/test/CodeGen/WinEH/cppeh-nested-3.ll
@@ -46,7 +46,7 @@ $"\01??_R0H@8" = comdat any
; 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 @@ invoke.cont: ; preds = %entry
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 @@ invoke.cont2: ; preds = %catch
; 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 @@ try.cont10: ; preds = %invoke.cont9, %invo
; 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 @@ eh.resume: ; preds = %lpad16, %catch.disp
; 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 @@ eh.resume: ; preds = %lpad16, %catch.disp
; 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]], []
diff --git a/test/CodeGen/WinEH/cppeh-nested-rethrow.ll b/test/CodeGen/WinEH/cppeh-nested-rethrow.ll
index 60b40411334..14a5f233f9b 100644
--- a/test/CodeGen/WinEH/cppeh-nested-rethrow.ll
+++ b/test/CodeGen/WinEH/cppeh-nested-rethrow.ll
@@ -56,7 +56,7 @@ $_TI1H = comdat any
; 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 @@ entry:
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 @@ catch: ; preds = %lpad
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 @@ declare void @llvm.eh.endcatch() #1
; 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 @@ entry:
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 @@ catch: ; preds = %lpad
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
diff --git a/test/CodeGen/WinEH/cppeh-nonalloca-frame-values.ll b/test/CodeGen/WinEH/cppeh-nonalloca-frame-values.ll
index 15f6bfb4680..83236c4188f 100644
--- a/test/CodeGen/WinEH/cppeh-nonalloca-frame-values.ll
+++ b/test/CodeGen/WinEH/cppeh-nonalloca-frame-values.ll
@@ -72,7 +72,7 @@ $"\01??_R0H@8" = comdat any
; 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 @@ invoke.cont: ; preds = %for.body
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
diff --git a/test/CodeGen/WinEH/cppeh-prepared-catch-all.ll b/test/CodeGen/WinEH/cppeh-prepared-catch-all.ll
index f395d64c7b5..31b5e58562b 100644
--- a/test/CodeGen/WinEH/cppeh-prepared-catch-all.ll
+++ b/test/CodeGen/WinEH/cppeh-prepared-catch-all.ll
@@ -18,13 +18,13 @@ declare void @llvm.eh.begincatch(i8* nocapture, i8* nocapture) #2
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
diff --git a/test/CodeGen/WinEH/cppeh-prepared-catch-reordered.ll b/test/CodeGen/WinEH/cppeh-prepared-catch-reordered.ll
index 6383ca7f188..fc632af1740 100644
--- a/test/CodeGen/WinEH/cppeh-prepared-catch-reordered.ll
+++ b/test/CodeGen/WinEH/cppeh-prepared-catch-reordered.ll
@@ -43,7 +43,7 @@ $"\01??_C@_06PNOAJMHG@e?3?5?$CFd?6?$AA@" = comdat any
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 @@ entry:
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 @@ declare void @llvm.lifetime.start(i64, i8* nocapture) #3
; 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 @@ entry.split: ; preds = %entry
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
diff --git a/test/CodeGen/WinEH/cppeh-prepared-catch.ll b/test/CodeGen/WinEH/cppeh-prepared-catch.ll
index e7aaca86a88..c7a829ad7e4 100644
--- a/test/CodeGen/WinEH/cppeh-prepared-catch.ll
+++ b/test/CodeGen/WinEH/cppeh-prepared-catch.ll
@@ -30,7 +30,7 @@ $"\01??_R0H@8" = comdat any
@"\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 @@ invoke.cont2: ; preds = %entry
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 @@ lpad1: ; preds = %entry
; 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 @@ done:
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 @@ lpad: ; preds = %entry
; 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 @@ invoke.cont: ; preds = %entry
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 @@ try.cont: ; preds = %lpad2, %invoke.cont
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]
diff --git a/test/CodeGen/WinEH/cppeh-prepared-cleanups.ll b/test/CodeGen/WinEH/cppeh-prepared-cleanups.ll
index 876cb53baba..14973023356 100644
--- a/test/CodeGen/WinEH/cppeh-prepared-cleanups.ll
+++ b/test/CodeGen/WinEH/cppeh-prepared-cleanups.ll
@@ -50,7 +50,7 @@ $_TI1H = comdat any
; 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 @@ entry:
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 @@ entry:
; 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 @@ invoke.cont3: ; preds = %if.then
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 @@ declare i8* @llvm.framerecover(i8*, i8*, i32) #6
; 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 @@ entry.split: ; preds = %entry
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 @@ entry.split: ; preds = %entry
ret void
stub: ; preds = %entry
- %2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+ %2 = landingpad { i8*, i32 }
cleanup
unreachable
}
diff --git a/test/CodeGen/WinEH/cppeh-shared-empty-catch.ll b/test/CodeGen/WinEH/cppeh-shared-empty-catch.ll
index dd99a092b20..678ea6f8ba1 100644
--- a/test/CodeGen/WinEH/cppeh-shared-empty-catch.ll
+++ b/test/CodeGen/WinEH/cppeh-shared-empty-catch.ll
@@ -34,7 +34,7 @@ $"\01??_R0H@8" = comdat any
; 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 @@ invoke.cont: ; preds = %entry
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 @@ lpad: ; preds = %entry
; 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
diff --git a/test/CodeGen/WinEH/cppeh-similar-catch-blocks.ll b/test/CodeGen/WinEH/cppeh-similar-catch-blocks.ll
index 81ee4542062..5b974508bc1 100644
--- a/test/CodeGen/WinEH/cppeh-similar-catch-blocks.ll
+++ b/test/CodeGen/WinEH/cppeh-similar-catch-blocks.ll
@@ -91,7 +91,7 @@ $"\01??_C@_03PMGGPEJJ@?$CFd?6?$AA@" = comdat any
; 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 @@ entry:
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 @@ try.cont: ; preds = %invoke.cont
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 @@ lpad2: ; preds = %catch
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 @@ invoke.cont11: ; preds = %catch8
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 @@ lpad10: ; preds = %catch8
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 @@ lpad16: ; preds = %catch13
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 @@ try.cont33: ; preds = %invoke.cont31
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 @@ lpad30: ; preds = %catch25
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 @@ invoke.cont43: ; preds = %catch40
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 @@ lpad42: ; preds = %catch40
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 @@ lpad50: ; preds = %catch45
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
diff --git a/test/CodeGen/WinEH/cppeh-state-calc-1.ll b/test/CodeGen/WinEH/cppeh-state-calc-1.ll
index 3549b1d51de..1e71f8f3827 100644
--- a/test/CodeGen/WinEH/cppeh-state-calc-1.ll
+++ b/test/CodeGen/WinEH/cppeh-state-calc-1.ll
@@ -68,7 +68,7 @@ $_TI1D = comdat any
@_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 @@ entry:
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 @@ try.cont: ; preds = %lpad
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 @@ try.cont10: ; preds = %lpad3, %lpad
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 @@ declare void @"\01?catch_one@@YAXXZ"() #1
; 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 @@ entry.split: ; preds = %entry
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 @@ stub: ; preds = %entry
; 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 @@ entry.split: ; preds = %entry
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 @@ entry.split: ; preds = %entry
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 @@ entry.split: ; preds = %entry
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
diff --git a/test/CodeGen/WinEH/seh-catch-all.ll b/test/CodeGen/WinEH/seh-catch-all.ll
index c2a652b8099..5ac2295a5b4 100644
--- a/test/CodeGen/WinEH/seh-catch-all.ll
+++ b/test/CodeGen/WinEH/seh-catch-all.ll
@@ -21,7 +21,7 @@ declare i32 @__C_specific_handler(...)
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 @@ invoke.cont: ; preds = %entry
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
diff --git a/test/CodeGen/WinEH/seh-inlined-finally.ll b/test/CodeGen/WinEH/seh-inlined-finally.ll
index d2080cff79d..5943cb77cee 100644
--- a/test/CodeGen/WinEH/seh-inlined-finally.ll
+++ b/test/CodeGen/WinEH/seh-inlined-finally.ll
@@ -19,7 +19,7 @@ declare void @llvm.frameescape(...)
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 @@ invoke.cont: ; preds = %entry
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 @@ lpad: ; preds = %entry
; 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 @@ invoke.cont: ; preds = %entry
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)
diff --git a/test/CodeGen/WinEH/seh-outlined-finally.ll b/test/CodeGen/WinEH/seh-outlined-finally.ll
index 19558b70530..3c27212192d 100644
--- a/test/CodeGen/WinEH/seh-outlined-finally.ll
+++ b/test/CodeGen/WinEH/seh-outlined-finally.ll
@@ -39,7 +39,7 @@ entry:
}
; 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 @@ invoke.cont2: ; preds = %invoke.cont
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 @@ lpad: ; preds = %entry
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
diff --git a/test/CodeGen/WinEH/seh-prepared-basic.ll b/test/CodeGen/WinEH/seh-prepared-basic.ll
index 880bb3c33a8..b981dc2d9bd 100644
--- a/test/CodeGen/WinEH/seh-prepared-basic.ll
+++ b/test/CodeGen/WinEH/seh-prepared-basic.ll
@@ -15,14 +15,14 @@ target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
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]
diff --git a/test/CodeGen/WinEH/seh-resume-phi.ll b/test/CodeGen/WinEH/seh-resume-phi.ll
index 256dd852d28..d2bd64167d2 100644
--- a/test/CodeGen/WinEH/seh-resume-phi.ll
+++ b/test/CodeGen/WinEH/seh-resume-phi.ll
@@ -9,13 +9,13 @@ declare void @cleanup()
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 @@ __except:
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
diff --git a/test/CodeGen/WinEH/seh-simple.ll b/test/CodeGen/WinEH/seh-simple.ll
index 9a451874d58..98f06ef12c9 100644
--- a/test/CodeGen/WinEH/seh-simple.ll
+++ b/test/CodeGen/WinEH/seh-simple.ll
@@ -12,7 +12,7 @@ declare void @might_crash()
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 @@ entry:
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 @@ eh.resume:
; 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 @@ entry:
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 @@ return:
; 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 @@ eh.resume:
; 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 @@ cont:
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 @@ eh.resume:
; 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()
diff --git a/test/CodeGen/X86/2007-05-05-Personality.ll b/test/CodeGen/X86/2007-05-05-Personality.ll
index b99c58c6e4a..f177a35273a 100644
--- a/test/CodeGen/X86/2007-05-05-Personality.ll
+++ b/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)
diff --git a/test/CodeGen/X86/2008-04-17-CoalescerBug.ll b/test/CodeGen/X86/2008-04-17-CoalescerBug.ll
index d1cfb447a2c..3d3851cbd4c 100644
--- a/test/CodeGen/X86/2008-04-17-CoalescerBug.ll
+++ b/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 @@ bb7819: ; preds = %bb3314
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
}
diff --git a/test/CodeGen/X86/2008-05-28-LocalRegAllocBug.ll b/test/CodeGen/X86/2008-05-28-LocalRegAllocBug.ll
index fc7ddf0bc67..7ddedacbabd 100644
--- a/test/CodeGen/X86/2008-05-28-LocalRegAllocBug.ll
+++ b/test/CodeGen/X86/2008-05-28-LocalRegAllocBug.ll
@@ -6,7 +6,7 @@ declare i8* @_Znwm(i32)
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 @@ tmp12.i.i.i.i.i.noexc65: ; preds = %bb37
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
diff --git a/test/CodeGen/X86/2009-03-13-PHIElimBug.ll b/test/CodeGen/X86/2009-03-13-PHIElimBug.ll
index e14c30a2744..91f29c4f24c 100644
--- a/test/CodeGen/X86/2009-03-13-PHIElimBug.ll
+++ b/test/CodeGen/X86/2009-03-13-PHIElimBug.ll
@@ -6,7 +6,7 @@ declare i32 @f()
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 @@ cont2: ; preds = %cont
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
}
diff --git a/test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll b/test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll
index f8c7a151b2c..6814ed1d894 100644
--- a/test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll
+++ b/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 @@ cont2: ; preds = %cont
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
}
diff --git a/test/CodeGen/X86/2009-09-10-LoadFoldingBug.ll b/test/CodeGen/X86/2009-09-10-LoadFoldingBug.ll
index 2ec49f486c9..aa88576c148 100644
--- a/test/CodeGen/X86/2009-09-10-LoadFoldingBug.ll
+++ b/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 @@ invcont2: ; preds = %invcont1
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
diff --git a/test/CodeGen/X86/2009-11-25-ImpDefBug.ll b/test/CodeGen/X86/2009-11-25-ImpDefBug.ll
index 0bf13de6127..2f4e11e54e3 100644
--- a/test/CodeGen/X86/2009-11-25-ImpDefBug.ll
+++ b/test/CodeGen/X86/2009-11-25-ImpDefBug.ll
@@ -20,7 +20,7 @@ declare void @_ZNSt6vectorIP10ASN1ObjectSaIS1_EE13_M_insert_auxEN9__gnu_cxx17__n
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 @@ bb1.i5: ; preds = %bb.i1
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
diff --git a/test/CodeGen/X86/2010-04-06-SSEDomainFixCrash.ll b/test/CodeGen/X86/2010-04-06-SSEDomainFixCrash.ll
index 2ba4d9aaded..41c318b62ea 100644
--- a/test/CodeGen/X86/2010-04-06-SSEDomainFixCrash.ll
+++ b/test/CodeGen/X86/2010-04-06-SSEDomainFixCrash.ll
@@ -7,7 +7,7 @@ target triple = "i386-apple-darwin10.0"
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 @@ bb92: ; preds = %entry
unreachable
lpad159: ; preds = %bb58
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
cleanup
unreachable
}
diff --git a/test/CodeGen/X86/2010-04-30-LocalAlloc-LandingPad.ll b/test/CodeGen/X86/2010-04-30-LocalAlloc-LandingPad.ll
index 4711d527467..fc5520e12ac 100644
--- a/test/CodeGen/X86/2010-04-30-LocalAlloc-LandingPad.ll
+++ b/test/CodeGen/X86/2010-04-30-LocalAlloc-LandingPad.ll
@@ -13,7 +13,7 @@ target triple = "i386-apple-darwin10.0.0"
; 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 @@ invoke.cont: ; preds = %entry
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 @@ invoke.cont2: ; preds = %match
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
diff --git a/test/CodeGen/X86/2010-08-04-MingWCrash.ll b/test/CodeGen/X86/2010-08-04-MingWCrash.ll
index 61f527b0470..e97615a417a 100644
--- a/test/CodeGen/X86/2010-08-04-MingWCrash.ll
+++ b/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 @@ bb1:
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
diff --git a/test/CodeGen/X86/2012-01-10-UndefExceptionEdge.ll b/test/CodeGen/X86/2012-01-10-UndefExceptionEdge.ll
index 21443441c9f..20615afdfa1 100644
--- a/test/CodeGen/X86/2012-01-10-UndefExceptionEdge.ll
+++ b/test/CodeGen/X86/2012-01-10-UndefExceptionEdge.ll
@@ -16,7 +16,7 @@ target triple = "i386-apple-macosx10.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 @@ bb11: ; preds = %bb7
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
diff --git a/test/CodeGen/X86/2012-05-19-CoalescerCrash.ll b/test/CodeGen/X86/2012-05-19-CoalescerCrash.ll
index 837fbc0777f..a3f68fa4c22 100644
--- a/test/CodeGen/X86/2012-05-19-CoalescerCrash.ll
+++ b/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 @@ define void @_ZN4llvm17AsmMatcherEmitter3runERNS_11raw_ostreamE() align 2 {
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 @@ define void @_ZN4llvm17AsmMatcherEmitter3runERNS_11raw_ostreamE() align 2 {
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 @@ define void @_ZN4llvm17AsmMatcherEmitter3runERNS_11raw_ostreamE() align 2 {
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 @@ define void @_ZN4llvm17AsmMatcherEmitter3runERNS_11raw_ostreamE() align 2 {
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 @@ define void @_ZN4llvm17AsmMatcherEmitter3runERNS_11raw_ostreamE() align 2 {
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 @@ define void @_ZN4llvm17AsmMatcherEmitter3runERNS_11raw_ostreamE() align 2 {
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
}
diff --git a/test/CodeGen/X86/2012-11-30-misched-dbg.ll b/test/CodeGen/X86/2012-11-30-misched-dbg.ll
index 818c5ed5687..22227faab94 100644
--- a/test/CodeGen/X86/2012-11-30-misched-dbg.ll
+++ b/test/CodeGen/X86/2012-11-30-misched-dbg.ll
@@ -99,7 +99,7 @@ declare i32 @__sprintf_chk(i8*, i32, i64, i8*, ...)
%"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 @@ exit.i: ; preds = %cond.end
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
diff --git a/test/CodeGen/X86/asm-label2.ll b/test/CodeGen/X86/asm-label2.ll
index 8715aa98ba5..031bd3852e6 100644
--- a/test/CodeGen/X86/asm-label2.ll
+++ b/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 @@ invoke.cont: ; preds = %entry
ret void
lpad: ; preds = %entry
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
cleanup
unreachable
}
diff --git a/test/CodeGen/X86/block-placement.ll b/test/CodeGen/X86/block-placement.ll
index e0276e42d4d..89defa956a4 100644
--- a/test/CodeGen/X86/block-placement.ll
+++ b/test/CodeGen/X86/block-placement.ll
@@ -546,7 +546,7 @@ exit:
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 @@ preheader:
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 @@ loop:
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 @@ continue:
unreachable
cleanup:
- %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ %0 = landingpad { i8*, i32 }
cleanup
unreachable
}
diff --git a/test/CodeGen/X86/branchfolding-landingpads.ll b/test/CodeGen/X86/branchfolding-landingpads.ll
index 40ec92ea0d7..032b9881245 100644
--- a/test/CodeGen/X86/branchfolding-landingpads.ll
+++ b/test/CodeGen/X86/branchfolding-landingpads.ll
@@ -18,20 +18,20 @@ declare void @_throw()
; 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()
diff --git a/test/CodeGen/X86/catch.ll b/test/CodeGen/X86/catch.ll
index 64e92783ac9..be7466e8abb 100644
--- a/test/CodeGen/X86/catch.ll
+++ b/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
}
diff --git a/test/CodeGen/X86/cfi.ll b/test/CodeGen/X86/cfi.ll
index b57ff45f51e..d5a3a8a26a3 100644
--- a/test/CodeGen/X86/cfi.ll
+++ b/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 @@ invoke.cont:
ret void
lpad:
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
catch i8* null
ret void
}
diff --git a/test/CodeGen/X86/code_placement_eh.ll b/test/CodeGen/X86/code_placement_eh.ll
index 2da3f9f53ef..62fddffffc4 100644
--- a/test/CodeGen/X86/code_placement_eh.ll
+++ b/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 @@ bb18.i5.i: ; preds = %.noexc6.i.i, %bb51.
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
diff --git a/test/CodeGen/X86/dwarf-eh-prepare.ll b/test/CodeGen/X86/dwarf-eh-prepare.ll
index 25572d868da..9acfaeb193e 100644
--- a/test/CodeGen/X86/dwarf-eh-prepare.ll
+++ b/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 @@ cont:
; 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 @@ lpad:
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 @@ eh.resume:
}
-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 @@ cont:
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 @@ eh.resume:
; 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 @@ cont:
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 @@ eh.resume:
; 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
;
diff --git a/test/CodeGen/X86/eh-label.ll b/test/CodeGen/X86/eh-label.ll
index aff0bcfffcf..d349174f95b 100644
--- a/test/CodeGen/X86/eh-label.ll
+++ b/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 @@ 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
call void @g()
ret void
diff --git a/test/CodeGen/X86/exception-label.ll b/test/CodeGen/X86/exception-label.ll
index cafa1e630b9..2270d2da180 100644
--- a/test/CodeGen/X86/exception-label.ll
+++ b/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
diff --git a/test/CodeGen/X86/fast-isel-cmp-branch.ll b/test/CodeGen/X86/fast-isel-cmp-branch.ll
index 684647ca948..d7b64ed3a5b 100644
--- a/test/CodeGen/X86/fast-isel-cmp-branch.ll
+++ b/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 @@ true:
return:
ret void
unw:
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
cleanup
unreachable
}
diff --git a/test/CodeGen/X86/fast-isel-gep.ll b/test/CodeGen/X86/fast-isel-gep.ll
index 67b30292be3..1886d3379aa 100644
--- a/test/CodeGen/X86/fast-isel-gep.ll
+++ b/test/CodeGen/X86/fast-isel-gep.ll
@@ -89,7 +89,7 @@ define i64 @test5(i8* %A, i32 %I, i64 %B) nounwind {
; 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 @@ invoke.cont16: ; preds = %if.then14
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
}
diff --git a/test/CodeGen/X86/gcc_except_table.ll b/test/CodeGen/X86/gcc_except_table.ll
index b656dc9d68e..82064c2a390 100644
--- a/test/CodeGen/X86/gcc_except_table.ll
+++ b/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 @@ entry:
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
diff --git a/test/CodeGen/X86/gcc_except_table_functions.ll b/test/CodeGen/X86/gcc_except_table_functions.ll
index 7a64a01fa38..8e002ad142b 100644
--- a/test/CodeGen/X86/gcc_except_table_functions.ll
+++ b/test/CodeGen/X86/gcc_except_table_functions.ll
@@ -10,7 +10,7 @@ declare void @filt1()
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 @@ try.cont:
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*)
diff --git a/test/CodeGen/X86/global-sections.ll b/test/CodeGen/X86/global-sections.ll
index 8c61411e53e..82547a60674 100644
--- a/test/CodeGen/X86/global-sections.ll
+++ b/test/CodeGen/X86/global-sections.ll
@@ -61,12 +61,12 @@ bb5:
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:
diff --git a/test/CodeGen/X86/inalloca-invoke.ll b/test/CodeGen/X86/inalloca-invoke.ll
index cf5cbe142ec..9a184e563b1 100644
--- a/test/CodeGen/X86/inalloca-invoke.ll
+++ b/test/CodeGen/X86/inalloca-invoke.ll
@@ -11,7 +11,7 @@ declare void @begin(%Iter* sret)
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 @@ invoke.cont5: ; preds = %invoke.cont
ret i32 0
lpad: ; preds = %invoke.cont, %entry
- %lp = landingpad { i8*, i32 } personality i32 (...)* @pers
+ %lp = landingpad { i8*, i32 }
cleanup
unreachable
}
diff --git a/test/CodeGen/X86/indirect-hidden.ll b/test/CodeGen/X86/indirect-hidden.ll
index 309375d9302..9e1b7d37355 100644
--- a/test/CodeGen/X86/indirect-hidden.ll
+++ b/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 @@ end:
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
diff --git a/test/CodeGen/X86/large-gep-chain.ll b/test/CodeGen/X86/large-gep-chain.ll
index 44247b8658a..8df282983f5 100644
--- a/test/CodeGen/X86/large-gep-chain.ll
+++ b/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 @@ bb25275: ; preds = %bb25274
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 @@ bb25297: ; preds = %bb25296
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 @@ bb25323: ; preds = %bb25319
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 @@ bb25354: ; preds = %bb25353
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
diff --git a/test/CodeGen/X86/patchpoint-invoke.ll b/test/CodeGen/X86/patchpoint-invoke.ll
index 98e9eb3b6a4..b7f198d960a 100644
--- a/test/CodeGen/X86/patchpoint-invoke.ll
+++ b/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 @@ success:
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
}
diff --git a/test/CodeGen/X86/personality.ll b/test/CodeGen/X86/personality.ll
index 424a30734f0..afb6b1810e6 100644
--- a/test/CodeGen/X86/personality.ll
+++ b/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 @@ eh_then: ; preds = %unwind
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
diff --git a/test/CodeGen/X86/personality_size.ll b/test/CodeGen/X86/personality_size.ll
index 79d131b82b2..41f1ac8cad6 100644
--- a/test/CodeGen/X86/personality_size.ll
+++ b/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
diff --git a/test/CodeGen/X86/pr3522.ll b/test/CodeGen/X86/pr3522.ll
index 867f2828d4d..9e048d59d4e 100644
--- a/test/CodeGen/X86/pr3522.ll
+++ b/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 @@ return: ; preds = %lpad
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
diff --git a/test/CodeGen/X86/scev-interchange.ll b/test/CodeGen/X86/scev-interchange.ll
index e224c0858af..9cbb462e47d 100644
--- a/test/CodeGen/X86/scev-interchange.ll
+++ b/test/CodeGen/X86/scev-interchange.ll
@@ -51,7 +51,7 @@ declare fastcc void @_ZN11FE_Q_Helper12_GLOBAL__N_116invert_numberingERKSt6vecto
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 @@ bb71.i: ; preds = %bb.i.i.i262.i, %bb66.i
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 @@ _ZNSt6vectorIjSaIjEED1Ev.exit.i.i: ; preds = %_ZNSt12_Vector_baseIjSaIjEEC2EmRK
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 @@ bb50.i.i.i: ; preds = %bb.i.i.i.i.i.i.i.i.i.i, %_ZNSt12_Vector_baseIjSaIjEEC2Em
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 @@ invcont84.i: ; preds = %bb83.i
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 @@ bb50.i.i: ; preds = %bb.i.i.i.i.i.i.i.i320.i, %_ZNSt12_Vector_baseIjSaIjEEC2EmR
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 @@ invcont101.i: ; preds = %bb100.i
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 @@ _ZN10FullMatrixIdEC1Ejj.exit.i.i: ; preds = %invcont101.i
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 @@ bb.i.i.i297.i.i: ; preds = %bb58.i.i
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 @@ bb29.loopexit.i.i: ; preds = %.noexc232.i
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
}
diff --git a/test/CodeGen/X86/seh-catch-all-win32.ll b/test/CodeGen/X86/seh-catch-all-win32.ll
index 0c6b7f77ac8..28b0bca962e 100644
--- a/test/CodeGen/X86/seh-catch-all-win32.ll
+++ b/test/CodeGen/X86/seh-catch-all-win32.ll
@@ -14,7 +14,7 @@ declare i8* @llvm.framerecover(i8*, i8*, i32)
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 @@ entry:
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
diff --git a/test/CodeGen/X86/seh-catch-all.ll b/test/CodeGen/X86/seh-catch-all.ll
index c40e0105353..1c1a3c2139d 100644
--- a/test/CodeGen/X86/seh-catch-all.ll
+++ b/test/CodeGen/X86/seh-catch-all.ll
@@ -6,13 +6,13 @@ declare i32 @__C_specific_handler(...)
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
diff --git a/test/CodeGen/X86/seh-except-finally.ll b/test/CodeGen/X86/seh-except-finally.ll
index c796f1ef288..4327a64468f 100644
--- a/test/CodeGen/X86/seh-except-finally.ll
+++ b/test/CodeGen/X86/seh-except-finally.ll
@@ -33,7 +33,7 @@ declare void @crash()
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 @@ invoke.cont2: ; preds = %invoke.cont
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 @@ lpad: ; preds = %entry
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
diff --git a/test/CodeGen/X86/seh-filter.ll b/test/CodeGen/X86/seh-filter.ll
index 6a3a23edb1a..37ed15841a9 100644
--- a/test/CodeGen/X86/seh-filter.ll
+++ b/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
diff --git a/test/CodeGen/X86/seh-finally.ll b/test/CodeGen/X86/seh-finally.ll
index 9deffe13e01..350cd932f48 100644
--- a/test/CodeGen/X86/seh-finally.ll
+++ b/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 @@ invoke.cont: ; preds = %entry
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 @@ invoke.cont1: ; preds = %lpad
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
diff --git a/test/CodeGen/X86/seh-safe-div-win32.ll b/test/CodeGen/X86/seh-safe-div-win32.ll
index b5f9a3688ba..0f76ec07a6b 100644
--- a/test/CodeGen/X86/seh-safe-div-win32.ll
+++ b/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 @@ entry:
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
diff --git a/test/CodeGen/X86/seh-safe-div.ll b/test/CodeGen/X86/seh-safe-div.ll
index 80b15b60102..699e58ee8ba 100644
--- a/test/CodeGen/X86/seh-safe-div.ll
+++ b/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
diff --git a/test/CodeGen/X86/setjmp-spills.ll b/test/CodeGen/X86/setjmp-spills.ll
index c35caae97af..43136e018c8 100644
--- a/test/CodeGen/X86/setjmp-spills.ll
+++ b/test/CodeGen/X86/setjmp-spills.ll
@@ -78,7 +78,7 @@ second:
; 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 @@ cont:
br i1 %setjmp_result, label %second, label %first
lpad:
- %lp = landingpad { i8*, i32 } personality void ()* @personality cleanup
+ %lp = landingpad { i8*, i32 } cleanup
unreachable
first:
diff --git a/test/CodeGen/X86/split-eh-lpad-edges.ll b/test/CodeGen/X86/split-eh-lpad-edges.ll
index 852214e7c24..82dd3b7674f 100644
--- a/test/CodeGen/X86/split-eh-lpad-edges.ll
+++ b/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 @@ invcont27: ; preds = %invcont26
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
}
diff --git a/test/CodeGen/X86/stack-protector.ll b/test/CodeGen/X86/stack-protector.ll
index acaba6dc17f..398b8548747 100644
--- a/test/CodeGen/X86/stack-protector.ll
+++ b/test/CodeGen/X86/stack-protector.ll
@@ -2097,7 +2097,7 @@ entry:
; 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 @@ invoke.cont:
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 @@ lpad:
; 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 @@ invoke.cont:
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 @@ lpad:
; 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 @@ invoke.cont:
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 @@ lpad:
; 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 @@ invoke.cont:
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 @@ lpad:
; (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 @@ invoke.cont:
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 @@ lpad:
; 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 @@ invoke.cont:
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 @@ lpad:
; 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 @@ invoke.cont:
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 @@ lpad:
; 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 @@ invoke.cont:
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
}
diff --git a/test/CodeGen/X86/statepoint-invoke.ll b/test/CodeGen/X86/statepoint-invoke.ll
index df78978c117..81b9ab89ebc 100644
--- a/test/CodeGen/X86/statepoint-invoke.ll
+++ b/test/CodeGen/X86/statepoint-invoke.ll
@@ -9,7 +9,7 @@ declare i32 @"personality_function"()
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 @@ exceptional_return:
; 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 @@ exceptional_return:
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 @@ normal_return:
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 @@ exceptional_return:
; 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 @@ normal_return:
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 @@ exceptional_return.right:
}
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 @@ normal_return:
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 @@ exceptional_return:
}
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 @@ exceptional_return:
; 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)
diff --git a/test/CodeGen/X86/statepoint-stack-usage.ll b/test/CodeGen/X86/statepoint-stack-usage.ll
index b8d7487ed9c..a4aa747af8c 100644
--- a/test/CodeGen/X86/statepoint-stack-usage.ll
+++ b/test/CodeGen/X86/statepoint-stack-usage.ll
@@ -55,7 +55,7 @@ define i32 @reserve_first(i32 addrspace(1)* %a, i32 addrspace(1)* %b, i32 addrsp
}
; 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
@@ -85,12 +85,12 @@ normal_return2:
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
}
diff --git a/test/CodeGen/X86/win32-eh-states.ll b/test/CodeGen/X86/win32-eh-states.ll
index 7bcd51c44f0..0aae8c4d018 100644
--- a/test/CodeGen/X86/win32-eh-states.ll
+++ b/test/CodeGen/X86/win32-eh-states.ll
@@ -30,7 +30,7 @@ $"\01??_R0H@8" = comdat any
@"\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 @@ try.cont.9: ; preds = %invoke.cont.3, %inv
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
diff --git a/test/CodeGen/X86/win32-eh.ll b/test/CodeGen/X86/win32-eh.ll
index 584b409c705..f235d2884d0 100644
--- a/test/CodeGen/X86/win32-eh.ll
+++ b/test/CodeGen/X86/win32-eh.ll
@@ -12,14 +12,14 @@ define internal i32 @catchall_filt() {
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 @@ eh.resume:
; 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 @@ eh.resume:
; 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)
diff --git a/test/CodeGen/X86/win64_call_epi.ll b/test/CodeGen/X86/win64_call_epi.ll
index 71c44b08500..096cbe41c54 100644
--- a/test/CodeGen/X86/win64_call_epi.ll
+++ b/test/CodeGen/X86/win64_call_epi.ll
@@ -5,7 +5,7 @@ declare void @baz()
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 @@ normal:
ret void
catch:
- %1 = landingpad { i8*, i32 } personality i32 (...)* @personality cleanup
+ %1 = landingpad { i8*, i32 } cleanup
resume { i8*, i32 } %1
}
; WIN64-LABEL: foo1:
diff --git a/test/CodeGen/X86/win64_eh.ll b/test/CodeGen/X86/win64_eh.ll
index d668f43c895..cb9d026bec2 100644
--- a/test/CodeGen/X86/win64_eh.ll
+++ b/test/CodeGen/X86/win64_eh.ll
@@ -101,7 +101,7 @@ declare void @_d_eh_resume_unwind(i8*)
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 @@ finally:
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
diff --git a/test/CodeGen/X86/win_eh_prepare.ll b/test/CodeGen/X86/win_eh_prepare.ll
index a33dd92ad72..3e3f9af0582 100644
--- a/test/CodeGen/X86/win_eh_prepare.ll
+++ b/test/CodeGen/X86/win_eh_prepare.ll
@@ -11,7 +11,7 @@ declare i32 @__C_specific_handler(...)
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 @@ cont:
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 @@ define internal i32 @filt_g(i8*, i8*) {
; 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 @@ cont:
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
diff --git a/test/CodeGen/XCore/exception.ll b/test/CodeGen/XCore/exception.ll
index 705c6b42ade..dd7e012f737 100644
--- a/test/CodeGen/XCore/exception.ll
+++ b/test/CodeGen/XCore/exception.ll
@@ -47,7 +47,7 @@ entry:
; 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 @@ cont:
; 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*)
diff --git a/test/DebugInfo/AArch64/eh_frame_personality.ll b/test/DebugInfo/AArch64/eh_frame_personality.ll
index e2832a8c62c..ae5401b58fb 100644
--- a/test/DebugInfo/AArch64/eh_frame_personality.ll
+++ b/test/DebugInfo/AArch64/eh_frame_personality.ll
@@ -5,13 +5,13 @@ declare i32 @__gxx_personality_v0(...)
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
}
diff --git a/test/DebugInfo/AArch64/frameindices.ll b/test/DebugInfo/AArch64/frameindices.ll
index 0891cfbbdea..02907742336 100644
--- a/test/DebugInfo/AArch64/frameindices.ll
+++ b/test/DebugInfo/AArch64/frameindices.ll
@@ -83,7 +83,7 @@ entry:
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 @@ invoke.cont: ; preds = %call.i.i.noexc
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
diff --git a/test/DebugInfo/SystemZ/eh_frame_personality.ll b/test/DebugInfo/SystemZ/eh_frame_personality.ll
index 92ba34da456..323d328d470 100644
--- a/test/DebugInfo/SystemZ/eh_frame_personality.ll
+++ b/test/DebugInfo/SystemZ/eh_frame_personality.ll
@@ -6,13 +6,13 @@ declare i32 @__gxx_personality_v0(...)
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
}
diff --git a/test/DebugInfo/X86/arange-and-stub.ll b/test/DebugInfo/X86/arange-and-stub.ll
index b1ab6b9fc89..bbc6de5e573 100644
--- a/test/DebugInfo/X86/arange-and-stub.ll
+++ b/test/DebugInfo/X86/arange-and-stub.ll
@@ -16,7 +16,7 @@ define void @foo() {
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 @@ invoke.cont: ; preds = %0
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
}
diff --git a/test/DebugInfo/X86/sret.ll b/test/DebugInfo/X86/sret.ll
index 54d93d571be..ef8f2e6d65e 100644
--- a/test/DebugInfo/X86/sret.ll
+++ b/test/DebugInfo/X86/sret.ll
@@ -124,7 +124,7 @@ entry:
}
; 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 @@ invoke.cont: ; preds = %entry
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 @@ eh.resume: ; preds = %invoke.cont1
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 i8* @__cxa_begin_catch(i8*)
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 @@ invoke.cont: ; preds = %entry
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
diff --git a/test/DebugInfo/inline-debug-info-multiret.ll b/test/DebugInfo/inline-debug-info-multiret.ll
index 110b2958f0a..d86e6abbd80 100644
--- a/test/DebugInfo/inline-debug-info-multiret.ll
+++ b/test/DebugInfo/inline-debug-info-multiret.ll
@@ -57,7 +57,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
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 @@ invoke.cont: ; preds = %entry
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
diff --git a/test/DebugInfo/inline-debug-info.ll b/test/DebugInfo/inline-debug-info.ll
index aa25b658efe..908093ca255 100644
--- a/test/DebugInfo/inline-debug-info.ll
+++ b/test/DebugInfo/inline-debug-info.ll
@@ -75,7 +75,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
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 @@ invoke.cont: ; preds = %entry
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
diff --git a/test/ExecutionEngine/MCJIT/Inputs/multi-module-eh-b.ll b/test/ExecutionEngine/MCJIT/Inputs/multi-module-eh-b.ll
index d7dbb032b5d..d7beeb61cb4 100644
--- a/test/ExecutionEngine/MCJIT/Inputs/multi-module-eh-b.ll
+++ b/test/ExecutionEngine/MCJIT/Inputs/multi-module-eh-b.ll
@@ -12,13 +12,13 @@ define void @throwException_B() {
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)
diff --git a/test/ExecutionEngine/MCJIT/eh-lg-pic.ll b/test/ExecutionEngine/MCJIT/eh-lg-pic.ll
index 222196f81c4..cd4834b3f12 100644
--- a/test/ExecutionEngine/MCJIT/eh-lg-pic.ll
+++ b/test/ExecutionEngine/MCJIT/eh-lg-pic.ll
@@ -14,13 +14,13 @@ define void @throwException() {
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)
diff --git a/test/ExecutionEngine/MCJIT/eh-sm-pic.ll b/test/ExecutionEngine/MCJIT/eh-sm-pic.ll
index c73dcca5ee1..24d8b2ceb4f 100644
--- a/test/ExecutionEngine/MCJIT/eh-sm-pic.ll
+++ b/test/ExecutionEngine/MCJIT/eh-sm-pic.ll
@@ -14,13 +14,13 @@ define void @throwException() {
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)
diff --git a/test/ExecutionEngine/MCJIT/eh.ll b/test/ExecutionEngine/MCJIT/eh.ll
index 9f73e3a9937..b301b64767c 100644
--- a/test/ExecutionEngine/MCJIT/eh.ll
+++ b/test/ExecutionEngine/MCJIT/eh.ll
@@ -14,13 +14,13 @@ define void @throwException() {
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)
diff --git a/test/ExecutionEngine/MCJIT/multi-module-eh-a.ll b/test/ExecutionEngine/MCJIT/multi-module-eh-a.ll
index 8626626e75f..50ed321a0d6 100644
--- a/test/ExecutionEngine/MCJIT/multi-module-eh-a.ll
+++ b/test/ExecutionEngine/MCJIT/multi-module-eh-a.ll
@@ -16,13 +16,13 @@ define void @throwException() {
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)
diff --git a/test/ExecutionEngine/OrcMCJIT/Inputs/multi-module-eh-b.ll b/test/ExecutionEngine/OrcMCJIT/Inputs/multi-module-eh-b.ll
index d7dbb032b5d..d7beeb61cb4 100644
--- a/test/ExecutionEngine/OrcMCJIT/Inputs/multi-module-eh-b.ll
+++ b/test/ExecutionEngine/OrcMCJIT/Inputs/multi-module-eh-b.ll
@@ -12,13 +12,13 @@ define void @throwException_B() {
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)
diff --git a/test/ExecutionEngine/OrcMCJIT/eh-lg-pic.ll b/test/ExecutionEngine/OrcMCJIT/eh-lg-pic.ll
index 47674dd9cdc..936d7eebe09 100644
--- a/test/ExecutionEngine/OrcMCJIT/eh-lg-pic.ll
+++ b/test/ExecutionEngine/OrcMCJIT/eh-lg-pic.ll
@@ -14,13 +14,13 @@ define void @throwException() {
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)
diff --git a/test/ExecutionEngine/OrcMCJIT/eh-sm-pic.ll b/test/ExecutionEngine/OrcMCJIT/eh-sm-pic.ll
index c279720cdb0..02279226dd5 100644
--- a/test/ExecutionEngine/OrcMCJIT/eh-sm-pic.ll
+++ b/test/ExecutionEngine/OrcMCJIT/eh-sm-pic.ll
@@ -14,13 +14,13 @@ define void @throwException() {
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)
diff --git a/test/ExecutionEngine/OrcMCJIT/eh.ll b/test/ExecutionEngine/OrcMCJIT/eh.ll
index 2de6a517b2b..8a1b4d8f6df 100644
--- a/test/ExecutionEngine/OrcMCJIT/eh.ll
+++ b/test/ExecutionEngine/OrcMCJIT/eh.ll
@@ -14,13 +14,13 @@ define void @throwException() {
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)
diff --git a/test/ExecutionEngine/OrcMCJIT/multi-module-eh-a.ll b/test/ExecutionEngine/OrcMCJIT/multi-module-eh-a.ll
index f77cb44a878..ccde9aefe8e 100644
--- a/test/ExecutionEngine/OrcMCJIT/multi-module-eh-a.ll
+++ b/test/ExecutionEngine/OrcMCJIT/multi-module-eh-a.ll
@@ -16,13 +16,13 @@ define void @throwException() {
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)
diff --git a/test/Feature/callingconventions.ll b/test/Feature/callingconventions.ll
index 8b339d43fcd..9aafb36c757 100644
--- a/test/Feature/callingconventions.ll
+++ b/test/Feature/callingconventions.ll
@@ -25,7 +25,7 @@ define coldcc void @bar2() {
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 @@ Ok:
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 @@ Ok:
ret void
U:
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
cleanup
resume { i8*, i32 } %exn
}
diff --git a/test/Feature/calltest.ll b/test/Feature/calltest.ll
index e7d8e8d00b3..a53c3a1215a 100644
--- a/test/Feature/calltest.ll
+++ b/test/Feature/calltest.ll
@@ -10,7 +10,7 @@ define void @invoke(%FunTy* %x) {
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 @@ Next:
ret i32 %two2
Error:
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
cleanup
ret i32 -1
}
diff --git a/test/Feature/exception.ll b/test/Feature/exception.ll
index 6e18a81bcfc..7568ecfa5f7 100644
--- a/test/Feature/exception.ll
+++ b/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 @@ try.cont: ; preds = %entry, %invoke.cont
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]
diff --git a/test/Feature/seh-nounwind.ll b/test/Feature/seh-nounwind.ll
index 203471649df..2afd1004647 100644
--- a/test/Feature/seh-nounwind.ll
+++ b/test/Feature/seh-nounwind.ll
@@ -11,13 +11,13 @@ entry:
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
diff --git a/test/Instrumentation/AddressSanitizer/instrument-no-return.ll b/test/Instrumentation/AddressSanitizer/instrument-no-return.ll
index 5d5c592c3f4..2e90bfc64b2 100644
--- a/test/Instrumentation/AddressSanitizer/instrument-no-return.ll
+++ b/test/Instrumentation/AddressSanitizer/instrument-no-return.ll
@@ -29,7 +29,7 @@ entry:
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 @@ invoke.cont:
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
}
diff --git a/test/LTO/X86/linkonce_odr_func.ll b/test/LTO/X86/linkonce_odr_func.ll
index 7fa6527f47c..671b30a460c 100644
--- a/test/LTO/X86/linkonce_odr_func.ll
+++ b/test/LTO/X86/linkonce_odr_func.ll
@@ -46,7 +46,7 @@ declare void @f(void()*)
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 @@ bb1:
bb2:
ret void
clean:
- landingpad {i32, i32} personality void()* @p cleanup
+ landingpad {i32, i32} cleanup
ret void
}
diff --git a/test/Other/2008-10-15-MissingSpace.ll b/test/Other/2008-10-15-MissingSpace.ll
index bc78e84a0af..37b3f0cb94d 100644
--- a/test/Other/2008-10-15-MissingSpace.ll
+++ b/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
}
diff --git a/test/Other/2009-03-31-CallGraph.ll b/test/Other/2009-03-31-CallGraph.ll
index 1e178308464..189c408d74c 100644
--- a/test/Other/2009-03-31-CallGraph.ll
+++ b/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 @@ ok1:
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 @@ ok2:
unreachable
lpad2:
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
cleanup
unreachable
}
diff --git a/test/Transforms/ADCE/2003-09-10-UnwindInstFail.ll b/test/Transforms/ADCE/2003-09-10-UnwindInstFail.ll
index 6bbcfdb67ec..607bf2e5809 100644
--- a/test/Transforms/ADCE/2003-09-10-UnwindInstFail.ll
+++ b/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 @@ then: ; preds = %0
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
diff --git a/test/Transforms/ADCE/2005-02-17-PHI-Invoke-Crash.ll b/test/Transforms/ADCE/2005-02-17-PHI-Invoke-Crash.ll
index 4ddc2f180a2..068ad2bc1d8 100644
--- a/test/Transforms/ADCE/2005-02-17-PHI-Invoke-Crash.ll
+++ b/test/Transforms/ADCE/2005-02-17-PHI-Invoke-Crash.ll
@@ -6,7 +6,7 @@ declare void @_ZN10QByteArray6resizeEi()
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 @@ tmp.3.i.noexc: ; preds = %entry
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 @@ then.0: ; preds = %tmp.3.i.noexc
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 @@ else.0: ; preds = %tmp.3.i.noexc
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
}
diff --git a/test/Transforms/ADCE/dce_pure_invoke.ll b/test/Transforms/ADCE/dce_pure_invoke.ll
index 8e785180457..e01c9feaeb0 100644
--- a/test/Transforms/ADCE/dce_pure_invoke.ll
+++ b/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 @@ Cont: ; preds = %0
ret i32 0
Other: ; preds = %0
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
cleanup
ret i32 1
}
diff --git a/test/Transforms/ArgumentPromotion/crash.ll b/test/Transforms/ArgumentPromotion/crash.ll
index dbd343ae920..d3f412da14d 100644
--- a/test/Transforms/ArgumentPromotion/crash.ll
+++ b/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 @@ if.end432:
unreachable
for.end520:
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
cleanup
unreachable
}
diff --git a/test/Transforms/BDCE/dce-pure.ll b/test/Transforms/BDCE/dce-pure.ll
index 6a432fcc42d..a379fa4a003 100644
--- a/test/Transforms/BDCE/dce-pure.ll
+++ b/test/Transforms/BDCE/dce-pure.ll
@@ -11,7 +11,7 @@ define void @test1() {
; 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 @@ Cont: ; preds = %0
ret i32 0
Other: ; preds = %0
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
cleanup
ret i32 1
diff --git a/test/Transforms/BDCE/order.ll b/test/Transforms/BDCE/order.ll
index 301f4476ab5..728624a5f23 100644
--- a/test/Transforms/BDCE/order.ll
+++ b/test/Transforms/BDCE/order.ll
@@ -4,7 +4,7 @@ target triple = "x86_64-unknown-linux-gnu"
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 @@ lpad65.loopexit.split-lp.loopexit.split-lp:
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
diff --git a/test/Transforms/CodeExtractor/2004-03-18-InvokeHandling.ll b/test/Transforms/CodeExtractor/2004-03-18-InvokeHandling.ll
index ff5de6b73e2..fd9814c545f 100644
--- a/test/Transforms/CodeExtractor/2004-03-18-InvokeHandling.ll
+++ b/test/Transforms/CodeExtractor/2004-03-18-InvokeHandling.ll
@@ -4,7 +4,7 @@ declare i32 @_IO_getc()
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 @@ return: ; preds = %entry
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
}
diff --git a/test/Transforms/CodeExtractor/2004-11-12-InvokeExtract.ll b/test/Transforms/CodeExtractor/2004-11-12-InvokeExtract.ll
index 92603d9e634..0a83681a071 100644
--- a/test/Transforms/CodeExtractor/2004-11-12-InvokeExtract.ll
+++ b/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 @@ Cont: ; preds = %EB
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
}
diff --git a/test/Transforms/DeadArgElim/2009-03-17-MRE-Invoke.ll b/test/Transforms/DeadArgElim/2009-03-17-MRE-Invoke.ll
index fc25daca1c2..4adae850e78 100644
--- a/test/Transforms/DeadArgElim/2009-03-17-MRE-Invoke.ll
+++ b/test/Transforms/DeadArgElim/2009-03-17-MRE-Invoke.ll
@@ -5,18 +5,18 @@ define internal { i32, i32 } @foo() {
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 @@ 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
}
diff --git a/test/Transforms/FunctionAttrs/nocapture.ll b/test/Transforms/FunctionAttrs/nocapture.ll
index 55a3dc4aa35..4057b2a86e3 100644
--- a/test/Transforms/FunctionAttrs/nocapture.ll
+++ b/test/Transforms/FunctionAttrs/nocapture.ll
@@ -47,13 +47,13 @@ define i1 @c5(i32* %q, i32 %bitno) {
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
}
diff --git a/test/Transforms/GVN/2010-05-08-OneBit.ll b/test/Transforms/GVN/2010-05-08-OneBit.ll
index 0e3fa4b8a49..562b3d820d0 100644
--- a/test/Transforms/GVN/2010-05-08-OneBit.ll
+++ b/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 @@ k151.i.i: ; preds = %k133.i.i
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
diff --git a/test/Transforms/GVN/2011-09-07-TypeIdFor.ll b/test/Transforms/GVN/2011-09-07-TypeIdFor.ll
index 314b5bb113a..d6b69d3eb4e 100644
--- a/test/Transforms/GVN/2011-09-07-TypeIdFor.ll
+++ b/test/Transforms/GVN/2011-09-07-TypeIdFor.ll
@@ -17,13 +17,13 @@ declare void @__cxa_end_catch()
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
diff --git a/test/Transforms/GVN/cond_br2.ll b/test/Transforms/GVN/cond_br2.ll
index 02154a78391..baa282ec200 100644
--- a/test/Transforms/GVN/cond_br2.ll
+++ b/test/Transforms/GVN/cond_br2.ll
@@ -9,7 +9,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
%"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 @@ _ZN4llvm11SmallVectorIiLj8EED1Ev.exit21: ; preds = %invoke.cont3, %if.t
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
diff --git a/test/Transforms/GlobalOpt/cleanup-pointer-root-users.ll b/test/Transforms/GlobalOpt/cleanup-pointer-root-users.ll
index b6dfdea0610..16da5315db0 100644
--- a/test/Transforms/GlobalOpt/cleanup-pointer-root-users.ll
+++ b/test/Transforms/GlobalOpt/cleanup-pointer-root-users.ll
@@ -30,7 +30,7 @@ define void @test2() {
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 @@ bb1:
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
}
diff --git a/test/Transforms/GlobalOpt/invoke.ll b/test/Transforms/GlobalOpt/invoke.ll
index c1f499c38a3..a0f7890a985 100644
--- a/test/Transforms/GlobalOpt/invoke.ll
+++ b/test/Transforms/GlobalOpt/invoke.ll
@@ -11,7 +11,7 @@ define i32 @one() {
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 @@ bb2: ; preds = %bb
ret void
bb4: ; preds = %bb
- %tmp5 = landingpad { i8*, i32 } personality i8* undef
+ %tmp5 = landingpad { i8*, i32 }
filter [0 x i8*] zeroinitializer
unreachable
}
diff --git a/test/Transforms/IPConstantProp/return-argument.ll b/test/Transforms/IPConstantProp/return-argument.ll
index 927531b996e..0290adc4b78 100644
--- a/test/Transforms/IPConstantProp/return-argument.ll
+++ b/test/Transforms/IPConstantProp/return-argument.ll
@@ -27,7 +27,7 @@ define internal { i32, i32 } @foo(i32 %A, i32 %B) {
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 @@ OK:
br label %RET
LPAD:
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
cleanup
br label %RET
diff --git a/test/Transforms/IPConstantProp/return-constant.ll b/test/Transforms/IPConstantProp/return-constant.ll
index d89579532e7..195420d6aad 100644
--- a/test/Transforms/IPConstantProp/return-constant.ll
+++ b/test/Transforms/IPConstantProp/return-constant.ll
@@ -15,13 +15,13 @@ define i1 @caller(i1 %C) {
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
}
diff --git a/test/Transforms/IndVarSimplify/2004-04-05-InvokeCastCrash.ll b/test/Transforms/IndVarSimplify/2004-04-05-InvokeCastCrash.ll
index 0c88e83975c..06eec7dfe28 100644
--- a/test/Transforms/IndVarSimplify/2004-04-05-InvokeCastCrash.ll
+++ b/test/Transforms/IndVarSimplify/2004-04-05-InvokeCastCrash.ll
@@ -112,13 +112,13 @@ declare void @_ZNK4llvm19MachineInstrBuilder7addSImmEi()
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 @@ tmp.0.i.noexc.i: ; preds = %then.0.i
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 @@ tmp.0.i.noexc55.i: ; preds = %no_exit.i
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
diff --git a/test/Transforms/IndVarSimplify/2005-02-11-InvokeCrash.ll b/test/Transforms/IndVarSimplify/2005-02-11-InvokeCrash.ll
index a5706ca6198..926b82fdf14 100644
--- a/test/Transforms/IndVarSimplify/2005-02-11-InvokeCrash.ll
+++ b/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 @@ no_exit.i: ; preds = %no_exit.i, %invoke_cont.0
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
}
diff --git a/test/Transforms/IndVarSimplify/2005-02-17-TruncateExprCrash.ll b/test/Transforms/IndVarSimplify/2005-02-17-TruncateExprCrash.ll
index 16ad635a920..a0dac7a29cc 100644
--- a/test/Transforms/IndVarSimplify/2005-02-17-TruncateExprCrash.ll
+++ b/test/Transforms/IndVarSimplify/2005-02-17-TruncateExprCrash.ll
@@ -4,13 +4,13 @@ declare void @q_atomic_increment()
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 @@ then.2: ; preds = %endif.1
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
diff --git a/test/Transforms/IndVarSimplify/crash.ll b/test/Transforms/IndVarSimplify/crash.ll
index aa6a2ee1652..63683ff5611 100644
--- a/test/Transforms/IndVarSimplify/crash.ll
+++ b/test/Transforms/IndVarSimplify/crash.ll
@@ -62,7 +62,7 @@ declare void @__go_undefer()
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 @@ entry:
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"
diff --git a/test/Transforms/IndVarSimplify/interesting-invoke-use.ll b/test/Transforms/IndVarSimplify/interesting-invoke-use.ll
index 69bea6eaaed..131b02c3aae 100644
--- a/test/Transforms/IndVarSimplify/interesting-invoke-use.ll
+++ b/test/Transforms/IndVarSimplify/interesting-invoke-use.ll
@@ -11,7 +11,7 @@ target triple = "i386-pc-linux-gnu"
@.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 @@ bb178: ; preds = %invcont127
br label %bb123
lpad266: ; preds = %invcont129, %bb128, %bb123
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
cleanup
unreachable
}
diff --git a/test/Transforms/Inline/2003-09-14-InlineValue.ll b/test/Transforms/Inline/2003-09-14-InlineValue.ll
index 98bc08b378e..4f1f61b4c07 100644
--- a/test/Transforms/Inline/2003-09-14-InlineValue.ll
+++ b/test/Transforms/Inline/2003-09-14-InlineValue.ll
@@ -8,7 +8,7 @@ define internal i32 @Callee() {
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 @@ Ok: ; preds = %0
ret i32 %V
Bad: ; preds = %0
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
cleanup
ret i32 0
}
diff --git a/test/Transforms/Inline/2003-09-22-PHINodeInlineFail.ll b/test/Transforms/Inline/2003-09-22-PHINodeInlineFail.ll
index df0b472bb2a..9a5fcaeea7d 100644
--- a/test/Transforms/Inline/2003-09-22-PHINodeInlineFail.ll
+++ b/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 @@ LongJmpBlkPost:
LongJmpBlkPre:
%i.3 = phi i32 [ 0, %entry ]
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
cleanup
ret i32 0
}
diff --git a/test/Transforms/Inline/2003-09-22-PHINodesInExceptionDest.ll b/test/Transforms/Inline/2003-09-22-PHINodesInExceptionDest.ll
index d5416a20597..2311cdab518 100644
--- a/test/Transforms/Inline/2003-09-22-PHINodesInExceptionDest.ll
+++ b/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 @@ Call2Invoke: ; preds = %entry
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
diff --git a/test/Transforms/Inline/2003-09-22-PHINodesInNormalInvokeDest.ll b/test/Transforms/Inline/2003-09-22-PHINodesInNormalInvokeDest.ll
index 43bdd309c98..ce7d1fb3276 100644
--- a/test/Transforms/Inline/2003-09-22-PHINodesInNormalInvokeDest.ll
+++ b/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 @@ LJDecisionBB: ; preds = %else
br label %else
RethrowExcept: ; preds = %entry
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
cleanup
ret i32 0
}
diff --git a/test/Transforms/Inline/2006-11-09-InlineCGUpdate-2.ll b/test/Transforms/Inline/2006-11-09-InlineCGUpdate-2.ll
index ee5a378b187..b4d630d8e38 100644
--- a/test/Transforms/Inline/2006-11-09-InlineCGUpdate-2.ll
+++ b/test/Transforms/Inline/2006-11-09-InlineCGUpdate-2.ll
@@ -126,13 +126,13 @@ entry:
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 @@ entry:
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 @@ endif.1.i: ; preds = %then.1.i, %entry
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
diff --git a/test/Transforms/Inline/2006-11-09-InlineCGUpdate.ll b/test/Transforms/Inline/2006-11-09-InlineCGUpdate.ll
index fb5a4b512b9..8a613e534c7 100644
--- a/test/Transforms/Inline/2006-11-09-InlineCGUpdate.ll
+++ b/test/Transforms/Inline/2006-11-09-InlineCGUpdate.ll
@@ -170,14 +170,14 @@ endif.1.i: ; preds = %entry
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 @@ entry:
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
diff --git a/test/Transforms/Inline/2007-04-15-InlineEH.ll b/test/Transforms/Inline/2007-04-15-InlineEH.ll
index b114537490c..d8f94c8f005 100644
--- a/test/Transforms/Inline/2007-04-15-InlineEH.ll
+++ b/test/Transforms/Inline/2007-04-15-InlineEH.ll
@@ -12,7 +12,7 @@ entry:
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 @@ invcont67: ; preds = %invcont65
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
}
diff --git a/test/Transforms/Inline/callgraph-update.ll b/test/Transforms/Inline/callgraph-update.ll
index b96fbc39c2f..1a1799e5cfb 100644
--- a/test/Transforms/Inline/callgraph-update.ll
+++ b/test/Transforms/Inline/callgraph-update.ll
@@ -21,7 +21,7 @@ define internal fastcc void @parse() {
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 @@ invcont:
unreachable
lpad:
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
cleanup
unreachable
}
diff --git a/test/Transforms/Inline/crash.ll b/test/Transforms/Inline/crash.ll
index e2cd49c2516..ec1c867bd05 100644
--- a/test/Transforms/Inline/crash.ll
+++ b/test/Transforms/Inline/crash.ll
@@ -59,7 +59,7 @@ declare fastcc void @list_Rplacd1284() nounwind ssp
;============================
; 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 @@ invcont98:
unreachable
lpad156:
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
cleanup
unreachable
}
@@ -78,7 +78,7 @@ declare i32 @__gxx_personality_v0(...)
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 @@ bb260:
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 @@ entry:
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 @@ invcont3: ; preds = %bb1
ret void
lpad18: ; preds = %invcont3, %bb1
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
cleanup
unreachable
}
diff --git a/test/Transforms/Inline/debug-invoke.ll b/test/Transforms/Inline/debug-invoke.ll
index bb40091014c..ca407acdd65 100644
--- a/test/Transforms/Inline/debug-invoke.ll
+++ b/test/Transforms/Inline/debug-invoke.ll
@@ -17,7 +17,7 @@ define void @inl() #0 {
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 @@ cont:
ret void
lpad:
- landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ landingpad { i8*, i32 }
cleanup
ret void
}
diff --git a/test/Transforms/Inline/inline-invoke-tail.ll b/test/Transforms/Inline/inline-invoke-tail.ll
index 5fef4baee9e..f4b80653d01 100644
--- a/test/Transforms/Inline/inline-invoke-tail.ll
+++ b/test/Transforms/Inline/inline-invoke-tail.ll
@@ -10,7 +10,7 @@ define internal void @foo(i32* %p, i32* %q) {
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 @@ invcont:
ret i32 %retval
lpad:
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
catch i8* null
unreachable
}
diff --git a/test/Transforms/Inline/inline-invoke-with-asm-call.ll b/test/Transforms/Inline/inline-invoke-with-asm-call.ll
index 876f8d7455b..93bb0358055 100644
--- a/test/Transforms/Inline/inline-invoke-with-asm-call.ll
+++ b/test/Transforms/Inline/inline-invoke-with-asm-call.ll
@@ -8,7 +8,7 @@ target triple = "x86_64-apple-darwin"
; 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 @@ define void @caller() {
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
diff --git a/test/Transforms/Inline/inline_invoke.ll b/test/Transforms/Inline/inline_invoke.ll
index c53bb5aa17b..2ef216e2d38 100644
--- a/test/Transforms/Inline/inline_invoke.ll
+++ b/test/Transforms/Inline/inline_invoke.ll
@@ -28,7 +28,7 @@ declare void @__cxa_end_catch()
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 @@ invoke.cont1:
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 @@ invoke.cont2:
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:
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 @@ eh.resume:
; 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 @@ eh.resume:
; 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 @@ eh.resume:
;; 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 @@ ret:
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 @@ eh.resume:
; 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 @@ eh.resume:
; 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 @@ eh.resume:
; 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 @@ eh.resume:
;; 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:
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 @@ lpad:
;; 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:
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 @@ lpad.cont:
}
; 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 @@ lpad.cont:
;; 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:
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 @@ terminate:
}
; 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 @@ terminate:
; 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 @@ terminate:
; 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]]:
diff --git a/test/Transforms/Inline/inline_returns_twice.ll b/test/Transforms/Inline/inline_returns_twice.ll
index 36042640cc0..8a131bca749 100644
--- a/test/Transforms/Inline/inline_returns_twice.ll
+++ b/test/Transforms/Inline/inline_returns_twice.ll
@@ -37,7 +37,7 @@ entry:
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 @@ cont:
ret i32 %add
lpad:
- %lp = landingpad i32 personality i8* null cleanup
+ %lp = landingpad i32 cleanup
resume i32 %lp
}
@@ -60,7 +60,7 @@ entry:
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 @@ cont:
ret i32 %add
lpad:
- %lp = landingpad i32 personality i8* null cleanup
+ %lp = landingpad i32 cleanup
resume i32 %lp
}
diff --git a/test/Transforms/Inline/invoke-cleanup.ll b/test/Transforms/Inline/invoke-cleanup.ll
index 457ae2addeb..2750b79fbe1 100644
--- a/test/Transforms/Inline/invoke-cleanup.ll
+++ b/test/Transforms/Inline/invoke-cleanup.ll
@@ -6,13 +6,13 @@ declare void @external_func()
@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 @@ lpad:
; 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
diff --git a/test/Transforms/Inline/invoke-combine-clauses.ll b/test/Transforms/Inline/invoke-combine-clauses.ll
index 89a4cc951c7..e3788d6d643 100644
--- a/test/Transforms/Inline/invoke-combine-clauses.ll
+++ b/test/Transforms/Inline/invoke-combine-clauses.ll
@@ -12,13 +12,13 @@ declare void @abort()
; 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 @@ resume2:
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 @@ lpad:
; 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 @@ lpad:
; 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
}
diff --git a/test/Transforms/Inline/invoke-cost.ll b/test/Transforms/Inline/invoke-cost.ll
index 84d33ad5512..24f2893e90f 100644
--- a/test/Transforms/Inline/invoke-cost.ll
+++ b/test/Transforms/Inline/invoke-cost.ll
@@ -10,7 +10,7 @@ declare i8* @__cxa_begin_catch(i8*)
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 @@ cont4:
ret void
terminate.lpad:
- landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ landingpad {i8*, i32}
catch i8* null
call void @_ZSt9terminatev() noreturn nounwind
unreachable
diff --git a/test/Transforms/Inline/invoke_test-1.ll b/test/Transforms/Inline/invoke_test-1.ll
index 922351fd461..8cb6362f349 100644
--- a/test/Transforms/Inline/invoke_test-1.ll
+++ b/test/Transforms/Inline/invoke_test-1.ll
@@ -12,7 +12,7 @@ define internal void @callee() {
}
; 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 @@ cont: ; preds = %0
ret i32 0
exc: ; preds = %0
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
cleanup
ret i32 1
}
diff --git a/test/Transforms/Inline/invoke_test-2.ll b/test/Transforms/Inline/invoke_test-2.ll
index 680a5ca2542..b3119b99337 100644
--- a/test/Transforms/Inline/invoke_test-2.ll
+++ b/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 @@ cont: ; preds = %0
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 @@ cont: ; preds = %0
ret i32 %X
UnreachableExceptionHandler: ; preds = %0
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
cleanup
ret i32 -1
}
diff --git a/test/Transforms/Inline/invoke_test-3.ll b/test/Transforms/Inline/invoke_test-3.ll
index f5ce95aa516..5eabfdd417d 100644
--- a/test/Transforms/Inline/invoke_test-3.ll
+++ b/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 @@ cont: ; preds = %0
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 @@ cont: ; preds = %0
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
}
diff --git a/test/Transforms/InstCombine/2003-10-29-CallSiteResolve.ll b/test/Transforms/InstCombine/2003-10-29-CallSiteResolve.ll
index 56493e2e5e3..1fc8aa7c278 100644
--- a/test/Transforms/InstCombine/2003-10-29-CallSiteResolve.ll
+++ b/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 @@ invoke_cont: ; preds = %0
ret float* %tmp.11
X: ; preds = %0
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
cleanup
ret float* null
}
diff --git a/test/Transforms/InstCombine/2004-01-13-InstCombineInvokePHI.ll b/test/Transforms/InstCombine/2004-01-13-InstCombineInvokePHI.ll
index a086c015650..7471d8b3462 100644
--- a/test/Transforms/InstCombine/2004-01-13-InstCombineInvokePHI.ll
+++ b/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 @@ cont: ; preds = %call, %entry
ret i32 %V
N: ; preds = %call
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
cleanup
ret i32 0
}
diff --git a/test/Transforms/InstCombine/2008-05-09-SinkOfInvoke.ll b/test/Transforms/InstCombine/2008-05-09-SinkOfInvoke.ll
index 722f8f0fabb..4d9c19ff583 100644
--- a/test/Transforms/InstCombine/2008-05-09-SinkOfInvoke.ll
+++ b/test/Transforms/InstCombine/2008-05-09-SinkOfInvoke.ll
@@ -9,7 +9,7 @@ declare i32** @__ctype_toupper_loc() readnone
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 @@ invcont37: ; preds = %invcont31
ret void
lpad: ; preds = %invcont31, %invcont, %entry
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
cleanup
unreachable
}
diff --git a/test/Transforms/InstCombine/AddOverFlow.ll b/test/Transforms/InstCombine/AddOverFlow.ll
index bebfd6293f9..a341cb042cc 100644
--- a/test/Transforms/InstCombine/AddOverFlow.ll
+++ b/test/Transforms/InstCombine/AddOverFlow.ll
@@ -39,7 +39,7 @@ declare i32 @__gxx_personality_v0(...);
!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 @@ cont:
; 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 @@ cont:
; 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
}
diff --git a/test/Transforms/InstCombine/LandingPadClauses.ll b/test/Transforms/InstCombine/LandingPadClauses.ll
index 0d42f7c737f..a4d77cbe8ef 100644
--- a/test/Transforms/InstCombine/LandingPadClauses.ll
+++ b/test/Transforms/InstCombine/LandingPadClauses.ll
@@ -11,7 +11,7 @@ declare i32 @__C_specific_handler(...)
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 @@ cont.i:
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 @@ lpad.a:
; 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 @@ lpad.b:
; 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 @@ lpad.c:
; 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 @@ lpad.d:
; 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 @@ lpad.e:
; 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 @@ lpad.f:
; 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 @@ lpad.g:
; 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 @@ lpad.h:
; 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 @@ lpad.i:
; 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 @@ cont.d:
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 @@ lpad.a:
; 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 @@ lpad.b:
; 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 @@ lpad.c:
; 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 @@ lpad.d:
; 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 @@ cont.d:
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 @@ lpad.a:
; 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 @@ lpad.b:
; 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 @@ lpad.c:
; 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 @@ lpad.d:
; 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 @@ cont.d:
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 @@ lpad.a:
; 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 @@ lpad.b:
; 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 @@ lpad.c:
; CHECK-NEXT: unreachable
lpad.d:
- %d = landingpad { i8*, i32 } personality i32 (...)* @__C_specific_handler
+ %d = landingpad { i8*, i32 }
cleanup
catch i32* null
unreachable
diff --git a/test/Transforms/InstCombine/call.ll b/test/Transforms/InstCombine/call.ll
index 47ae71f37fb..ea338f0bf58 100644
--- a/test/Transforms/InstCombine/call.ll
+++ b/test/Transforms/InstCombine/call.ll
@@ -123,7 +123,7 @@ define void @test7() {
; 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 @@ invoke.cont: ; preds = %entry
unreachable
try.handler: ; preds = %entry
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
cleanup
ret i8* null
}
diff --git a/test/Transforms/InstCombine/cast.ll b/test/Transforms/InstCombine/cast.ll
index 68f86336580..7fe54ef8469 100644
--- a/test/Transforms/InstCombine/cast.ll
+++ b/test/Transforms/InstCombine/cast.ll
@@ -100,7 +100,7 @@ define void @test11(i32* %P) {
}
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 @@ invoke.cont: ; preds = %entry
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
diff --git a/test/Transforms/InstCombine/crash.ll b/test/Transforms/InstCombine/crash.ll
index 2d93ecd59bf..fbb9675c0f1 100644
--- a/test/Transforms/InstCombine/crash.ll
+++ b/test/Transforms/InstCombine/crash.ll
@@ -131,11 +131,11 @@ define i32 @test5a() {
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 @@ entry:
%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 @@ entry:
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 @@ declare void @_Unwind_Resume_or_Rethrow(i8*)
; 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 @@ invoke.cont: ; preds = %entry
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 @@ return: ; No predecessors!
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 @@ e2:
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
diff --git a/test/Transforms/InstCombine/gepphigep.ll b/test/Transforms/InstCombine/gepphigep.ll
index 5ae3171b39f..b98ea4cd115 100644
--- a/test/Transforms/InstCombine/gepphigep.ll
+++ b/test/Transforms/InstCombine/gepphigep.ll
@@ -59,7 +59,7 @@ bb:
; 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 @@ bb4:
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 @@ bb5:
; 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*
diff --git a/test/Transforms/InstCombine/invoke.ll b/test/Transforms/InstCombine/invoke.ll
index c4b58de6194..ee08ae14887 100644
--- a/test/Transforms/InstCombine/invoke.ll
+++ b/test/Transforms/InstCombine/invoke.ll
@@ -8,7 +8,7 @@ declare i8* @_Znwm(i64)
; 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 @@ invoke.cont:
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 @@ lpad:
}
; 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 @@ invoke.cont:
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 @@ lpad:
}
; 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 @@ invoke.cont:
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
diff --git a/test/Transforms/InstCombine/malloc-free-delete.ll b/test/Transforms/InstCombine/malloc-free-delete.ll
index dc04adb0696..138001ace95 100644
--- a/test/Transforms/InstCombine/malloc-free-delete.ll
+++ b/test/Transforms/InstCombine/malloc-free-delete.ll
@@ -127,7 +127,7 @@ declare i32 @__gxx_personality_v0(...)
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 @@ entry:
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
diff --git a/test/Transforms/InstCombine/objsize-64.ll b/test/Transforms/InstCombine/objsize-64.ll
index 5046724038a..866bc4f937b 100644
--- a/test/Transforms/InstCombine/objsize-64.ll
+++ b/test/Transforms/InstCombine/objsize-64.ll
@@ -18,7 +18,7 @@ define i64 @f1(i8 **%esc) {
; 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 @@ invoke.cont:
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
diff --git a/test/Transforms/InstSimplify/2011-09-05-InsertExtractValue.ll b/test/Transforms/InstSimplify/2011-09-05-InsertExtractValue.ll
index 3514b347937..885cb70007e 100644
--- a/test/Transforms/InstSimplify/2011-09-05-InsertExtractValue.ll
+++ b/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
diff --git a/test/Transforms/JumpThreading/landing-pad.ll b/test/Transforms/JumpThreading/landing-pad.ll
index 4d49db04f6a..5dcc5aa17e6 100644
--- a/test/Transforms/JumpThreading/landing-pad.ll
+++ b/test/Transforms/JumpThreading/landing-pad.ll
@@ -42,7 +42,7 @@ entry:
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 @@ invoke.cont7: ; preds = %_ZN15EditCommandImp
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 @@ _ZN1BI1DED1Ev.exit: ; preds = %lpad1, %if.then.i.i
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
}
diff --git a/test/Transforms/LCSSA/invoke-dest.ll b/test/Transforms/LCSSA/invoke-dest.ll
index 1e3f178c7e6..1523d4ff1f6 100644
--- a/test/Transforms/LCSSA/invoke-dest.ll
+++ b/test/Transforms/LCSSA/invoke-dest.ll
@@ -9,7 +9,7 @@ target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f3
@.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 @@ bb106: ; preds = %invcont105, %bb61
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
diff --git a/test/Transforms/LoopRotate/multiple-exits.ll b/test/Transforms/LoopRotate/multiple-exits.ll
index f31ed7f1c5b..f38c855b9c8 100644
--- a/test/Transforms/LoopRotate/multiple-exits.ll
+++ b/test/Transforms/LoopRotate/multiple-exits.ll
@@ -87,7 +87,7 @@ declare i32 @bar(i32)
@_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 @@ for.inc: ; preds = %for.body
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 @@ for.inc.i: ; preds = %for.body.i
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 @@ invoke.cont2.i: ; preds = %catch.i
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
diff --git a/test/Transforms/LoopSimplify/2007-10-28-InvokeCrash.ll b/test/Transforms/LoopSimplify/2007-10-28-InvokeCrash.ll
index 0534a0bf7d0..9f65d68202f 100644
--- a/test/Transforms/LoopSimplify/2007-10-28-InvokeCrash.ll
+++ b/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 @@ invcont17.normaldest: ; preds = %invcont17.normaldest917, %bb_main
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
diff --git a/test/Transforms/LoopSimplify/2011-12-14-LandingpadHeader.ll b/test/Transforms/LoopSimplify/2011-12-14-LandingpadHeader.ll
index 39471eb0d11..cb9dd4124e2 100644
--- a/test/Transforms/LoopSimplify/2011-12-14-LandingpadHeader.ll
+++ b/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 @@ entry:
; 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 @@ try.cont19: ; preds = %if.else, %entry
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
diff --git a/test/Transforms/LoopSimplify/dbg-loc.ll b/test/Transforms/LoopSimplify/dbg-loc.ll
index 22a444c983e..073319bdac3 100644
--- a/test/Transforms/LoopSimplify/dbg-loc.ll
+++ b/test/Transforms/LoopSimplify/dbg-loc.ll
@@ -47,12 +47,12 @@ for.end: ; preds = %length.exit, %entry
; 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 @@ try.cont19: ; preds = %if.else, %entry
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
}
diff --git a/test/Transforms/LoopStrengthReduce/dominate-assert.ll b/test/Transforms/LoopStrengthReduce/dominate-assert.ll
index bca234c6f3c..ff26c76b3c1 100644
--- a/test/Transforms/LoopStrengthReduce/dominate-assert.ll
+++ b/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 @@ bb3:
%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 @@ bb6:
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 @@ bb9:
}
-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 @@ bb3:
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
}
diff --git a/test/Transforms/LoopUnswitch/2011-09-26-EHCrash.ll b/test/Transforms/LoopUnswitch/2011-09-26-EHCrash.ll
index 0b7f91fee15..1a929d68573 100644
--- a/test/Transforms/LoopUnswitch/2011-09-26-EHCrash.ll
+++ b/test/Transforms/LoopUnswitch/2011-09-26-EHCrash.ll
@@ -6,7 +6,7 @@ target triple = "x86_64-apple-macosx10.7.2"
%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 @@ invoke.cont: ; preds = %delete.notnull
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
diff --git a/test/Transforms/LoopUnswitch/2012-04-30-LoopUnswitch-LPad-Crash.ll b/test/Transforms/LoopUnswitch/2012-04-30-LoopUnswitch-LPad-Crash.ll
index 223fbf18bf5..2c1847a545b 100644
--- a/test/Transforms/LoopUnswitch/2012-04-30-LoopUnswitch-LPad-Crash.ll
+++ b/test/Transforms/LoopUnswitch/2012-04-30-LoopUnswitch-LPad-Crash.ll
@@ -8,7 +8,7 @@ target triple = "x86_64-apple-macosx10.7.0"
%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 @@ invoke.cont6: ; preds = %invoke.cont4
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
diff --git a/test/Transforms/LowerInvoke/2003-12-10-Crash.ll b/test/Transforms/LowerInvoke/2003-12-10-Crash.ll
index fca8e868018..559f629ff9e 100644
--- a/test/Transforms/LowerInvoke/2003-12-10-Crash.ll
+++ b/test/Transforms/LowerInvoke/2003-12-10-Crash.ll
@@ -6,7 +6,7 @@ declare void @baz()
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 @@ invoke_cont.0: ; preds = %then
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
diff --git a/test/Transforms/LowerInvoke/lowerinvoke.ll b/test/Transforms/LowerInvoke/lowerinvoke.ll
index 05c19be7a9a..ad78df3e221 100644
--- a/test/Transforms/LowerInvoke/lowerinvoke.ll
+++ b/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 @@ cont:
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
}
diff --git a/test/Transforms/Mem2Reg/crash.ll b/test/Transforms/Mem2Reg/crash.ll
index a4a31b112ee..d7ed1dd13e8 100644
--- a/test/Transforms/Mem2Reg/crash.ll
+++ b/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 @@ bb15:
ret i32 %B
lpad86:
- %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+ %exn = landingpad {i8*, i32}
cleanup
br label %bb15
diff --git a/test/Transforms/MergeFunc/2011-02-08-RemoveEqual.ll b/test/Transforms/MergeFunc/2011-02-08-RemoveEqual.ll
index 4735ea5e61d..97e8ed5a6ed 100644
--- a/test/Transforms/MergeFunc/2011-02-08-RemoveEqual.ll
+++ b/test/Transforms/MergeFunc/2011-02-08-RemoveEqual.ll
@@ -22,7 +22,7 @@ target triple = "i386-pc-linux-gnu"
@.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 @@ bb2: ; preds = %bb1, %invcont
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 @@ return: ; preds = %bb1, %entry
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 @@ bb2: ; preds = %bb1, %invcont
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
diff --git a/test/Transforms/MergeFunc/call-and-invoke-with-ranges.ll b/test/Transforms/MergeFunc/call-and-invoke-with-ranges.ll
index 99eba5e2809..b955e3c9582 100644
--- a/test/Transforms/MergeFunc/call-and-invoke-with-ranges.ll
+++ b/test/Transforms/MergeFunc/call-and-invoke-with-ranges.ll
@@ -26,18 +26,18 @@ define i8 @call_different_range() {
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 @@ 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_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 @@ next:
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 @@ define i8 @call_with_same_range() {
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 @@ next:
ret i8 %out
lpad:
- %pad = landingpad { i8*, i32 } personality i8* undef cleanup
+ %pad = landingpad { i8*, i32 } cleanup
resume { i8*, i32 } zeroinitializer
}
diff --git a/test/Transforms/ObjCARC/basic.ll b/test/Transforms/ObjCARC/basic.ll
index ff6c69cd9ed..9fc5ad1f100 100644
--- a/test/Transforms/ObjCARC/basic.ll
+++ b/test/Transforms/ObjCARC/basic.ll
@@ -1289,7 +1289,7 @@ entry:
; 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 @@ invoke.cont23: ; preds = %if.then12
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
diff --git a/test/Transforms/ObjCARC/contract-testcases.ll b/test/Transforms/ObjCARC/contract-testcases.ll
index 74a4a7f989c..e6d34a9426f 100644
--- a/test/Transforms/ObjCARC/contract-testcases.ll
+++ b/test/Transforms/ObjCARC/contract-testcases.ll
@@ -67,12 +67,12 @@ bb7: ; preds = %bb6, %bb6, %bb5
; 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 @@ invoke.cont: ; preds = %entry
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
}
diff --git a/test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll b/test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll
index b875c3f039e..db3a780f91b 100644
--- a/test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll
+++ b/test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll
@@ -34,7 +34,7 @@ target triple = "x86_64-apple-macosx10.9.0"
@"\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 @@ eh.cont: ; preds = %entry
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
diff --git a/test/Transforms/ObjCARC/invoke.ll b/test/Transforms/ObjCARC/invoke.ll
index 5ef5184154b..06105c17397 100644
--- a/test/Transforms/ObjCARC/invoke.ll
+++ b/test/Transforms/ObjCARC/invoke.ll
@@ -18,7 +18,7 @@ declare i8* @returner()
; 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 @@ invoke.cont: ; preds = %entry
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 @@ lpad: ; preds = %entry
; 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 @@ invoke.cont: ; preds = %entry
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 @@ done:
; 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 @@ done:
; 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 @@ finally.cont: ; preds = %invoke.cont
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 @@ finally.rethrow: ; preds = %invoke.cont, %entry
; 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 @@ if.else:
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 @@ if.end:
; 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 @@ if.end:
; 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 @@ if.else:
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 @@ if.end:
; 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 @@ if.end:
; 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
diff --git a/test/Transforms/ObjCARC/path-overflow.ll b/test/Transforms/ObjCARC/path-overflow.ll
index 31f0e3b034b..21fcc86f946 100644
--- a/test/Transforms/ObjCARC/path-overflow.ll
+++ b/test/Transforms/ObjCARC/path-overflow.ll
@@ -29,7 +29,7 @@ declare i32 @__gxx_personality_sj0(...)
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 @@ bb222: ; preds = %bb20, %bb19
}
; 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 @@ if.then.i: ; preds = %invoke.cont.i
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 @@ if.then.i1981: ; preds = %invoke.cont.i1980
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 @@ if.then.i1987: ; preds = %invoke.cont.i1986
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 @@ if.then.i1999: ; preds = %invoke.cont.i1998
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 @@ if.then.i2005: ; preds = %invoke.cont.i2004
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 @@ if.then.i2011: ; preds = %invoke.cont.i2010
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 @@ invoke.cont117: ; preds = %if.then.i2011, %inv
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 @@ ehcleanup: ; preds = %lpad3, %lpad
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 @@ ehcleanup26: ; preds = %lpad20, %lpad16
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 @@ ehcleanup102: ; preds = %lpad94, %lpad.i2000
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 @@ if.then.i2035: ; preds = %invoke.cont.i2034
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 @@ if.then.i2041: ; preds = %invoke.cont.i2040
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 @@ if.then.i2053: ; preds = %invoke.cont.i2052
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 @@ if.then.i2065: ; preds = %invoke.cont.i2064
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 @@ if.then.i2077: ; preds = %invoke.cont.i2076
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 @@ if.then.i2083: ; preds = %invoke.cont.i2082
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 @@ if.then.i2089: ; preds = %invoke.cont.i2088
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 @@ if.then.i2095: ; preds = %invoke.cont.i2094
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 @@ if.then.i2101: ; preds = %invoke.cont.i2100
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 @@ invoke.cont.i2106: ; preds = %invoke.cont435
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 @@ if.then.i2113: ; preds = %invoke.cont.i2112
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 @@ if.then.i2119: ; preds = %invoke.cont.i2118
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 @@ if.then.i2125: ; preds = %invoke.cont.i2124
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 @@ if.then.i2131: ; preds = %invoke.cont.i2130
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 @@ if.then.i2137: ; preds = %invoke.cont.i2136
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 @@ if.then.i2143: ; preds = %invoke.cont.i2142
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 @@ invoke.cont.i2148: ; preds = %invoke.cont554
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 @@ invoke.cont581: ; preds = %invoke.cont572
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 @@ lpad183.body: ; preds = %lpad183, %lpad.i203
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 @@ ehcleanup239: ; preds = %lpad236.body, %lpad
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 @@ ehcleanup263: ; preds = %lpad255, %lpad252
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 @@ ehcleanup477: ; preds = %lpad425, %lpad381,
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 @@ ehcleanup560: ; preds = %lpad527, %lpad489
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 @@ eh.resume: ; preds = %lpad580, %ehcleanup
@"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 @@ if.then430: ; preds = %eh.cont
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
diff --git a/test/Transforms/ObjCARC/retain-not-declared.ll b/test/Transforms/ObjCARC/retain-not-declared.ll
index 416202222aa..f7ac908a76e 100644
--- a/test/Transforms/ObjCARC/retain-not-declared.ll
+++ b/test/Transforms/ObjCARC/retain-not-declared.ll
@@ -34,7 +34,7 @@ entry:
; 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 @@ invoke.cont102: ; preds = %invoke.cont93
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
diff --git a/test/Transforms/ObjCARC/split-backedge.ll b/test/Transforms/ObjCARC/split-backedge.ll
index 2507173f4b7..6851487ed50 100644
--- a/test/Transforms/ObjCARC/split-backedge.ll
+++ b/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 @@ invoke.cont1: ; preds = %invoke.cont
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
}
diff --git a/test/Transforms/PhaseOrdering/gdce.ll b/test/Transforms/PhaseOrdering/gdce.ll
index 6f79eb81583..fa62f92500b 100644
--- a/test/Transforms/PhaseOrdering/gdce.ll
+++ b/test/Transforms/PhaseOrdering/gdce.ll
@@ -67,7 +67,7 @@ entry:
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 @@ invoke.cont: ; preds = %entry
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
diff --git a/test/Transforms/PlaceSafepoints/invokes.ll b/test/Transforms/PlaceSafepoints/invokes.ll
index 913e148d9bc..a93e4545bc9 100644
--- a/test/Transforms/PlaceSafepoints/invokes.ll
+++ b/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 @@ normal_return:
; 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 @@ normal_return:
; 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 @@ merge:
; 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 @@ define void @gc.safepoint_poll() {
entry:
call void @do_safepoint()
ret void
-} \ No newline at end of file
+}
diff --git a/test/Transforms/PlaceSafepoints/patchable-statepoints.ll b/test/Transforms/PlaceSafepoints/patchable-statepoints.ll
index ac0aa29e504..9387f42bf0a 100644
--- a/test/Transforms/PlaceSafepoints/patchable-statepoints.ll
+++ b/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 @@ normal_return:
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 @@ normal_return:
ret void
exceptional_return:
- %landing_pad4 = landingpad {i8*, i32} personality i32 ()* @personality_function cleanup
+ %landing_pad4 = landingpad {i8*, i32} cleanup
ret void
}
diff --git a/test/Transforms/PlaceSafepoints/statepoint-calling-conventions.ll b/test/Transforms/PlaceSafepoints/statepoint-calling-conventions.ll
index e31c2aa5166..6048f63c7f7 100644
--- a/test/Transforms/PlaceSafepoints/statepoint-calling-conventions.ll
+++ b/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 @@ normal_return:
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
}
diff --git a/test/Transforms/PlaceSafepoints/statepoint-format.ll b/test/Transforms/PlaceSafepoints/statepoint-format.ll
index 328b670873e..496091f552d 100644
--- a/test/Transforms/PlaceSafepoints/statepoint-format.ll
+++ b/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 @@ normal_return:
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
}
diff --git a/test/Transforms/PruneEH/recursivetest.ll b/test/Transforms/PruneEH/recursivetest.ll
index bc002ae70d3..0b2399a9a29 100644
--- a/test/Transforms/PruneEH/recursivetest.ll
+++ b/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
}
diff --git a/test/Transforms/PruneEH/seh-nounwind.ll b/test/Transforms/PruneEH/seh-nounwind.ll
index 4b69ae4b28d..043a792eb6d 100644
--- a/test/Transforms/PruneEH/seh-nounwind.ll
+++ b/test/Transforms/PruneEH/seh-nounwind.ll
@@ -10,13 +10,13 @@ entry:
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
diff --git a/test/Transforms/PruneEH/simpletest.ll b/test/Transforms/PruneEH/simpletest.ll
index 6154a80b68a..cbc5592cfb2 100644
--- a/test/Transforms/PruneEH/simpletest.ll
+++ b/test/Transforms/PruneEH/simpletest.ll
@@ -7,7 +7,7 @@ define internal void @foo() {
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 @@ 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
}
diff --git a/test/Transforms/Reg2Mem/crash.ll b/test/Transforms/Reg2Mem/crash.ll
index 02fed94b852..52dfeaf0265 100644
--- a/test/Transforms/Reg2Mem/crash.ll
+++ b/test/Transforms/Reg2Mem/crash.ll
@@ -13,13 +13,13 @@ declare void @f4_()
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 @@ bb1: ; preds = %bb
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 @@ bb7: ; preds = %_ZN6xxxdIN12xxxyzIi
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 @@ _ZN10xxxpqdlev.exit: ; preds = %bb13, %bb12, %bb8
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
}
diff --git a/test/Transforms/RewriteStatepointsForGC/live-vector.ll b/test/Transforms/RewriteStatepointsForGC/live-vector.ll
index c49e101abe1..0a4456a6835 100644
--- a/test/Transforms/RewriteStatepointsForGC/live-vector.ll
+++ b/test/Transforms/RewriteStatepointsForGC/live-vector.ll
@@ -55,7 +55,7 @@ entry:
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 @@ normal_return: ; preds = %entry
; 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
}
diff --git a/test/Transforms/RewriteStatepointsForGC/preprocess.ll b/test/Transforms/RewriteStatepointsForGC/preprocess.ll
index 60215310af0..012fff5c9e1 100644
--- a/test/Transforms/RewriteStatepointsForGC/preprocess.ll
+++ b/test/Transforms/RewriteStatepointsForGC/preprocess.ll
@@ -40,7 +40,7 @@ unreached:
; 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 @@ normal_return: ; preds = %entry
ret void
exceptional_return: ; preds = %entry
- %landing_pad4 = landingpad { i8*, i32 } personality i32 ()* undef
+ %landing_pad4 = landingpad { i8*, i32 }
cleanup
ret void
}
diff --git a/test/Transforms/RewriteStatepointsForGC/relocate_invoke_result.ll b/test/Transforms/RewriteStatepointsForGC/relocate_invoke_result.ll
index 9c00b53dfbb..1a5289b2665 100644
--- a/test/Transforms/RewriteStatepointsForGC/relocate_invoke_result.ll
+++ b/test/Transforms/RewriteStatepointsForGC/relocate_invoke_result.ll
@@ -10,13 +10,13 @@ declare void @gc_call()
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
diff --git a/test/Transforms/RewriteStatepointsForGC/rematerialize-derived-pointers.ll b/test/Transforms/RewriteStatepointsForGC/rematerialize-derived-pointers.ll
index dc52bd88776..f04e7c797ca 100644
--- a/test/Transforms/RewriteStatepointsForGC/rematerialize-derived-pointers.ll
+++ b/test/Transforms/RewriteStatepointsForGC/rematerialize-derived-pointers.ll
@@ -137,7 +137,7 @@ entry:
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 @@ normal:
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
diff --git a/test/Transforms/SCCP/2003-08-26-InvokeHandling.ll b/test/Transforms/SCCP/2003-08-26-InvokeHandling.ll
index fb1926eca25..eb308afc0e6 100644
--- a/test/Transforms/SCCP/2003-08-26-InvokeHandling.ll
+++ b/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 @@ Inv: ; preds = %Entry
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
diff --git a/test/Transforms/SCCP/2004-11-16-DeadInvoke.ll b/test/Transforms/SCCP/2004-11-16-DeadInvoke.ll
index e7eb101c147..47d9d835656 100644
--- a/test/Transforms/SCCP/2004-11-16-DeadInvoke.ll
+++ b/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:
diff --git a/test/Transforms/SCCP/2007-05-16-InvokeCrash.ll b/test/Transforms/SCCP/2007-05-16-InvokeCrash.ll
index a5a42f1b407..7d29f6cabcb 100644
--- a/test/Transforms/SCCP/2007-05-16-InvokeCrash.ll
+++ b/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 @@ bb149: ; preds = %bb114
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
}
diff --git a/test/Transforms/SCCP/2009-01-14-IPSCCP-Invoke.ll b/test/Transforms/SCCP/2009-01-14-IPSCCP-Invoke.ll
index c05f897f1a3..f3e54804f30 100644
--- a/test/Transforms/SCCP/2009-01-14-IPSCCP-Invoke.ll
+++ b/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
diff --git a/test/Transforms/SCCP/ipsccp-basic.ll b/test/Transforms/SCCP/ipsccp-basic.ll
index c74063f3300..bf37134545e 100644
--- a/test/Transforms/SCCP/ipsccp-basic.ll
+++ b/test/Transforms/SCCP/ipsccp-basic.ll
@@ -82,7 +82,7 @@ define internal {i64,i64} @test4a() {
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 @@ A:
%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 @@ define internal {i64,i64} @test5a() {
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
}
diff --git a/test/Transforms/SLPVectorizer/X86/ordering.ll b/test/Transforms/SLPVectorizer/X86/ordering.ll
index 0fa72c94c27..dfe95ac824e 100644
--- a/test/Transforms/SLPVectorizer/X86/ordering.ll
+++ b/test/Transforms/SLPVectorizer/X86/ordering.ll
@@ -21,7 +21,7 @@ entry:
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 @@ if.then63:
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
diff --git a/test/Transforms/SLPVectorizer/X86/phi_landingpad.ll b/test/Transforms/SLPVectorizer/X86/phi_landingpad.ll
index 6d2d5e3540c..b47a6ce2a26 100644
--- a/test/Transforms/SLPVectorizer/X86/phi_landingpad.ll
+++ b/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 @@ inner:
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:
diff --git a/test/Transforms/SafeStack/escape-gep-invoke.ll b/test/Transforms/SafeStack/escape-gep-invoke.ll
index f9803722c40..8495ff985f6 100644
--- a/test/Transforms/SafeStack/escape-gep-invoke.ll
+++ b/test/Transforms/SafeStack/escape-gep-invoke.ll
@@ -9,7 +9,7 @@
; (GEP followed by an invoke)
; safestack attribute
; Requires protector.
-define i32 @foo() uwtable safestack {
+define i32 @foo() uwtable safestack personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
; CHECK: __safestack_unsafe_stack_ptr
%c = alloca %struct.pair, align 4
@@ -25,7 +25,7 @@ invoke.cont:
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
}
diff --git a/test/Transforms/SafeStack/invoke.ll b/test/Transforms/SafeStack/invoke.ll
index 10b3f982b9d..bfebc336cfd 100644
--- a/test/Transforms/SafeStack/invoke.ll
+++ b/test/Transforms/SafeStack/invoke.ll
@@ -6,7 +6,7 @@
; Addr-of a variable passed into an invoke instruction.
; safestack attribute
; Requires protector and stack restore after landing pad.
-define i32 @foo() uwtable safestack {
+define i32 @foo() uwtable safestack personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
; CHECK: %[[SP:.*]] = load i8*, i8** @__safestack_unsafe_stack_ptr
; CHECK: %[[STATICTOP:.*]] = getelementptr i8, i8* %[[SP]], i32 -16
@@ -23,7 +23,7 @@ invoke.cont:
lpad:
; CHECK: landingpad
; CHECK-NEXT: catch
- %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ %0 = landingpad { i8*, i32 }
catch i8* null
; CHECK-NEXT: store i8* %[[STATICTOP]], i8** @__safestack_unsafe_stack_ptr
ret i32 0
diff --git a/test/Transforms/ScalarRepl/2011-09-22-PHISpeculateInvoke.ll b/test/Transforms/ScalarRepl/2011-09-22-PHISpeculateInvoke.ll
index 9a24662f411..bff6566d178 100644
--- a/test/Transforms/ScalarRepl/2011-09-22-PHISpeculateInvoke.ll
+++ b/test/Transforms/ScalarRepl/2011-09-22-PHISpeculateInvoke.ll
@@ -10,7 +10,7 @@ declare void @extern_fn(i32*)
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 @@ join: ; preds = %then, %else
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
diff --git a/test/Transforms/SimplifyCFG/2003-08-05-InvokeCrash.ll b/test/Transforms/SimplifyCFG/2003-08-05-InvokeCrash.ll
index 7551e8fb747..fe3a603a042 100644
--- a/test/Transforms/SimplifyCFG/2003-08-05-InvokeCrash.ll
+++ b/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
}
diff --git a/test/Transforms/SimplifyCFG/2005-10-02-InvokeSimplify.ll b/test/Transforms/SimplifyCFG/2005-10-02-InvokeSimplify.ll
index 2ecdc95259c..c71f05bf0a3 100644
--- a/test/Transforms/SimplifyCFG/2005-10-02-InvokeSimplify.ll
+++ b/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
diff --git a/test/Transforms/SimplifyCFG/2007-11-22-InvokeNoUnwind.ll b/test/Transforms/SimplifyCFG/2007-11-22-InvokeNoUnwind.ll
index 76f41e8fc21..c38d71ccd28 100644
--- a/test/Transforms/SimplifyCFG/2007-11-22-InvokeNoUnwind.ll
+++ b/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 @@ Cont: ; preds = %0
ret i32 0
Other: ; preds = %0
- landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0
+ landingpad { i8*, i32 }
catch i8* null
ret i32 1
}
diff --git a/test/Transforms/SimplifyCFG/2010-03-30-InvokeCrash.ll b/test/Transforms/SimplifyCFG/2010-03-30-InvokeCrash.ll
index 333336de767..d545739bc74 100644
--- a/test/Transforms/SimplifyCFG/2010-03-30-InvokeCrash.ll
+++ b/test/Transforms/SimplifyCFG/2010-03-30-InvokeCrash.ll
@@ -5,7 +5,7 @@ target triple = "x86_64-unknown-linux-gnu"
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 @@ r: ; preds = %entry
ret void
u: ; preds = %entry
- %val = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0
+ %val = landingpad { i8*, i32 }
cleanup
resume { i8*, i32 } %val
}
diff --git a/test/Transforms/SimplifyCFG/2011-09-05-TrivialLPad.ll b/test/Transforms/SimplifyCFG/2011-09-05-TrivialLPad.ll
index 7558419a2eb..111434b7fcd 100644
--- a/test/Transforms/SimplifyCFG/2011-09-05-TrivialLPad.ll
+++ b/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 @@ return:
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
}
diff --git a/test/Transforms/SimplifyCFG/UnreachableEliminate.ll b/test/Transforms/SimplifyCFG/UnreachableEliminate.ll
index 8718c552c69..87872a6a8a1 100644
--- a/test/Transforms/SimplifyCFG/UnreachableEliminate.ll
+++ b/test/Transforms/SimplifyCFG/UnreachableEliminate.ll
@@ -13,7 +13,7 @@ F:
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 @@ entry:
invoke void @test2( )
to label %N unwind label %U
U:
- %res = landingpad { i8* } personality i32 (...)* @__gxx_personality_v0
+ %res = landingpad { i8* }
cleanup
unreachable
N:
diff --git a/test/Transforms/SimplifyCFG/duplicate-landingpad.ll b/test/Transforms/SimplifyCFG/duplicate-landingpad.ll
index 54028774d20..93c55f0064c 100644
--- a/test/Transforms/SimplifyCFG/duplicate-landingpad.ll
+++ b/test/Transforms/SimplifyCFG/duplicate-landingpad.ll
@@ -6,7 +6,7 @@ declare void @fn()
; 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 @@ invoke.cont:
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 @@ shared_resume:
}
; 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 @@ invoke.cont:
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 @@ shared_resume:
}
; 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 @@ invoke.cont:
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
diff --git a/test/Transforms/SimplifyCFG/invoke.ll b/test/Transforms/SimplifyCFG/invoke.ll
index 5f513ac3e6d..b7fd7d62ccf 100644
--- a/test/Transforms/SimplifyCFG/invoke.ll
+++ b/test/Transforms/SimplifyCFG/invoke.ll
@@ -10,7 +10,7 @@ declare i32 @fn()
; 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 @@ invoke.cont:
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 @@ lpad:
}
; 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 @@ invoke.cont:
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 @@ lpad:
}
; 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 @@ invoke.cont:
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 @@ lpad:
}
; 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 @@ invoke.cont:
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 @@ lpad:
}
; 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 @@ cont:
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 @@ lpad:
}
; 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 @@ invoke.cont2:
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
}
diff --git a/test/Transforms/SimplifyCFG/invoke_unwind.ll b/test/Transforms/SimplifyCFG/invoke_unwind.ll
index 435bed0c295..3b4c09d96f7 100644
--- a/test/Transforms/SimplifyCFG/invoke_unwind.ll
+++ b/test/Transforms/SimplifyCFG/invoke_unwind.ll
@@ -4,7 +4,7 @@ declare void @bar()
; 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 @@ define i32 @test1() {
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
}
diff --git a/test/Transforms/SimplifyCFG/seh-nounwind.ll b/test/Transforms/SimplifyCFG/seh-nounwind.ll
index 3845e319890..c380c6ce2ce 100644
--- a/test/Transforms/SimplifyCFG/seh-nounwind.ll
+++ b/test/Transforms/SimplifyCFG/seh-nounwind.ll
@@ -10,13 +10,13 @@ entry:
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
diff --git a/test/Transforms/SimplifyCFG/statepoint-invoke-unwind.ll b/test/Transforms/SimplifyCFG/statepoint-invoke-unwind.ll
index 8df74ed48f2..994e47eb0d6 100644
--- a/test/Transforms/SimplifyCFG/statepoint-invoke-unwind.ll
+++ b/test/Transforms/SimplifyCFG/statepoint-invoke-unwind.ll
@@ -6,7 +6,7 @@ declare i64 addrspace(1)* @gc_call()
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 @@ entry:
to label %normal unwind label %exception
exception:
- %lpad = landingpad { i8*, i32 } personality i32* ()* @fake_personality_function
+ %lpad = landingpad { i8*, i32 }
cleanup
ret i32 0
diff --git a/test/Verifier/dominates.ll b/test/Verifier/dominates.ll
index 17e2c339996..c5424bbede3 100644
--- a/test/Verifier/dominates.ll
+++ b/test/Verifier/dominates.ll
@@ -10,14 +10,14 @@ define i32 @f1(i32 %x) {
}
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 @@ bb2:
; 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:
diff --git a/test/Verifier/invoke.ll b/test/Verifier/invoke.ll
index e80cfcf830b..b56b72f84b9 100644
--- a/test/Verifier/invoke.ll
+++ b/test/Verifier/invoke.ll
@@ -29,7 +29,7 @@ declare void @llvm.trap()
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 @@ conta:
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 @@ cont:
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 @@ entry:
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
}
diff --git a/test/Verifier/range-2.ll b/test/Verifier/range-2.ll
index b7c9a6e65e6..6362cb757ed 100644
--- a/test/Verifier/range-2.ll
+++ b/test/Verifier/range-2.ll
@@ -47,7 +47,7 @@ entry:
}
; 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 @@ cont:
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
}
diff --git a/test/Verifier/statepoint.ll b/test/Verifier/statepoint.ll
index 05a3eddcc3a..2807620f79e 100644
--- a/test/Verifier/statepoint.ll
+++ b/test/Verifier/statepoint.ll
@@ -52,7 +52,7 @@ equal:
}
; 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 @@ exceptional_return:
; 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)
diff --git a/tools/verify-uselistorder/verify-uselistorder.cpp b/tools/verify-uselistorder/verify-uselistorder.cpp
index 02b7ea6fdd2..efa4bcbe1aa 100644
--- a/tools/verify-uselistorder/verify-uselistorder.cpp
+++ b/tools/verify-uselistorder/verify-uselistorder.cpp
@@ -205,6 +205,8 @@ ValueMapping::ValueMapping(const Module &M) {
map(F.getPrefixData());
if (F.hasPrologueData())
map(F.getPrologueData());
+ if (F.hasPersonalityFn())
+ map(F.getPersonalityFn());
}
// Function bodies.
@@ -474,6 +476,8 @@ static void changeUseLists(Module &M, Changer changeValueUseList) {
changeValueUseList(F.getPrefixData());
if (F.hasPrologueData())
changeValueUseList(F.getPrologueData());
+ if (F.hasPersonalityFn())
+ changeValueUseList(F.getPersonalityFn());
}
// Function bodies.
diff --git a/unittests/IR/DominatorTreeTest.cpp b/unittests/IR/DominatorTreeTest.cpp
index 6a5838e693a..146ec576dba 100644
--- a/unittests/IR/DominatorTreeTest.cpp
+++ b/unittests/IR/DominatorTreeTest.cpp
@@ -217,7 +217,7 @@ namespace llvm {
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 @@ namespace llvm {
" %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" \
diff --git a/unittests/IR/IRBuilderTest.cpp b/unittests/IR/IRBuilderTest.cpp
index e8aaaea0775..f48967751cd 100644
--- a/unittests/IR/IRBuilderTest.cpp
+++ b/unittests/IR/IRBuilderTest.cpp
@@ -104,8 +104,7 @@ TEST_F(IRBuilderTest, CreateCondBr) {
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");
}