mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
catch unnamed inputs
llvm-svn: 23360
This commit is contained in:
parent
f749a0ef7c
commit
a6a0d51065
@ -631,7 +631,15 @@ void DAGISelEmitter::ParseAndResolvePatternFragments(std::ostream &OS) {
|
|||||||
static void HandleUse(TreePattern *I, TreePatternNode *Pat,
|
static void HandleUse(TreePattern *I, TreePatternNode *Pat,
|
||||||
std::map<std::string, TreePatternNode*> &InstInputs) {
|
std::map<std::string, TreePatternNode*> &InstInputs) {
|
||||||
// No name -> not interesting.
|
// No name -> not interesting.
|
||||||
if (Pat->getName().empty()) return;
|
if (Pat->getName().empty()) {
|
||||||
|
if (Pat->isLeaf()) {
|
||||||
|
DefInit *DI = dynamic_cast<DefInit*>(Pat->getLeafValue());
|
||||||
|
if (DI && DI->getDef()->isSubClassOf("RegisterClass"))
|
||||||
|
I->error("Input " + DI->getDef()->getName() + " must be named!");
|
||||||
|
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Record *Rec;
|
Record *Rec;
|
||||||
if (Pat->isLeaf()) {
|
if (Pat->isLeaf()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user