[llvm] r259205 - [CodeView] Fix dumping the is_stmt bit from the line table

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 29 08:39:04 PST 2016


Author: rnk
Date: Fri Jan 29 10:39:04 2016
New Revision: 259205

URL: http://llvm.org/viewvc/llvm-project?rev=259205&view=rev
Log:
[CodeView] Fix dumping the is_stmt bit from the line table

Bug pointed out by George Rimar.

Modified:
    llvm/trunk/test/DebugInfo/COFF/asm.ll
    llvm/trunk/test/DebugInfo/COFF/multifile.ll
    llvm/trunk/test/DebugInfo/COFF/multifunction.ll
    llvm/trunk/test/DebugInfo/COFF/simple.ll
    llvm/trunk/test/MC/COFF/cv-loc.s
    llvm/trunk/tools/llvm-readobj/COFFDumper.cpp

Modified: llvm/trunk/test/DebugInfo/COFF/asm.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/COFF/asm.ll?rev=259205&r1=259204&r2=259205&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/COFF/asm.ll (original)
+++ llvm/trunk/test/DebugInfo/COFF/asm.ll Fri Jan 29 10:39:04 2016
@@ -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: ]

Modified: llvm/trunk/test/DebugInfo/COFF/multifile.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/COFF/multifile.ll?rev=259205&r1=259204&r2=259205&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/COFF/multifile.ll (original)
+++ llvm/trunk/test/DebugInfo/COFF/multifile.ll Fri Jan 29 10:39:04 2016
@@ -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: ]

Modified: llvm/trunk/test/DebugInfo/COFF/multifunction.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/COFF/multifunction.ll?rev=259205&r1=259204&r2=259205&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/COFF/multifunction.ll (original)
+++ llvm/trunk/test/DebugInfo/COFF/multifunction.ll Fri Jan 29 10:39:04 2016
@@ -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:     ]

Modified: llvm/trunk/test/DebugInfo/COFF/simple.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/COFF/simple.ll?rev=259205&r1=259204&r2=259205&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/COFF/simple.ll (original)
+++ llvm/trunk/test/DebugInfo/COFF/simple.ll Fri Jan 29 10:39:04 2016
@@ -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:     ]

Modified: llvm/trunk/test/MC/COFF/cv-loc.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/COFF/cv-loc.s?rev=259205&r1=259204&r2=259205&view=diff
==============================================================================
--- llvm/trunk/test/MC/COFF/cv-loc.s (original)
+++ llvm/trunk/test/MC/COFF/cv-loc.s Fri Jan 29 10:39:04 2016
@@ -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:     ]

Modified: llvm/trunk/tools/llvm-readobj/COFFDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/COFFDumper.cpp?rev=259205&r1=259204&r2=259205&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/COFFDumper.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/COFFDumper.cpp Fri Jan 29 10:39:04 2016
@@ -1154,7 +1154,7 @@ void COFFDumper::printCodeViewSymbolSect
         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);




More information about the llvm-commits mailing list