Fix some unnoticed/unwanted behavior change from r222319.

The ARM assembler allows register alias redefinitions as long as it
targets the same register. r222319 broke that. In the AArch64 case
it would just produce a new warning, but in the ARM case it would
error out on previously accepted assembler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228109 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Frederic Riss
2015-02-04 03:10:03 +00:00
parent 8fa9947e4d
commit 1638ca5493
4 changed files with 8 additions and 3 deletions

View File

@@ -9010,7 +9010,7 @@ bool ARMAsmParser::parseDirectiveReq(StringRef Name, SMLoc L) {
Parser.Lex(); // Consume the EndOfStatement
if (!RegisterReqs.insert(std::make_pair(Name, Reg)).second) {
if (RegisterReqs.insert(std::make_pair(Name, Reg)).first->second != Reg) {
Error(SRegLoc, "redefinition of '" + Name + "' does not match original.");
return false;
}