diff options
| author | Adrian Prantl <aprantl@apple.com> | 2013-09-26 23:37:11 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2013-09-26 23:37:11 +0000 |
| commit | 6ac40036f152242e1bfae177614c090e1995d824 (patch) | |
| tree | b31b70c34abe8f3852e6544f8b926c4642ab4f08 /llvm/lib/MC/MCParser | |
| parent | ee969f9f274989bd55794bcff9e925663bbc5df4 (diff) | |
| download | bcm5719-llvm-6ac40036f152242e1bfae177614c090e1995d824.tar.gz bcm5719-llvm-6ac40036f152242e1bfae177614c090e1995d824.zip | |
MCParser/Debug info: Accept line number 0 as a legitimate value, since
CFE produces it to indicate artificial locations.
c.f.: DWARF standard, Table 6.2:
line -- An unsigned integer indicating a source line number. Lines are numbered beginning at 1. The compiler may emit the value 0 in cases where an instruction cannot be attributed to any source line.
llvm-svn: 191471
Diffstat (limited to 'llvm/lib/MC/MCParser')
| -rw-r--r-- | llvm/lib/MC/MCParser/AsmParser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp index e36850beb82..9854b07a6c4 100644 --- a/llvm/lib/MC/MCParser/AsmParser.cpp +++ b/llvm/lib/MC/MCParser/AsmParser.cpp @@ -2634,8 +2634,8 @@ bool AsmParser::parseDirectiveLoc() { int64_t LineNumber = 0; if (getLexer().is(AsmToken::Integer)) { LineNumber = getTok().getIntVal(); - if (LineNumber < 1) - return TokError("line number less than one in '.loc' directive"); + if (LineNumber < 0) + return TokError("line number less than zero in '.loc' directive"); Lex(); } |

