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 | deac137da710cd8566b857ee9d1e182d4fd35932 (patch) | |
tree | d0371e668bbe1d5d9a737c188076c3092721f69e /lib/MC | |
parent | 1327c089221da78b1bfd61067162023e520085ed (diff) | |
download | external_llvm-deac137da710cd8566b857ee9d1e182d4fd35932.zip external_llvm-deac137da710cd8566b857ee9d1e182d4fd35932.tar.gz external_llvm-deac137da710cd8566b857ee9d1e182d4fd35932.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191471 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC')
-rw-r--r-- | lib/MC/MCParser/AsmParser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp index e36850b..9854b07 100644 --- a/lib/MC/MCParser/AsmParser.cpp +++ b/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(); } |