Downgrade a tablegen warning to an error.

Ambiguous sub-register index compositions are OK as long as the backend writer
knows what he is doing.

llvm-svn: 131134
This commit is contained in:
Jakob Stoklund Olesen 2011-05-10 17:52:59 +00:00
parent 50215afd8a
commit 4028ccdbe3

View File

@ -293,14 +293,13 @@ void RegisterMaps::computeComposites() {
if (i1d->second == Reg3) {
std::pair<CompositeMap::iterator,bool> Ins =
Composite.insert(std::make_pair(IdxPair, i1d->first));
// Conflicting composition?
// Conflicting composition? Emit a warning but allow it.
if (!Ins.second && Ins.first->second != i1d->first) {
errs() << "Error: SubRegIndex " << getQualifiedName(Idx1)
errs() << "Warning: SubRegIndex " << getQualifiedName(Idx1)
<< " and " << getQualifiedName(IdxPair.second)
<< " compose ambiguously as "
<< getQualifiedName(Ins.first->second) << " or "
<< getQualifiedName(i1d->first) << "\n";
abort();
}
}
}