[CodeView] Fix dumping the is_stmt bit from the line table

Bug pointed out by George Rimar.

llvm-svn: 259205
This commit is contained in:
Reid Kleckner 2016-01-29 16:39:04 +00:00
parent 141897aa00
commit 884e80edd3
6 changed files with 45 additions and 45 deletions

View File

@ -84,17 +84,17 @@
; OBJ32-NEXT: +0x0 [
; OBJ32-NEXT: LineNumberStart: 4
; OBJ32-NEXT: LineNumberEndDelta: 0
; OBJ32-NEXT: IsStatement: Yes
; OBJ32-NEXT: IsStatement: No
; OBJ32-NEXT: ]
; OBJ32-NEXT: +0x0 [
; OBJ32-NEXT: LineNumberStart: 5
; OBJ32-NEXT: LineNumberEndDelta: 0
; OBJ32-NEXT: IsStatement: Yes
; OBJ32-NEXT: IsStatement: No
; OBJ32-NEXT: ]
; OBJ32-NEXT: +0x5 [
; OBJ32-NEXT: LineNumberStart: 6
; OBJ32-NEXT: LineNumberEndDelta: 0
; OBJ32-NEXT: IsStatement: Yes
; OBJ32-NEXT: IsStatement: No
; OBJ32-NEXT: ]
; OBJ32-NEXT: ]
@ -171,22 +171,22 @@
; OBJ64-NEXT: +0x0 [
; OBJ64-NEXT: LineNumberStart: 3
; OBJ64-NEXT: LineNumberEndDelta: 0
; OBJ64-NEXT: IsStatement: Yes
; OBJ64-NEXT: IsStatement: No
; OBJ64-NEXT: ]
; OBJ64-NEXT: +0x4 [
; OBJ64-NEXT: LineNumberStart: 4
; OBJ64-NEXT: LineNumberEndDelta: 0
; OBJ64-NEXT: IsStatement: Yes
; OBJ64-NEXT: IsStatement: No
; OBJ64-NEXT: ]
; OBJ64-NEXT: +0x4 [
; OBJ64-NEXT: LineNumberStart: 5
; OBJ64-NEXT: LineNumberEndDelta: 0
; OBJ64-NEXT: IsStatement: Yes
; OBJ64-NEXT: IsStatement: No
; OBJ64-NEXT: ]
; OBJ64-NEXT: +0x9 [
; OBJ64-NEXT: LineNumberStart: 6
; OBJ64-NEXT: LineNumberEndDelta: 0
; OBJ64-NEXT: IsStatement: Yes
; OBJ64-NEXT: IsStatement: No
; OBJ64-NEXT: ]
; OBJ64-NEXT: ]
; OBJ64-NEXT: ]

View File

@ -89,7 +89,7 @@
; OBJ32-NEXT: +0x0 [
; OBJ32-NEXT: LineNumberStart: 1
; OBJ32-NEXT: LineNumberEndDelta: 0
; OBJ32-NEXT: IsStatement: Yes
; OBJ32-NEXT: IsStatement: No
; OBJ32-NEXT: ]
; OBJ32-NEXT: ]
; OBJ32-NEXT: FilenameSegment [
@ -97,7 +97,7 @@
; OBJ32-NEXT: +0x5 [
; OBJ32-NEXT: LineNumberStart: 2
; OBJ32-NEXT: LineNumberEndDelta: 0
; OBJ32-NEXT: IsStatement: Yes
; OBJ32-NEXT: IsStatement: No
; OBJ32-NEXT: ]
; OBJ32-NEXT: ]
; OBJ32-NEXT: FilenameSegment [
@ -105,12 +105,12 @@
; OBJ32-NEXT: +0xA [
; OBJ32-NEXT: LineNumberStart: 7
; OBJ32-NEXT: LineNumberEndDelta: 0
; OBJ32-NEXT: IsStatement: Yes
; OBJ32-NEXT: IsStatement: No
; OBJ32-NEXT: ]
; OBJ32-NEXT: +0xF [
; OBJ32-NEXT: LineNumberStart: 8
; OBJ32-NEXT: LineNumberEndDelta: 0
; OBJ32-NEXT: IsStatement: Yes
; OBJ32-NEXT: IsStatement: No
; OBJ32-NEXT: ]
; OBJ32-NEXT: ]
; OBJ32-NEXT: ]
@ -190,7 +190,7 @@
; OBJ64-NEXT: +0x0 [
; OBJ64-NEXT: LineNumberStart: 3
; OBJ64-NEXT: LineNumberEndDelta: 0
; OBJ64-NEXT: IsStatement: Yes
; OBJ64-NEXT: IsStatement: No
; OBJ64-NEXT: ]
; OBJ64-NEXT: ]
; OBJ64-NEXT: FilenameSegment [
@ -198,7 +198,7 @@
; OBJ64-NEXT: +0x4 [
; OBJ64-NEXT: LineNumberStart: 1
; OBJ64-NEXT: LineNumberEndDelta: 0
; OBJ64-NEXT: IsStatement: Yes
; OBJ64-NEXT: IsStatement: No
; OBJ64-NEXT: ]
; OBJ64-NEXT: ]
; OBJ64-NEXT: FilenameSegment [
@ -206,7 +206,7 @@
; OBJ64-NEXT: +0x9 [
; OBJ64-NEXT: LineNumberStart: 2
; OBJ64-NEXT: LineNumberEndDelta: 0
; OBJ64-NEXT: IsStatement: Yes
; OBJ64-NEXT: IsStatement: No
; OBJ64-NEXT: ]
; OBJ64-NEXT: ]
; OBJ64-NEXT: FilenameSegment [
@ -214,12 +214,12 @@
; OBJ64-NEXT: +0xE [
; OBJ64-NEXT: LineNumberStart: 7
; OBJ64-NEXT: LineNumberEndDelta: 0
; OBJ64-NEXT: IsStatement: Yes
; OBJ64-NEXT: IsStatement: No
; OBJ64-NEXT: ]
; OBJ64-NEXT: +0x13 [
; OBJ64-NEXT: LineNumberStart: 8
; OBJ64-NEXT: LineNumberEndDelta: 0
; OBJ64-NEXT: IsStatement: Yes
; OBJ64-NEXT: IsStatement: No
; OBJ64-NEXT: ]
; OBJ64-NEXT: ]
; OBJ64-NEXT: ]

