mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-03 09:57:24 +00:00
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
This commit is contained in:
parent
114828ff6a
commit
b8d4a7c18d
@ -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();
|
||||
}
|
||||
|
||||
|
@ -6,3 +6,4 @@
|
||||
.loc 1 2
|
||||
.loc 1 2 3
|
||||
.loc 1 2 discriminator 1
|
||||
.loc 1 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user