diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2017-07-26 19:15:29 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2017-07-26 19:15:29 +0000 |
commit | 081ffe2ff230840bc428aaf917be8d5dba108ea0 (patch) | |
tree | d0c7cb79e887e4a8b53a5631530d714f2c25e9c5 /llvm/lib/CodeGen | |
parent | ea06e6e86558e3347b9abac5188b16140733c3de (diff) | |
download | bcm5719-llvm-081ffe2ff230840bc428aaf917be8d5dba108ea0.tar.gz bcm5719-llvm-081ffe2ff230840bc428aaf917be8d5dba108ea0.zip |
Change CallLoweringInfo::CS to be an ImmutableCallSite instead of a pointer. NFCI.
This was a use-after-free waiting to happen.
llvm-svn: 309159
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 41c3f5f235e..82b0caf0c11 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -6068,7 +6068,7 @@ SelectionDAGBuilder::lowerInvokable(TargetLowering::CallLoweringInfo &CLI, if (MF.hasEHFunclets()) { assert(CLI.CS); WinEHFuncInfo *EHInfo = DAG.getMachineFunction().getWinEHFuncInfo(); - EHInfo->addIPToStateRange(cast<InvokeInst>(CLI.CS->getInstruction()), + EHInfo->addIPToStateRange(cast<InvokeInst>(CLI.CS.getInstruction()), BeginLabel, EndLabel); } else { MF.addInvoke(FuncInfo.MBBMap[EHPadBB], BeginLabel, EndLabel); @@ -8135,8 +8135,7 @@ TargetLowering::LowerCallTo(TargetLowering::CallLoweringInfo &CLI) const { } getCopyToParts(CLI.DAG, CLI.DL, Op, &Parts[0], NumParts, PartVT, - CLI.CS ? CLI.CS->getInstruction() : nullptr, ExtendKind, - true); + CLI.CS.getInstruction(), ExtendKind, true); for (unsigned j = 0; j != NumParts; ++j) { // if it isn't first piece, alignment must be 1 |