regenerate

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47312 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2008-02-19 04:36:25 +00:00
parent 689e8b294e
commit 389056110f
3 changed files with 4591 additions and 3431 deletions

File diff suppressed because it is too large Load Diff

View File

@ -342,7 +342,7 @@
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
#line 947 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y"
#line 951 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y"
{
llvm::Module *ModuleVal;
llvm::Function *FunctionVal;

View File

@ -378,7 +378,8 @@ static Value *getExistingVal(const Type *Ty, const ValID &D) {
// Check to make sure that "Ty" is an integral type, and that our
// value will fit into the specified type...
case ValID::ConstSIntVal: // Is it a constant pool reference??
if (!ConstantInt::isValueValidForType(Ty, D.ConstPool64)) {
if (!isa<IntegerType>(Ty) ||
!ConstantInt::isValueValidForType(Ty, D.ConstPool64)) {
GenerateError("Signed integral constant '" +
itostr(D.ConstPool64) + "' is invalid for type '" +
Ty->getDescription() + "'");
@ -387,20 +388,23 @@ static Value *getExistingVal(const Type *Ty, const ValID &D) {
return ConstantInt::get(Ty, D.ConstPool64, true);
case ValID::ConstUIntVal: // Is it an unsigned const pool reference?
if (!ConstantInt::isValueValidForType(Ty, D.UConstPool64)) {
if (!ConstantInt::isValueValidForType(Ty, D.ConstPool64)) {
GenerateError("Integral constant '" + utostr(D.UConstPool64) +
"' is invalid or out of range");
return 0;
} else { // This is really a signed reference. Transmogrify.
return ConstantInt::get(Ty, D.ConstPool64, true);
}
} else {
if (isa<IntegerType>(Ty) &&
ConstantInt::isValueValidForType(Ty, D.UConstPool64))
return ConstantInt::get(Ty, D.UConstPool64);
if (!isa<IntegerType>(Ty) ||
!ConstantInt::isValueValidForType(Ty, D.ConstPool64)) {
GenerateError("Integral constant '" + utostr(D.UConstPool64) +
"' is invalid or out of range for type '" +
Ty->getDescription() + "'");
return 0;
}
// This is really a signed reference. Transmogrify.
return ConstantInt::get(Ty, D.ConstPool64, true);
case ValID::ConstFPVal: // Is it a floating point const pool reference?
if (!ConstantFP::isValueValidForType(Ty, *D.ConstPoolFP)) {
if (!Ty->isFloatingPoint() ||
!ConstantFP::isValueValidForType(Ty, *D.ConstPoolFP)) {
GenerateError("FP constant invalid for type");
return 0;
}
@ -2675,8 +2679,15 @@ BBTerminatorInst : RET ResolvedVal { // Return with a result...
if (Ty->isVarArg()) {
if (I == E)
for (; ArgI != ArgE; ++ArgI)
for (; ArgI != ArgE; ++ArgI, ++index) {
Args.push_back(ArgI->Val); // push the remaining varargs
if (ArgI->Attrs != ParamAttr::None) {
ParamAttrsWithIndex PAWI;
PAWI.index = index;
PAWI.attrs = ArgI->Attrs;
Attrs.push_back(PAWI);
}
}
} else if (I != E || ArgI != ArgE)
GEN_ERROR("Invalid number of parameters detected");
}
@ -3006,8 +3017,15 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
}
if (Ty->isVarArg()) {
if (I == E)
for (; ArgI != ArgE; ++ArgI)
for (; ArgI != ArgE; ++ArgI, ++index) {
Args.push_back(ArgI->Val); // push the remaining varargs
if (ArgI->Attrs != ParamAttr::None) {
ParamAttrsWithIndex PAWI;
PAWI.index = index;
PAWI.attrs = ArgI->Attrs;
Attrs.push_back(PAWI);
}
}
} else if (I != E || ArgI != ArgE)
GEN_ERROR("Invalid number of parameters detected");
}