View File

@ -191,14 +191,14 @@
; OBJ32-NEXT: +0x0 [
; OBJ32-NEXT: LineNumberStart: 4
; OBJ32-NEXT: LineNumberEndDelta: 0
; OBJ32-NEXT: IsStatement: Yes
; OBJ32-NEXT: IsStatement: No
; OBJ32-NEXT: ColStart: 42
; OBJ32-NEXT: ColEnd: 0
; OBJ32-NEXT: ]
; OBJ32-NEXT: +0x5 [
; OBJ32-NEXT: LineNumberStart: 5
; OBJ32-NEXT: LineNumberEndDelta: 0
; OBJ32-NEXT: IsStatement: Yes
; OBJ32-NEXT: IsStatement: No
; OBJ32-NEXT: ColStart: 43
; OBJ32-NEXT: ColEnd: 0
; OBJ32-NEXT: ]
@ -213,14 +213,14 @@
; OBJ32-NEXT: +0x0 [
; OBJ32-NEXT: LineNumberStart: 8
; OBJ32-NEXT: LineNumberEndDelta: 0
; OBJ32-NEXT: IsStatement: Yes
; OBJ32-NEXT: IsStatement: No
; OBJ32-NEXT: ColStart: 52
; OBJ32-NEXT: ColEnd: 0
; OBJ32-NEXT: ]
; OBJ32-NEXT: +0x5 [
; OBJ32-NEXT: LineNumberStart: 9
; OBJ32-NEXT: LineNumberEndDelta: 0
; OBJ32-NEXT: IsStatement: Yes
; OBJ32-NEXT: IsStatement: No
; OBJ32-NEXT: ColStart: 53
; OBJ32-NEXT: ColEnd: 0
; OBJ32-NEXT: ]
@ -235,28 +235,28 @@
; OBJ32-NEXT: +0x0 [
; OBJ32-NEXT: LineNumberStart: 12
; OBJ32-NEXT: LineNumberEndDelta: 0
; OBJ32-NEXT: IsStatement: Yes
; OBJ32-NEXT: IsStatement: No
; OBJ32-NEXT: ColStart: 62
; OBJ32-NEXT: ColEnd: 0
; OBJ32-NEXT: ]
; OBJ32-NEXT: +0x5 [
; OBJ32-NEXT: LineNumberStart: 13
; OBJ32-NEXT: LineNumberEndDelta: 0
; OBJ32-NEXT: IsStatement: Yes
; OBJ32-NEXT: IsStatement: No
; OBJ32-NEXT: ColStart: 63
; OBJ32-NEXT: ColEnd: 0
; OBJ32-NEXT: ]
; OBJ32-NEXT: +0xA [
; OBJ32-NEXT: LineNumberStart: 14
; OBJ32-NEXT: LineNumberEndDelta: 0
; OBJ32-NEXT: IsStatement: Yes
; OBJ32-NEXT: IsStatement: No
; OBJ32-NEXT: ColStart: 72
; OBJ32-NEXT: ColEnd: 0
; OBJ32-NEXT: ]
; OBJ32-NEXT: +0xF [
; OBJ32-NEXT: LineNumberStart: 15
; OBJ32-NEXT: LineNumberEndDelta: 0
; OBJ32-NEXT: IsStatement: Yes
; OBJ32-NEXT: IsStatement: No
; OBJ32-NEXT: ColStart: 73
; OBJ32-NEXT: ColEnd: 0
; OBJ32-NEXT: ]
@ -447,21 +447,21 @@
; OBJ64-NEXT: +0x0 [
; OBJ64-NEXT: LineNumberStart: 3
; OBJ64-NEXT: LineNumberEndDelta: 0
; OBJ64-NEXT: IsStatement: Yes
; OBJ64-NEXT: IsStatement: No
; OBJ64-NEXT: ColStart: 0
; OBJ64-NEXT: ColEnd: 0
; OBJ64-NEXT: ]
; OBJ64-NEXT: +0x4 [
; OBJ64-NEXT: LineNumberStart: 4
; OBJ64-NEXT: LineNumberEndDelta: 0
; OBJ64-NEXT: IsStatement: Yes
; OBJ64-NEXT: IsStatement: No
; OBJ64-NEXT: ColStart: 42
; OBJ64-NEXT: ColEnd: 0
; OBJ64-NEXT: ]
; OBJ64-NEXT: +0x9 [
; OBJ64-NEXT: LineNumberStart: 5
; OBJ64-NEXT: LineNumberEndDelta: 0
; OBJ64-NEXT: IsStatement: Yes
; OBJ64-NEXT: IsStatement: No
; OBJ64-NEXT: ColStart: 43
; OBJ64-NEXT: ColEnd: 0
; OBJ64-NEXT: ]
@ -476,21 +476,21 @@
; OBJ64-NEXT: +0x0 [
; OBJ64-NEXT: LineNumberStart: 7
; OBJ64-NEXT: LineNumberEndDelta: 0
; OBJ64-NEXT: IsStatement: Yes
; OBJ64-NEXT: IsStatement: No
; OBJ64-NEXT: ColStart: 0
; OBJ64-NEXT: ColEnd: 0
; OBJ64-NEXT: ]
; OBJ64-NEXT: +0x4 [
; OBJ64-NEXT: LineNumberStart: 8
; OBJ64-NEXT: LineNumberEndDelta: 0
; OBJ64-NEXT: IsStatement: Yes
; OBJ64-NEXT: IsStatement: No
; OBJ64-NEXT: ColStart: 52
; OBJ64-NEXT: ColEnd: 0
; OBJ64-NEXT: ]
; OBJ64-NEXT: +0x9 [
; OBJ64-NEXT: LineNumberStart: 9
; OBJ64-NEXT: LineNumberEndDelta: 0
; OBJ64-NEXT: IsStatement: Yes
; OBJ64-NEXT: IsStatement: No
; OBJ64-NEXT: ColStart: 53
; OBJ64-NEXT: ColEnd: 0
; OBJ64-NEXT: ]
@ -505,35 +505,35 @@
; OBJ64-NEXT: +0x0 [
; OBJ64-NEXT: LineNumberStart: 11
; OBJ64-NEXT: LineNumberEndDelta: 0
; OBJ64-NEXT: IsStatement: Yes
; OBJ64-NEXT: IsStatement: No
; OBJ64-NEXT: ColStart: 0
; OBJ64-NEXT: ColEnd: 0
; OBJ64-NEXT: ]
; OBJ64-NEXT: +0x4 [
; OBJ64-NEXT: LineNumberStart: 12
; OBJ64-NEXT: LineNumberEndDelta: 0
; OBJ64-NEXT: IsStatement: Yes
; OBJ64-NEXT: IsStatement: No
; OBJ64-NEXT: ColStart: 62
; OBJ64-NEXT: ColEnd: 0
; OBJ64-NEXT: ]
; OBJ64-NEXT: +0x9 [
; OBJ64-NEXT: LineNumberStart: 13
; OBJ64-NEXT: LineNumberEndDelta: 0
; OBJ64-NEXT: IsStatement: Yes
; OBJ64-NEXT: IsStatement: No
; OBJ64-NEXT: ColStart: 63
; OBJ64-NEXT: ColEnd: 0
; OBJ64-NEXT: ]
; OBJ64-NEXT: +0xE [
; OBJ64-NEXT: LineNumberStart: 14
; OBJ64-NEXT: LineNumberEndDelta: 0
; OBJ64-NEXT: IsStatement: Yes
; OBJ64-NEXT: IsStatement: No
; OBJ64-NEXT: ColStart: 72
; OBJ64-NEXT: ColEnd: 0
; OBJ64-NEXT: ]
; OBJ64-NEXT: +0x13 [
; OBJ64-NEXT: LineNumberStart: 15
; OBJ64-NEXT: LineNumberEndDelta: 0
; OBJ64-NEXT: IsStatement: Yes
; OBJ64-NEXT: IsStatement: No
; OBJ64-NEXT: ColStart: 73
; OBJ64-NEXT: ColEnd: 0
; OBJ64-NEXT: ]

