mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-19 06:31:18 +00:00
regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47408 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5af2f63479
commit
7990dc7633
File diff suppressed because it is too large
Load Diff
@ -344,7 +344,7 @@
|
|||||||
|
|
||||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||||
typedef union YYSTYPE
|
typedef union YYSTYPE
|
||||||
#line 952 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
|
#line 952 "/Volumes/Nanpura/mrv/llvm/lib/AsmParser/llvmAsmParser.y"
|
||||||
{
|
{
|
||||||
llvm::Module *ModuleVal;
|
llvm::Module *ModuleVal;
|
||||||
llvm::Function *FunctionVal;
|
llvm::Function *FunctionVal;
|
||||||
|
@ -1024,6 +1024,7 @@ Module *llvm::RunVMAsmParser(llvm::MemoryBuffer *MB) {
|
|||||||
// ValueRef - Unresolved reference to a definition or BB
|
// ValueRef - Unresolved reference to a definition or BB
|
||||||
%type <ValIDVal> ValueRef ConstValueRef SymbolicValueRef
|
%type <ValIDVal> ValueRef ConstValueRef SymbolicValueRef
|
||||||
%type <ValueVal> ResolvedVal // <type> <valref> pair
|
%type <ValueVal> ResolvedVal // <type> <valref> pair
|
||||||
|
%type <ValueList> ReturnedVal
|
||||||
// Tokens and types for handling constant integer values
|
// Tokens and types for handling constant integer values
|
||||||
//
|
//
|
||||||
// ESINT64VAL - A negative number within long long range
|
// ESINT64VAL - A negative number within long long range
|
||||||
@ -1459,7 +1460,7 @@ ResultTypes
|
|||||||
: Types {
|
: Types {
|
||||||
if (!UpRefs.empty())
|
if (!UpRefs.empty())
|
||||||
GEN_ERROR("Invalid upreference in type: " + (*$1)->getDescription());
|
GEN_ERROR("Invalid upreference in type: " + (*$1)->getDescription());
|
||||||
if (!(*$1)->isFirstClassType())
|
if (!(*$1)->isFirstClassType() && (*$1)->getTypeID() != Type::StructTyID)
|
||||||
GEN_ERROR("LLVM functions cannot return aggregate types");
|
GEN_ERROR("LLVM functions cannot return aggregate types");
|
||||||
$$ = $1;
|
$$ = $1;
|
||||||
}
|
}
|
||||||
@ -2523,6 +2524,16 @@ ResolvedVal : Types ValueRef {
|
|||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
ReturnedVal : ResolvedVal {
|
||||||
|
$$ = new std::vector<Value *>();
|
||||||
|
$$->push_back($1);
|
||||||
|
CHECK_FOR_ERROR
|
||||||
|
}
|
||||||
|
| ReturnedVal ',' ConstVal {
|
||||||
|
($$=$1)->push_back($3);
|
||||||
|
CHECK_FOR_ERROR
|
||||||
|
};
|
||||||
|
|
||||||
BasicBlockList : BasicBlockList BasicBlock {
|
BasicBlockList : BasicBlockList BasicBlock {
|
||||||
$$ = $1;
|
$$ = $1;
|
||||||
CHECK_FOR_ERROR
|
CHECK_FOR_ERROR
|
||||||
@ -2565,8 +2576,31 @@ InstructionList : InstructionList Inst {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
BBTerminatorInst : RET ResolvedVal { // Return with a result...
|
BBTerminatorInst :
|
||||||
$$ = new ReturnInst($2);
|
RET ReturnedVal { // Return with a result...
|
||||||
|
if($2->size() == 1)
|
||||||
|
$$ = new ReturnInst($2->back());
|
||||||
|
else {
|
||||||
|
|
||||||
|
std::vector<const Type*> Elements;
|
||||||
|
std::vector<Constant*> Vals;
|
||||||
|
for (std::vector<Value *>::iterator I = $2->begin(),
|
||||||
|
E = $2->end(); I != E; ++I) {
|
||||||
|
Value *V = *I;
|
||||||
|
Constant *C = cast<Constant>(V);
|
||||||
|
Elements.push_back(V->getType());
|
||||||
|
Vals.push_back(C);
|
||||||
|
}
|
||||||
|
|
||||||
|
const StructType *STy = StructType::get(Elements);
|
||||||
|
PATypeHolder *PTy =
|
||||||
|
new PATypeHolder(HandleUpRefs(StructType::get(Elements)));
|
||||||
|
|
||||||
|
Constant *CS = ConstantStruct::get(STy, Vals); // *$2);
|
||||||
|
$$ = new ReturnInst(CS);
|
||||||
|
delete PTy;
|
||||||
|
}
|
||||||
|
delete $2;
|
||||||
CHECK_FOR_ERROR
|
CHECK_FOR_ERROR
|
||||||
}
|
}
|
||||||
| RET VOID { // Return with no result...
|
| RET VOID { // Return with no result...
|
||||||
|
Loading…
x
Reference in New Issue
Block a user