[llvm-branch-commits] [llvm-branch] r119224 - /llvm/branches/Apple/whitney/utils/TableGen/AsmMatcherEmitter.cpp
Daniel Dunbar
daniel at zuster.org
Mon Nov 15 13:44:28 PST 2010
Author: ddunbar
Date: Mon Nov 15 15:44:28 2010
New Revision: 119224
URL: http://llvm.org/viewvc/llvm-project?rev=119224&view=rev
Log:
Merge r117890:
--
Author: Chris Lattner <clattner at apple.com>
Date: Mon Nov 1 02:09:21 2010 +0000
all predicates on an MnemonicAlias must be AssemblerPredicates.
Modified:
llvm/branches/Apple/whitney/utils/TableGen/AsmMatcherEmitter.cpp
Modified: llvm/branches/Apple/whitney/utils/TableGen/AsmMatcherEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/whitney/utils/TableGen/AsmMatcherEmitter.cpp?rev=119224&r1=119223&r2=119224&view=diff
==============================================================================
--- llvm/branches/Apple/whitney/utils/TableGen/AsmMatcherEmitter.cpp (original)
+++ llvm/branches/Apple/whitney/utils/TableGen/AsmMatcherEmitter.cpp Mon Nov 15 15:44:28 2010
@@ -1466,13 +1466,17 @@
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)
More information about the llvm-branch-commits
mailing list