X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FSelectionDAG%2FCallingConvLower.cpp;h=5987e0cdd5b3e7b5920fdfd0fd36c3714a20ae17;hb=c7fcfa07d9c358e5fe20cf1da82f6b60a862920d;hp=4788b15d95947a09c3a7f8303180d140107dd200;hpb=c89d2feb35560883688e43b553b8e94e7cd371de;p=oota-llvm.git diff --git a/lib/CodeGen/SelectionDAG/CallingConvLower.cpp b/lib/CodeGen/SelectionDAG/CallingConvLower.cpp index 4788b15d959..5987e0cdd5b 100644 --- a/lib/CodeGen/SelectionDAG/CallingConvLower.cpp +++ b/lib/CodeGen/SelectionDAG/CallingConvLower.cpp @@ -107,7 +107,7 @@ void CCState::AnalyzeCallOperands(SDNode *TheCall, CCAssignFn Fn) { /// AnalyzeCallOperands - Same as above except it takes vectors of types /// and argument flags. -void CCState::AnalyzeCallOperands(SmallVectorImpl ArgVTs, +void CCState::AnalyzeCallOperands(SmallVectorImpl &ArgVTs, SmallVectorImpl &Flags, CCAssignFn Fn) { unsigned NumOps = ArgVTs.size(); @@ -134,3 +134,13 @@ void CCState::AnalyzeCallResult(SDNode *TheCall, CCAssignFn Fn) { } } } + +/// AnalyzeCallResult - Same as above except it's specialized for calls which +/// produce a single value. +void CCState::AnalyzeCallResult(MVT VT, CCAssignFn Fn) { + if (Fn(0, VT, VT, CCValAssign::Full, ISD::ArgFlagsTy(), *this)) { + cerr << "Call result has unhandled type " + << VT.getMVTString() << "\n"; + abort(); + } +}