View File

@ -79,14 +79,14 @@
; OBJ32-NEXT: +0x0 [
; OBJ32-NEXT: LineNumberStart: 4
; OBJ32-NEXT: LineNumberEndDelta: 0
; OBJ32-NEXT: IsStatement: Yes
; OBJ32-NEXT: IsStatement: No
; OBJ32-NEXT: ColStart: 2
; OBJ32-NEXT: ColEnd: 0
; OBJ32-NEXT: ]
; OBJ32-NEXT: +0x5 [
; OBJ32-NEXT: LineNumberStart: 5
; OBJ32-NEXT: LineNumberEndDelta: 0
; OBJ32-NEXT: IsStatement: Yes
; OBJ32-NEXT: IsStatement: No
; OBJ32-NEXT: ColStart: 0
; OBJ32-NEXT: ColEnd: 0
; OBJ32-NEXT: ]
@ -165,21 +165,21 @@
; OBJ64-NEXT: +0x0 [
; OBJ64-NEXT: LineNumberStart: 3
; OBJ64-NEXT: LineNumberEndDelta: 0
; OBJ64-NEXT: IsStatement: Yes
; OBJ64-NEXT: IsStatement: No
; OBJ64-NEXT: ColStart: 0
; OBJ64-NEXT: ColEnd: 0
; OBJ64-NEXT: ]
; OBJ64-NEXT: +0x4 [
; OBJ64-NEXT: LineNumberStart: 4
; OBJ64-NEXT: LineNumberEndDelta: 0
; OBJ64-NEXT: IsStatement: Yes
; OBJ64-NEXT: IsStatement: No
; OBJ64-NEXT: ColStart: 2
; OBJ64-NEXT: ColEnd: 0
; OBJ64-NEXT: ]
; OBJ64-NEXT: +0x9 [
; OBJ64-NEXT: LineNumberStart: 5
; OBJ64-NEXT: LineNumberEndDelta: 0
; OBJ64-NEXT: IsStatement: Yes
; OBJ64-NEXT: IsStatement: No
; OBJ64-NEXT: ColStart: 0
; OBJ64-NEXT: ColEnd: 0
; OBJ64-NEXT: ]

