[llvm] r259806 - Correctly handle {Always,Never}StepIntoLine

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 4 09:57:13 PST 2016


Author: majnemer
Date: Thu Feb  4 11:57:12 2016
New Revision: 259806

URL: http://llvm.org/viewvc/llvm-project?rev=259806&view=rev
Log:
Correctly handle {Always,Never}StepIntoLine

Modified:
    llvm/trunk/include/llvm/DebugInfo/CodeView/Line.h
    llvm/trunk/tools/llvm-readobj/COFFDumper.cpp

Modified: llvm/trunk/include/llvm/DebugInfo/CodeView/Line.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/CodeView/Line.h?rev=259806&r1=259805&r2=259806&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/CodeView/Line.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/CodeView/Line.h Thu Feb  4 11:57:12 2016
@@ -35,6 +35,7 @@ public:
   };
 
   LineInfo(uint32_t StartLine, uint32_t EndLine, bool IsStatement);
+  LineInfo(uint32_t LineData) : LineData(LineData) {}
 
   uint32_t getStartLine() const { return LineData & StartLineMask; }
 

Modified: llvm/trunk/tools/llvm-readobj/COFFDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/COFFDumper.cpp?rev=259806&r1=259805&r2=259806&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/COFFDumper.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/COFFDumper.cpp Thu Feb  4 11:57:12 2016
@@ -1154,14 +1154,15 @@ void COFFDumper::printCodeViewSymbolSect
         char Buffer[32];
         format("+0x%X", PC).snprint(Buffer, 32);
         ListScope PCScope(W, Buffer);
-        uint32_t LineNumberStart = LineData & codeview::LineInfo::StartLineMask;
-        uint32_t LineNumberEndDelta =
-            (LineData & codeview::LineInfo::EndLineDeltaMask) >>
-            codeview::LineInfo::EndLineDeltaShift;
-        bool IsStatement = LineData & codeview::LineInfo::StatementFlag;
-        W.printNumber("LineNumberStart", LineNumberStart);
-        W.printNumber("LineNumberEndDelta", LineNumberEndDelta);
-        W.printBoolean("IsStatement", IsStatement);
+        LineInfo LI(LineData);
+        if (LI.isAlwaysStepInto())
+          W.printString("StepInto", StringRef("Always"));
+        else if (LI.isNeverStepInto())
+          W.printString("StepInto", StringRef("Never"));
+        else
+          W.printNumber("LineNumberStart", LI.getStartLine());
+        W.printNumber("LineNumberEndDelta", LI.getLineDelta());
+        W.printBoolean("IsStatement", LI.isStatement());
         if (HasColumnInformation &&
             ColumnDE.isValidOffsetForDataOfSize(ColumnOffset, 4)) {
           uint16_t ColStart = ColumnDE.getU16(&ColumnOffset);




More information about the llvm-commits mailing list