diff options
author | Evan Cheng <evan.cheng@apple.com> | 2006-10-11 21:02:01 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2006-10-11 21:02:01 +0000 |
commit | 94b3040fef9475c74b877fb32cb45200cea273bb (patch) | |
tree | 7e8fa9cab9871b355dfc7d14071b9ad4803d6018 /utils/TableGen/CodeGenTarget.cpp | |
parent | 7aed46c25b9c1527b4112e71060f35c4f9c6b024 (diff) |
Added properties such as SDNPHasChain to ComplexPattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30890 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenTarget.cpp')
-rw-r--r-- | utils/TableGen/CodeGenTarget.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp index 8159ae7bd7..f5595d365f 100644 --- a/utils/TableGen/CodeGenTarget.cpp +++ b/utils/TableGen/CodeGenTarget.cpp @@ -362,6 +362,20 @@ ComplexPattern::ComplexPattern(Record *R) { NumOperands = R->getValueAsInt("NumOperands"); SelectFunc = R->getValueAsString("SelectFunc"); RootNodes = R->getValueAsListOfDefs("RootNodes"); + + // Parse the properties. + Properties = 0; + std::vector<Record*> PropList = R->getValueAsListOfDefs("Properties"); + for (unsigned i = 0, e = PropList.size(); i != e; ++i) + if (PropList[i]->getName() == "SDNPHasChain") { + Properties |= 1 << SDNPHasChain; + } else if (PropList[i]->getName() == "SDNPOptInFlag") { + Properties |= 1 << SDNPOptInFlag; + } else { + std::cerr << "Unsupported SD Node property '" << PropList[i]->getName() + << "' on ComplexPattern '" << R->getName() << "'!\n"; + exit(1); + } } //===----------------------------------------------------------------------===// |