View File

@ -27,7 +27,7 @@ f:
.cv_loc 0 1 5 2
incl (%rdi)
# #include "t.h" start
.cv_loc 0 2 0 0
.cv_loc 0 2 0 0 is_stmt 1
incl (%rdi)
.cv_loc 0 2 1 0
incl (%rdi)
@ -50,7 +50,7 @@ f:
# CHECK: +0x0 [
# CHECK: LineNumberStart: 5
# CHECK: LineNumberEndDelta: 0
# CHECK: IsStatement: Yes
# CHECK: IsStatement: No
# CHECK: ColStart: 2
# CHECK: ColEnd: 0
# CHECK: ]
@ -67,7 +67,7 @@ f:
# CHECK: +0x4 [
# CHECK: LineNumberStart: 1
# CHECK: LineNumberEndDelta: 0
# CHECK: IsStatement: Yes
# CHECK: IsStatement: No
# CHECK: ColStart: 0
# CHECK: ColEnd: 0
# CHECK: ]
@ -77,7 +77,7 @@ f:
# CHECK: +0x6 [
# CHECK: LineNumberStart: 6
# CHECK: LineNumberEndDelta: 0
# CHECK: IsStatement: Yes
# CHECK: IsStatement: No
# CHECK: ColStart: 2
# CHECK: ColEnd: 0
# CHECK: ]

View File

@ -1154,7 +1154,7 @@ void COFFDumper::printCodeViewSymbolSection(StringRef SectionName,
uint32_t LineNumberEndDelta =
(LineData & codeview::LineInfo::EndLineDeltaMask) >>
codeview::LineInfo::EndLineDeltaShift;
bool IsStatement = codeview::LineInfo::StatementFlag;
bool IsStatement = LineData & codeview::LineInfo::StatementFlag;
W.printNumber("LineNumberStart", LineNumberStart);
W.printNumber("LineNumberEndDelta", LineNumberEndDelta);
W.printBoolean("IsStatement", IsStatement);