mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
implement test/Regression/TableGen/DagIntSubst.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25836 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5def058f38
commit
273d463bef
@ -68,7 +68,7 @@ static void addSuperClass(Record *SC) {
|
||||
}
|
||||
|
||||
static void setValue(const std::string &ValName,
|
||||
std::vector<unsigned> *BitList, Init *V) {
|
||||
std::vector<unsigned> *BitList, Init *V) {
|
||||
if (!V) return;
|
||||
|
||||
RecordVal *RV = CurRec->getValue(ValName);
|
||||
|
@ -554,6 +554,17 @@ Init *FieldInit::resolveReferences(Record &R, const RecordVal *RV) {
|
||||
return this;
|
||||
}
|
||||
|
||||
Init *DagInit::resolveReferences(Record &R, const RecordVal *RV) {
|
||||
std::vector<Init*> NewArgs;
|
||||
for (unsigned i = 0, e = Args.size(); i != e; ++i)
|
||||
NewArgs.push_back(Args[i]->resolveReferences(R, RV));
|
||||
|
||||
if (Args != NewArgs)
|
||||
return new DagInit(NodeTypeDef, NewArgs, ArgNames);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
void DagInit::print(std::ostream &OS) const {
|
||||
OS << "(" << NodeTypeDef->getName();
|
||||
|
@ -826,7 +826,11 @@ public:
|
||||
ArgNames.push_back(args[i].second);
|
||||
}
|
||||
}
|
||||
|
||||
DagInit(Record *D, const std::vector<Init*> &args,
|
||||
const std::vector<std::string> &argNames)
|
||||
: NodeTypeDef(D), Args(args), ArgNames(argNames) {
|
||||
}
|
||||
|
||||
virtual Init *convertInitializerTo(RecTy *Ty) {
|
||||
return Ty->convertValue(this);
|
||||
}
|
||||
@ -847,6 +851,8 @@ public:
|
||||
assert(Num < Args.size() && "Arg number out of range!");
|
||||
Args[Num] = I;
|
||||
}
|
||||
|
||||
virtual Init *resolveReferences(Record &R, const RecordVal *RV);
|
||||
|
||||
virtual void print(std::ostream &OS) const;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user