mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Validate that the input to 'Pat' patterns is sane.
llvm-svn: 24393
This commit is contained in:
parent
789cdc4b29
commit
6b83dcf750
@ -1212,6 +1212,14 @@ void DAGISelEmitter::ParsePatterns() {
|
||||
// never do anything with this pattern: report it to the user.
|
||||
if (!Pattern->InferAllTypes())
|
||||
Pattern->error("Could not infer all types in pattern!");
|
||||
|
||||
// Validate that the input pattern is correct.
|
||||
{
|
||||
std::map<std::string, TreePatternNode*> InstInputs;
|
||||
std::map<std::string, Record*> InstResults;
|
||||
FindPatternInputsAndOutputs(Pattern, Pattern->getOnlyTree(),
|
||||
InstInputs, InstResults);
|
||||
}
|
||||
|
||||
ListInit *LI = Patterns[i]->getValueAsListInit("ResultInstrs");
|
||||
if (LI->getSize() == 0) continue; // no pattern.
|
||||
|
Loading…
Reference in New Issue
Block a user