aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-09-07 16:06:04 +0000
committerJim Grosbach <grosbach@apple.com>2011-09-07 16:06:04 +0000
commit81d2e3901eed4bd70f551df8935c9ff224ccef6f (patch)
treea27f2f89a30e8faf7ef24c376f7bf5f7436b0a4e /lib/Target/ARM/AsmParser/ARMAsmParser.cpp
parent68b859f75738ec1654aa62e7f817de8b498690aa (diff)
Better diagnostic location information for mnemonic suffices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139232 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/AsmParser/ARMAsmParser.cpp')
-rw-r--r--lib/Target/ARM/AsmParser/ARMAsmParser.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index b468d9fe47..1aa5563e5c 100644
--- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -3233,8 +3233,10 @@ bool ARMAsmParser::ParseInstruction(StringRef Name, SMLoc NameLoc,
// For now, we're only parsing Thumb1 (for the most part), so
// just ignore ".n" qualifiers. We'll use them to restrict
// matching when we do Thumb2.
- if (ExtraToken != ".n")
- Operands.push_back(ARMOperand::CreateToken(ExtraToken, NameLoc));
+ if (ExtraToken != ".n") {
+ SMLoc Loc = SMLoc::getFromPointer(NameLoc.getPointer() + Start);
+ Operands.push_back(ARMOperand::CreateToken(ExtraToken, Loc));
+ }
}
// Read the remaining operands.