mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-23 12:45:47 +00:00
Initial support for the 'code' type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7439 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3b624625e7
commit
f05760de76
@ -151,6 +151,7 @@ bit { return BIT; }
|
||||
bits { return BITS; }
|
||||
string { return STRING; }
|
||||
list { return LIST; }
|
||||
code { return CODE; }
|
||||
|
||||
class { return CLASS; }
|
||||
def { return DEF; }
|
||||
|
@ -153,7 +153,7 @@ static void addSubClass(Record *SC, const std::vector<Init*> &TemplateArgs) {
|
||||
std::vector<SubClassRefTy> *SubClassList;
|
||||
};
|
||||
|
||||
%token INT BIT STRING BITS LIST CLASS DEF FIELD SET IN
|
||||
%token INT BIT STRING BITS LIST CODE CLASS DEF FIELD SET IN
|
||||
%token <IntVal> INTVAL
|
||||
%token <StrVal> ID STRVAL
|
||||
|
||||
@ -202,6 +202,8 @@ Type : STRING { // string type
|
||||
$$ = new IntRecTy();
|
||||
} | LIST '<' ClassID '>' { // list<x> type
|
||||
$$ = new ListRecTy($3);
|
||||
} | CODE { // code type
|
||||
$$ = new CodeRecTy();
|
||||
} | ClassID { // Record Type
|
||||
$$ = new RecordRecTy($1);
|
||||
};
|
||||
|
@ -131,6 +131,15 @@ public:
|
||||
void print(std::ostream &OS) const;
|
||||
};
|
||||
|
||||
/// CodeRecTy - 'code' - Represent an code fragment, function or method.
|
||||
///
|
||||
struct CodeRecTy : public RecTy {
|
||||
Init *convertValue(UnsetInit *UI) { return (Init*)UI; }
|
||||
|
||||
void print(std::ostream &OS) const { OS << "code"; }
|
||||
};
|
||||
|
||||
|
||||
/// RecordRecTy - '<classname>' - Represent an instance of a class, such as:
|
||||
/// (R32 X = EAX).
|
||||
///
|
||||
|
@ -151,6 +151,7 @@ bit { return BIT; }
|
||||
bits { return BITS; }
|
||||
string { return STRING; }
|
||||
list { return LIST; }
|
||||
code { return CODE; }
|
||||
|
||||
class { return CLASS; }
|
||||
def { return DEF; }
|
||||
|
@ -153,7 +153,7 @@ static void addSubClass(Record *SC, const std::vector<Init*> &TemplateArgs) {
|
||||
std::vector<SubClassRefTy> *SubClassList;
|
||||
};
|
||||
|
||||
%token INT BIT STRING BITS LIST CLASS DEF FIELD SET IN
|
||||
%token INT BIT STRING BITS LIST CODE CLASS DEF FIELD SET IN
|
||||
%token <IntVal> INTVAL
|
||||
%token <StrVal> ID STRVAL
|
||||
|
||||
@ -202,6 +202,8 @@ Type : STRING { // string type
|
||||
$$ = new IntRecTy();
|
||||
} | LIST '<' ClassID '>' { // list<x> type
|
||||
$$ = new ListRecTy($3);
|
||||
} | CODE { // code type
|
||||
$$ = new CodeRecTy();
|
||||
} | ClassID { // Record Type
|
||||
$$ = new RecordRecTy($1);
|
||||
};
|
||||
|
@ -131,6 +131,15 @@ public:
|
||||
void print(std::ostream &OS) const;
|
||||
};
|
||||
|
||||
/// CodeRecTy - 'code' - Represent an code fragment, function or method.
|
||||
///
|
||||
struct CodeRecTy : public RecTy {
|
||||
Init *convertValue(UnsetInit *UI) { return (Init*)UI; }
|
||||
|
||||
void print(std::ostream &OS) const { OS << "code"; }
|
||||
};
|
||||
|
||||
|
||||
/// RecordRecTy - '<classname>' - Represent an instance of a class, such as:
|
||||
/// (R32 X = EAX).
|
||||
///
|
||||
|
Loading…
x
Reference in New Issue
Block a user