mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
Allow types to be omitted in output patterns.
This syntax is now preferred: def : Pat<(subc i32:$b, i32:$c), (SUBCCrr $b, $c)>; There is no reason to repeat the types in the output pattern. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177844 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1866,6 +1866,16 @@ TreePatternNode *TreePattern::ParseTreePattern(Init *TheInit, StringRef OpName){
|
||||
return Res;
|
||||
}
|
||||
|
||||
// ?:$name or just $name.
|
||||
if (TheInit == UnsetInit::get()) {
|
||||
if (OpName.empty())
|
||||
error("'?' argument requires a name to match with operand list");
|
||||
TreePatternNode *Res = new TreePatternNode(TheInit, 1);
|
||||
Args.push_back(OpName);
|
||||
Res->setName(OpName);
|
||||
return Res;
|
||||
}
|
||||
|
||||
if (IntInit *II = dyn_cast<IntInit>(TheInit)) {
|
||||
if (!OpName.empty())
|
||||
error("Constant int argument should not have a name!");
|
||||
|
Reference in New Issue
Block a user