diff options
| author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-12-09 20:33:52 +0000 |
|---|---|---|
| committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-12-09 20:33:52 +0000 |
| commit | 9abfb0b4291e47bea6e8dd267d155003a323b070 (patch) | |
| tree | 11ecea8588a6cd4074813b2cd4e0c2242fd94207 /llvm/lib | |
| parent | 1f8fd888735ed94f796d3f16e192471813207371 (diff) | |
| download | bcm5719-llvm-9abfb0b4291e47bea6e8dd267d155003a323b070.tar.gz bcm5719-llvm-9abfb0b4291e47bea6e8dd267d155003a323b070.zip | |
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<WeakVH>.
llvm-svn: 255148
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Utils/InlineFunction.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index 52bde6797db..9a0aabc38a5 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<OperandBundleDef, 2> OpDefs; for (auto &VH : InlinedFunctionInfo.OperandBundleCallSites) { - Instruction *I = VH; + if (!VH) continue; // instruction was DCE'd after being cloned + + Instruction *I = cast<Instruction>(VH); OpDefs.clear(); |

