projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4a313a
)
MS inline asm: Fix null SMLoc when 'ptr' is missing after dword & co
author
Reid Kleckner
<reid@kleckner.net>
Fri, 1 Aug 2014 00:59:22 +0000
(
00:59
+0000)
committer
Reid Kleckner
<reid@kleckner.net>
Fri, 1 Aug 2014 00:59:22 +0000
(
00:59
+0000)
This improves the diagnostics from the regular assembler, but more
importantly it fixes an assertion when parsing inline assembly. Test
landing in Clang.
llvm-svn: 214468
llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
b/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
index
85de47b
..
bc13ed6
100644
(file)
--- a/
llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ b/
llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
@@
-1550,7
+1550,7
@@
std::unique_ptr<X86Operand> X86AsmParser::ParseIntelOperand() {
if (Size) {
Parser.Lex(); // Eat operand size (e.g., byte, word).
if (Tok.getString() != "PTR" && Tok.getString() != "ptr")
- return ErrorOperand(
Start
, "Expected 'PTR' or 'ptr' token!");
+ return ErrorOperand(
Tok.getLoc()
, "Expected 'PTR' or 'ptr' token!");
Parser.Lex(); // Eat ptr.
}
Start = Tok.getLoc();