diff options
author | Chris Lattner <sabre@nondot.org> | 2010-11-01 02:09:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-11-01 02:09:21 +0000 |
commit | 4a74ee7203d119232d9c6df33946c01611e433f8 (patch) | |
tree | 0d39112423d982095934f5737bb78b0ab26afed7 /utils | |
parent | 1de88235781c45c0afc0c7500d65b59775196c4c (diff) | |
download | external_llvm-4a74ee7203d119232d9c6df33946c01611e433f8.zip external_llvm-4a74ee7203d119232d9c6df33946c01611e433f8.tar.gz external_llvm-4a74ee7203d119232d9c6df33946c01611e433f8.tar.bz2 |
all predicates on an MnemonicAlias must be AssemblerPredicates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117890 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/AsmMatcherEmitter.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/utils/TableGen/AsmMatcherEmitter.cpp b/utils/TableGen/AsmMatcherEmitter.cpp index 04c9472..c047a5d 100644 --- a/utils/TableGen/AsmMatcherEmitter.cpp +++ b/utils/TableGen/AsmMatcherEmitter.cpp @@ -1466,13 +1466,17 @@ static std::string GetAliasRequiredFeatures(Record *R, std::string Result; unsigned NumFeatures = 0; for (unsigned i = 0, e = ReqFeatures.size(); i != e; ++i) { - if (SubtargetFeatureInfo *F = Info.getSubtargetFeature(ReqFeatures[i])) { - if (NumFeatures) - Result += '|'; + SubtargetFeatureInfo *F = Info.getSubtargetFeature(ReqFeatures[i]); - Result += F->getEnumName(); - ++NumFeatures; - } + if (F == 0) + throw TGError(R->getLoc(), "Predicate '" + ReqFeatures[i]->getName() + + "' is not marked as an AssemblerPredicate!"); + + if (NumFeatures) + Result += '|'; + + Result += F->getEnumName(); + ++NumFeatures; } if (NumFeatures > 1) |