Support alignment within ParamAttrs in the I/O handling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47401 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dale Johannesen 2008-02-20 21:15:19 +00:00
parent 3738f2d59f
commit 8d1433c6fc
2 changed files with 2 additions and 1 deletions

View File

@ -1233,6 +1233,7 @@ ParamAttr : ZEROEXT { $$ = ParamAttr::ZExt; }
| NOALIAS { $$ = ParamAttr::NoAlias; }
| BYVAL { $$ = ParamAttr::ByVal; }
| NEST { $$ = ParamAttr::Nest; }
| ALIGN EUINT64VAL { $$ = $2 << 16; }
;
OptParamAttrs : /* empty */ { $$ = ParamAttr::None; }

View File

@ -119,7 +119,7 @@ static void WriteParamAttrTable(const ValueEnumerator &VE,
const ParamAttrsList *A = Attrs[i];
for (unsigned op = 0, e = A->size(); op != e; ++op) {
Record.push_back(A->getParamIndex(op));
Record.push_back((uint16_t)A->getParamAttrsAtIndex(op));
Record.push_back(A->getParamAttrsAtIndex(op));
}
Stream.EmitRecord(bitc::PARAMATTR_CODE_ENTRY, Record);