From 9abfb0b4291e47bea6e8dd267d155003a323b070 Mon Sep 17 00:00:00 2001 From: Sanjoy Das Date: Wed, 9 Dec 2015 20:33:52 +0000 Subject: Use WeakVH to keep track of calls with operand bundles in CloneCodeInfo `CloneAndPruneIntoFromInst` can DCE instructions after cloning them into the new function, and so an AssertingVH is too strong. This change switches CloneCodeInfo to use a std::vector. llvm-svn: 255148 --- llvm/lib/Transforms/Utils/InlineFunction.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp') diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index 52bde67..9a0aabc 100644 --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -1162,7 +1162,9 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI, SmallVector OpDefs; for (auto &VH : InlinedFunctionInfo.OperandBundleCallSites) { - Instruction *I = VH; + if (!VH) continue; // instruction was DCE'd after being cloned + + Instruction *I = cast(VH); OpDefs.clear(); -- cgit v1.1