From 8f74ea3fa165b63eeb4729c91c3ceccb8a9923e8 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 21 Jan 2014 07:20:05 +0000 Subject: Use ArrayRef to simplify some code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199712 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/DAGISelMatcherGen.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'utils/TableGen/DAGISelMatcherGen.cpp') diff --git a/utils/TableGen/DAGISelMatcherGen.cpp b/utils/TableGen/DAGISelMatcherGen.cpp index ed41631456..a64b180f77 100644 --- a/utils/TableGen/DAGISelMatcherGen.cpp +++ b/utils/TableGen/DAGISelMatcherGen.cpp @@ -850,8 +850,7 @@ EmitResultInstructionAsOperand(const TreePatternNode *N, "Node has no result"); AddMatcher(new EmitNodeMatcher(II.Namespace+"::"+II.TheDef->getName(), - ResultVTs.data(), ResultVTs.size(), - InstOps.data(), InstOps.size(), + ResultVTs, InstOps, NodeHasChain, TreeHasInGlue, TreeHasOutGlue, NodeHasMemRefs, NumFixedArityOperands, NextRecordedOperandNo)); @@ -907,8 +906,7 @@ void MatcherGen::EmitResultCode() { // merge them together into a token factor. This informs the generated code // what all the chained nodes are. if (!MatchedChainNodes.empty()) - AddMatcher(new EmitMergeInputChainsMatcher - (MatchedChainNodes.data(), MatchedChainNodes.size())); + AddMatcher(new EmitMergeInputChainsMatcher(MatchedChainNodes)); // Codegen the root of the result pattern, capturing the resulting values. SmallVector Ops; @@ -949,10 +947,9 @@ void MatcherGen::EmitResultCode() { // If the matched pattern covers nodes which define a glue result, emit a node // that tells the matcher about them so that it can update their results. if (!MatchedGlueResultNodes.empty()) - AddMatcher(new MarkGlueResultsMatcher(MatchedGlueResultNodes.data(), - MatchedGlueResultNodes.size())); + AddMatcher(new MarkGlueResultsMatcher(MatchedGlueResultNodes)); - AddMatcher(new CompleteMatchMatcher(Ops.data(), Ops.size(), Pattern)); + AddMatcher(new CompleteMatchMatcher(Ops, Pattern)); } -- cgit v1.2.3