From d0b82b301d700217a716526f9329bb031e0d6578 Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Wed, 7 Mar 2007 16:25:09 +0000 Subject: Refactoring of formal parameter flags. Enable properly use of zext/sext/aext stuff. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35008 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/CallingConvEmitter.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'utils/TableGen/CallingConvEmitter.cpp') diff --git a/utils/TableGen/CallingConvEmitter.cpp b/utils/TableGen/CallingConvEmitter.cpp index 97eeeb3527..ae7dc91fc7 100644 --- a/utils/TableGen/CallingConvEmitter.cpp +++ b/utils/TableGen/CallingConvEmitter.cpp @@ -123,8 +123,12 @@ void CallingConvEmitter::EmitAction(Record *Action, } else if (Action->isSubClassOf("CCPromoteToType")) { Record *DestTy = Action->getValueAsDef("DestTy"); O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n"; - O << IndentStr << "LocInfo = (ArgFlags & SDISelParamFlags::Signed) ? \n" - << IndentStr << IndentStr << "CCValAssign::SExt : CCValAssign::ZExt;\n"; + O << IndentStr << "if (ArgFlags & ISD::ParamFlags::SExt)\n" + << IndentStr << IndentStr << "LocInfo = CCValAssign::SExt;\n" + << IndentStr << "else if (ArgFlags & ISD::ParamFlags::ZExt)\n" + << IndentStr << IndentStr << "LocInfo = CCValAssign::ZExt;\n" + << IndentStr << "else\n" + << IndentStr << IndentStr << "LocInfo = CCValAssign::AExt;\n"; } else { Action->dump(); throw "Unknown CCAction!"; -- cgit v1.2.3