Skip to content

Commit aa7b0f6

Browse files
committed
Use std::array (also for wasm_rethrow)
1 parent aa5fafd commit aa7b0f6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3365,7 +3365,7 @@ void SelectionDAGBuilder::visitInvoke(const InvokeInst &I) {
33653365
// lower it to a DAG node here.
33663366
case Intrinsic::wasm_throw: {
33673367
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
3368-
SmallVector<SDValue, 8> Ops = {
3368+
std::array<SDValue, 4> Ops = {
33693369
getControlRoot(), // inchain for the terminator node
33703370
DAG.getTargetConstant(Intrinsic::wasm_throw, getCurSDLoc(),
33713371
TLI.getPointerTy(DAG.getDataLayout())),
@@ -3377,12 +3377,11 @@ void SelectionDAGBuilder::visitInvoke(const InvokeInst &I) {
33773377
break;
33783378
}
33793379
case Intrinsic::wasm_rethrow: {
3380-
SmallVector<SDValue, 8> Ops;
3381-
Ops.push_back(getControlRoot()); // inchain for the terminator node
33823380
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
3383-
Ops.push_back(
3381+
std::array<SDValue, 2> Ops = {
3382+
getControlRoot(), // inchain for the terminator node
33843383
DAG.getTargetConstant(Intrinsic::wasm_rethrow, getCurSDLoc(),
3385-
TLI.getPointerTy(DAG.getDataLayout())));
3384+
TLI.getPointerTy(DAG.getDataLayout()))};
33863385
SDVTList VTs = DAG.getVTList(ArrayRef<EVT>({MVT::Other})); // outchain
33873386
DAG.setRoot(DAG.getNode(ISD::INTRINSIC_VOID, getCurSDLoc(), VTs, Ops));
33883387
break;

0 commit comments

Comments
 (0)