regenerate

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53440 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2008-07-11 00:30:39 +00:00
parent d15990189d
commit 1913b94c11
3 changed files with 1106 additions and 1040 deletions

File diff suppressed because it is too large Load Diff

View File

@ -354,7 +354,7 @@
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
#line 953 "/Volumes/Data/Code/work/llvm2/lib/AsmParser/llvmAsmParser.y"
#line 967 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y"
{
llvm::Module *ModuleVal;
llvm::Function *FunctionVal;

View File

@ -402,6 +402,20 @@ static Value *getExistingVal(const Type *Ty, const ValID &D) {
// This is really a signed reference. Transmogrify.
return ConstantInt::get(Ty, D.ConstPool64, true);
case ValID::ConstAPInt: // Is it an unsigned const pool reference?
if (!isa<IntegerType>(Ty)) {
GenerateError("Integral constant '" + D.getName() +
"' is invalid or out of range for type '" +
Ty->getDescription() + "'");
return 0;
}
{
APSInt Tmp = *D.ConstPoolInt;
Tmp.extOrTrunc(Ty->getPrimitiveSizeInBits());
return ConstantInt::get(Tmp);
}
case ValID::ConstFPVal: // Is it a floating point const pool reference?
if (!Ty->isFloatingPoint() ||
!ConstantFP::isValueValidForType(Ty, *D.ConstPoolFP)) {
@ -2453,6 +2467,16 @@ ConstValueRef : ESINT64VAL { // A reference to a direct constant
$$ = ValID::create($1);
CHECK_FOR_ERROR
}
| ESAPINTVAL { // arbitrary precision integer constants
$$ = ValID::create(*$1, true);
delete $1;
CHECK_FOR_ERROR
}
| EUAPINTVAL { // arbitrary precision integer constants
$$ = ValID::create(*$1, false);
delete $1;
CHECK_FOR_ERROR
}
| FPVAL { // Perhaps it's an FP constant?
$$ = ValID::create($1);
CHECK_FOR_ERROR