<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 8, 2015 at 9:31 PM, Justin Bogner <span dir="ltr"><<a href="mailto:mail@justinbogner.com" target="_blank">mail@justinbogner.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5">David Majnemer <<a href="mailto:david.majnemer@gmail.com">david.majnemer@gmail.com</a>> writes:<br>
> Author: majnemer<br>
> Date: Wed Jul 8 19:19:51 2015<br>
> New Revision: 241764<br>
><br>
> URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D241764-26view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Lkf653WFn6ljMMlsHNZnS2WzSACsom75XAX58eDzzVU&s=QyZjOQ2TOSO8I3IW7EoNLaWNW0TsmSqhNkI2OUHWhEY&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=241764&view=rev</a><br>
> Log:<br>
> [CodeView] Add support for emitting column information<br>
><br>
> Column information is present in CodeView when the line table subsection<br>
> has bit 0 set to 1 in it's flags field. The column information is<br>
> represented as a pair of 16-bit quantities: a starting and ending<br>
> column. This information is present at the end of the chunk, after all<br>
> the line-PC pairs.<br>
><br>
> Modified:<br>
> llvm/trunk/include/llvm/Support/COFF.h<br>
> llvm/trunk/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp<br>
> llvm/trunk/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.h<br>
> llvm/trunk/test/DebugInfo/COFF/asm.ll<br>
> llvm/trunk/test/DebugInfo/COFF/multifile.ll<br>
> llvm/trunk/test/DebugInfo/COFF/multifunction.ll<br>
> llvm/trunk/test/DebugInfo/COFF/simple.ll<br>
> llvm/trunk/test/tools/llvm-readobj/codeview-linetables.test<br>
> llvm/trunk/tools/llvm-readobj/COFFDumper.cpp<br>
><br>
> Modified: llvm/trunk/include/llvm/Support/COFF.h<br>
> URL:<br>
> <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_include_llvm_Support_COFF.h-3Frev-3D241764-26r1-3D241763-26r2-3D241764-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Lkf653WFn6ljMMlsHNZnS2WzSACsom75XAX58eDzzVU&s=dvitA-ZCQBtSobzOPx7fFE0FXyUXXYXXhPPRB4hOhng&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/COFF.h?rev=241764&r1=241763&r2=241764&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/include/llvm/Support/COFF.h (original)<br>
> +++ llvm/trunk/include/llvm/Support/COFF.h Wed Jul 8 19:19:51 2015<br>
> @@ -655,6 +655,7 @@ namespace COFF {<br>
> };<br>
><br>
> enum CodeViewIdentifiers {<br>
> + DEBUG_LINE_TABLES_HAVE_COLUMN_RECORDS = 0x1,<br>
> DEBUG_SECTION_MAGIC = 0x4,<br>
> DEBUG_SYMBOL_SUBSECTION = 0xF1,<br>
> DEBUG_LINE_TABLE_SUBSECTION = 0xF2,<br>
><br>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp<br>
> URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_CodeGen_AsmPrinter_WinCodeViewLineTables.cpp-3Frev-3D241764-26r1-3D241763-26r2-3D241764-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Lkf653WFn6ljMMlsHNZnS2WzSACsom75XAX58eDzzVU&s=7RDDlVJJOJaJ15pDGjvYoLJe0jA1WRluf1Ia6JnmQG8&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp?rev=241764&r1=241763&r2=241764&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp (original)<br>
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp Wed Jul 8 19:19:51 2015<br>
> @@ -97,7 +97,7 @@ void WinCodeViewLineTables::maybeRecordL<br>
> MCSymbol *MCL = Asm->MMI->getContext().createTempSymbol();<br>
> Asm->OutStreamer->EmitLabel(MCL);<br>
> CurFn->Instrs.push_back(MCL);<br>
> - InstrInfo[MCL] = InstrInfoTy(Filename, DL.getLine());<br>
> + InstrInfo[MCL] = InstrInfoTy(Filename, DL.getLine(), DL.getCol());<br>
> }<br>
><br>
> WinCodeViewLineTables::WinCodeViewLineTables(AsmPrinter *AP)<br>
> @@ -264,22 +264,38 @@ void WinCodeViewLineTables::emitDebugInf<br>
> // Identify the function this subsection is for.<br>
> Asm->OutStreamer->EmitCOFFSecRel32(Fn);<br>
> Asm->OutStreamer->EmitCOFFSectionIndex(Fn);<br>
> - // Insert padding after a 16-bit section index.<br>
> - Asm->EmitInt16(0);<br>
> + // Insert flags after a 16-bit section index.<br>
> + Asm->EmitInt16(COFF::DEBUG_LINE_TABLES_HAVE_COLUMN_RECORDS);<br>
><br>
> // Length of the function's code, in bytes.<br>
> EmitLabelDiff(*Asm->OutStreamer, Fn, FI.End);<br>
><br>
> // PC-to-linenumber lookup table:<br>
> MCSymbol *FileSegmentEnd = nullptr;<br>
> +<br>
> + // The start of the last segment:<br>
> + size_t LastSegmentStart = 0;<br>
> +<br>
> + auto FinishPreviousChunk = [&] {<br>
> + if (!FileSegmentEnd)<br>
> + return;<br>
> + for (size_t ColSegI = LastSegmentStart,<br>
> + ColSegEnd = ColSegI + FilenameSegmentLengths[LastSegmentStart];<br>
> + ColSegI != ColSegEnd; ++ColSegI) {<br>
> + unsigned ColumnNumber = InstrInfo[FI.Instrs[ColSegI]].ColumnNumber;<br>
> + Asm->EmitInt16(ColumnNumber); // Start column<br>
> + Asm->EmitInt16(ColumnNumber); // End column<br>
> + }<br>
> + Asm->OutStreamer->EmitLabel(FileSegmentEnd);<br>
> + };<br>
> +<br>
> for (size_t J = 0, F = FI.Instrs.size(); J != F; ++J) {<br>
> MCSymbol *Instr = FI.Instrs[J];<br>
> assert(InstrInfo.count(Instr));<br>
><br>
> if (FilenameSegmentLengths.count(J)) {<br>
> // We came to a beginning of a new filename segment.<br>
> - if (FileSegmentEnd)<br>
> - Asm->OutStreamer->EmitLabel(FileSegmentEnd);<br>
> + FinishPreviousChunk();<br>
> StringRef CurFilename = InstrInfo[FI.Instrs[J]].Filename;<br>
> assert(FileNameRegistry.Infos.count(CurFilename));<br>
> size_t IndexInStringTable =<br>
> @@ -300,6 +316,7 @@ void WinCodeViewLineTables::emitDebugInf<br>
> // records.<br>
> FileSegmentEnd = Asm->MMI->getContext().createTempSymbol();<br>
> EmitLabelDiff(*Asm->OutStreamer, FileSegmentBegin, FileSegmentEnd);<br>
> + LastSegmentStart = J;<br>
> }<br>
><br>
> // The first PC with the given linenumber and the linenumber itself.<br>
> @@ -307,8 +324,7 @@ void WinCodeViewLineTables::emitDebugInf<br>
> Asm->EmitInt32(InstrInfo[Instr].LineNumber);<br>
> }<br>
><br>
> - if (FileSegmentEnd)<br>
> - Asm->OutStreamer->EmitLabel(FileSegmentEnd);<br>
> + FinishPreviousChunk();<br>
> Asm->OutStreamer->EmitLabel(LineTableEnd);<br>
> }<br>
><br>
><br>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.h<br>
> URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_CodeGen_AsmPrinter_WinCodeViewLineTables.h-3Frev-3D241764-26r1-3D241763-26r2-3D241764-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Lkf653WFn6ljMMlsHNZnS2WzSACsom75XAX58eDzzVU&s=nIZPGdmYciaBeisK2vY2POf5DPjS0Gyog41DlUaSI6E&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.h?rev=241764&r1=241763&r2=241764&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.h (original)<br>
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.h Wed Jul 8 19:19:51 2015<br>
> @@ -52,11 +52,13 @@ class LLVM_LIBRARY_VISIBILITY WinCodeVie<br>
> struct InstrInfoTy {<br>
> StringRef Filename;<br>
> unsigned LineNumber;<br>
> + unsigned ColumnNumber;<br>
><br>
> - InstrInfoTy() : LineNumber(0) {}<br>
> + InstrInfoTy() : LineNumber(0), ColumnNumber(0) {}<br>
><br>
> - InstrInfoTy(StringRef Filename, unsigned LineNumber)<br>
> - : Filename(Filename), LineNumber(LineNumber) {}<br>
> + InstrInfoTy(StringRef Filename, unsigned LineNumber, unsigned ColumnNumber)<br>
> + : Filename(Filename), LineNumber(LineNumber),<br>
> + ColumnNumber(ColumnNumber) {}<br>
> };<br>
> DenseMap<MCSymbol *, InstrInfoTy> InstrInfo;<br>
><br>
><br>
> Modified: llvm/trunk/test/DebugInfo/COFF/asm.ll<br>
> URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_test_DebugInfo_COFF_asm.ll-3Frev-3D241764-26r1-3D241763-26r2-3D241764-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Lkf653WFn6ljMMlsHNZnS2WzSACsom75XAX58eDzzVU&s=fiaaPzBc79xyDW09-iy0mWoMsrwvtuh7rDEDGGGB1m4&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/COFF/asm.ll?rev=241764&r1=241763&r2=241764&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/DebugInfo/COFF/asm.ll (original)<br>
> +++ llvm/trunk/test/DebugInfo/COFF/asm.ll Wed Jul 8 19:19:51 2015<br>
> @@ -51,7 +51,7 @@<br>
> ; X86-NEXT: [[F2_START]]:<br>
> ; X86-NEXT: .secrel32 _f<br>
> ; X86-NEXT: .secidx _f<br>
> -; X86-NEXT: .short 0<br>
> +; X86-NEXT: .short 1<br>
> ; X86-NEXT: .long [[END_OF_F]]-_f<br>
> ; X86-NEXT: [[FILE_SEGMENT_START:[^:]*]]:<br>
> ; X86-NEXT: .long 0<br>
> @@ -63,6 +63,12 @@<br>
> ; X86-NEXT: .long 5<br>
> ; X86-NEXT: .long [[RETURN_STMT]]-_f<br>
> ; X86-NEXT: .long 6<br>
> +; X86-NEXT: .short 0<br>
> +; X86-NEXT: .short 0<br>
> +; X86-NEXT: .short 0<br>
> +; X86-NEXT: .short 0<br>
> +; X86-NEXT: .short 0<br>
> +; X86-NEXT: .short 0<br>
> ; X86-NEXT: [[FILE_SEGMENT_END]]:<br>
> ; X86-NEXT: [[F2_END]]:<br>
> ; File index to string table offset subsection<br>
> @@ -101,6 +107,7 @@<br>
> ; OBJ32-NEXT: ]<br>
> ; OBJ32: FunctionLineTable [<br>
> ; OBJ32-NEXT: Name: _f<br>
> +; OBJ32-NEXT: Flags: 0x1<br>
> ; OBJ32-NEXT: CodeSize: 0x6<br>
> ; OBJ32-NEXT: FilenameSegment [<br>
> ; OBJ32-NEXT: Filename: D:\asm.c<br>
> @@ -110,6 +117,12 @@<br>
> ; OBJ32-NEXT: +0x0: 4<br>
> ; OBJ32-NEXT: +0x0: 5<br>
> ; OBJ32-NEXT: +0x5: 6<br>
> +; OBJ32-NEXT: ColStart: 0<br>
> +; OBJ32-NEXT: ColEnd: 0<br>
> +; OBJ32-NEXT: ColStart: 0<br>
> +; OBJ32-NEXT: ColEnd: 0<br>
> +; OBJ32-NEXT: ColStart: 0<br>
> +; OBJ32-NEXT: ColEnd: 0<br>
> ; OBJ32-NEXT: ]<br>
> ; OBJ32-NEXT: ]<br>
> ; OBJ32: }<br>
> @@ -157,7 +170,7 @@<br>
> ; X64-NEXT: [[F2_START]]:<br>
> ; X64-NEXT: .secrel32 f<br>
> ; X64-NEXT: .secidx f<br>
> -; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 1<br>
> ; X64-NEXT: .long [[END_OF_F]]-f<br>
> ; X64-NEXT: [[FILE_SEGMENT_START:[^:]*]]:<br>
> ; X64-NEXT: .long 0<br>
> @@ -171,6 +184,14 @@<br>
> ; X64-NEXT: .long 5<br>
> ; X64-NEXT: .long [[EPILOG_AND_RET]]-f<br>
> ; X64-NEXT: .long 6<br>
> +; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 0<br>
> ; X64-NEXT: [[FILE_SEGMENT_END]]:<br>
> ; X64-NEXT: [[F2_END]]:<br>
> ; File index to string table offset subsection<br>
> @@ -209,6 +230,7 @@<br>
> ; OBJ64-NEXT: ]<br>
> ; OBJ64: FunctionLineTable [<br>
> ; OBJ64-NEXT: Name: f<br>
> +; OBJ64-NEXT: Flags: 0x1<br>
> ; OBJ64-NEXT: CodeSize: 0xE<br>
> ; OBJ64-NEXT: FilenameSegment [<br>
> ; OBJ64-NEXT: Filename: D:\asm.c<br>
> @@ -218,6 +240,14 @@<br>
> ; OBJ64-NEXT: +0x4: 4<br>
> ; OBJ64-NEXT: +0x4: 5<br>
> ; OBJ64-NEXT: +0x9: 6<br>
> +; OBJ64-NEXT: ColStart: 0<br>
> +; OBJ64-NEXT: ColEnd: 0<br>
> +; OBJ64-NEXT: ColStart: 0<br>
> +; OBJ64-NEXT: ColEnd: 0<br>
> +; OBJ64-NEXT: ColStart: 0<br>
> +; OBJ64-NEXT: ColEnd: 0<br>
> +; OBJ64-NEXT: ColStart: 0<br>
> +; OBJ64-NEXT: ColEnd: 0<br>
> ; OBJ64-NEXT: ]<br>
> ; OBJ64-NEXT: ]<br>
> ; OBJ64: }<br>
><br>
> Modified: llvm/trunk/test/DebugInfo/COFF/multifile.ll<br>
> URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_test_DebugInfo_COFF_multifile.ll-3Frev-3D241764-26r1-3D241763-26r2-3D241764-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Lkf653WFn6ljMMlsHNZnS2WzSACsom75XAX58eDzzVU&s=bFoVhFSGVecF01RibDL1NwV9w7P1HEEfdFo9IYLXf5A&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/COFF/multifile.ll?rev=241764&r1=241763&r2=241764&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/DebugInfo/COFF/multifile.ll (original)<br>
> +++ llvm/trunk/test/DebugInfo/COFF/multifile.ll Wed Jul 8 19:19:51 2015<br>
> @@ -58,7 +58,7 @@<br>
> ; X86-NEXT: [[F2_START]]:<br>
> ; X86-NEXT: .secrel32 _f<br>
> ; X86-NEXT: .secidx _f<br>
> -; X86-NEXT: .short 0<br>
> +; X86-NEXT: .short 1<br>
> ; X86-NEXT: .long [[END_OF_F]]-_f<br>
> ; Segment for file 'D:\\one.c' begins<br>
> ; X86-NEXT: [[FILE_SEGMENT_START:[^:]*]]:<br>
> @@ -67,6 +67,8 @@<br>
> ; X86-NEXT: .long [[FILE_SEGMENT_END:.*]]-[[FILE_SEGMENT_START]]<br>
> ; X86-NEXT: .long [[CALL_LINE_1]]-_f<br>
> ; X86-NEXT: .long 1<br>
> +; X86-NEXT: .short 0<br>
> +; X86-NEXT: .short 0<br>
> ; X86-NEXT: [[FILE_SEGMENT_END]]:<br>
> ; Segment for file 'D:\\two.c' begins<br>
> ; X86-NEXT: [[FILE_SEGMENT_START:[^:]*]]:<br>
> @@ -75,6 +77,8 @@<br>
> ; X86-NEXT: .long [[FILE_SEGMENT_END:.*]]-[[FILE_SEGMENT_START]]<br>
> ; X86-NEXT: .long [[CALL_LINE_2]]-_f<br>
> ; X86-NEXT: .long 2<br>
> +; X86-NEXT: .short 0<br>
> +; X86-NEXT: .short 0<br>
> ; X86-NEXT: [[FILE_SEGMENT_END]]:<br>
> ; A new segment for file 'D:\\one.c' begins<br>
> ; X86-NEXT: [[FILE_SEGMENT_START:[^:]*]]:<br>
> @@ -85,6 +89,10 @@<br>
> ; X86-NEXT: .long 7<br>
> ; X86-NEXT: .long [[RETURN_STMT]]-_f<br>
> ; X86-NEXT: .long 8<br>
> +; X86-NEXT: .short 0<br>
> +; X86-NEXT: .short 0<br>
> +; X86-NEXT: .short 0<br>
> +; X86-NEXT: .short 0<br>
> ; X86-NEXT: [[FILE_SEGMENT_END]]:<br>
> ; X86-NEXT: [[F2_END]]:<br>
> ; File index to string table offset subsection<br>
> @@ -126,19 +134,28 @@<br>
> ; OBJ32-NEXT: ]<br>
> ; OBJ32: FunctionLineTable [<br>
> ; OBJ32-NEXT: Name: _f<br>
> +; OBJ32-NEXT: Flags: 0x1<br>
> ; OBJ32-NEXT: CodeSize: 0x10<br>
> ; OBJ32-NEXT: FilenameSegment [<br>
> ; OBJ32-NEXT: Filename: D:\one.c<br>
> ; OBJ32-NEXT: +0x0: 1<br>
> +; OBJ32-NEXT: ColStart: 0<br>
> +; OBJ32-NEXT: ColEnd: 0<br>
> ; OBJ32-NEXT: ]<br>
> ; OBJ32-NEXT: FilenameSegment [<br>
> ; OBJ32-NEXT: Filename: D:\two.c<br>
> ; OBJ32-NEXT: +0x5: 2<br>
> +; OBJ32-NEXT: ColStart: 0<br>
> +; OBJ32-NEXT: ColEnd: 0<br>
> ; OBJ32-NEXT: ]<br>
> ; OBJ32-NEXT: FilenameSegment [<br>
> ; OBJ32-NEXT: Filename: D:\one.c<br>
> ; OBJ32-NEXT: +0xA: 7<br>
> ; OBJ32-NEXT: +0xF: 8<br>
> +; OBJ32-NEXT: ColStart: 0<br>
> +; OBJ32-NEXT: ColEnd: 0<br>
> +; OBJ32-NEXT: ColStart: 0<br>
> +; OBJ32-NEXT: ColEnd: 0<br>
> ; OBJ32-NEXT: ]<br>
> ; OBJ32-NEXT: ]<br>
> ; OBJ32: }<br>
> @@ -189,7 +206,7 @@<br>
> ; X64-NEXT: [[F2_START]]:<br>
> ; X64-NEXT: .secrel32 f<br>
> ; X64-NEXT: .secidx f<br>
> -; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 1<br>
> ; X64-NEXT: .long [[END_OF_F]]-f<br>
> ; Segment for file 'D:\\input.c' begins<br>
> ; X64-NEXT: [[FILE_SEGMENT_START:[^:]*]]:<br>
> @@ -198,6 +215,8 @@<br>
> ; X64-NEXT: .long [[FILE_SEGMENT_END:.*]]-[[FILE_SEGMENT_START]]<br>
> ; X64-NEXT: .long [[START]]-f<br>
> ; X64-NEXT: .long 3<br>
> +; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 0<br>
> ; X64-NEXT: [[FILE_SEGMENT_END]]:<br>
> ; Segment for file 'D:\\one.c' begins<br>
> ; X64-NEXT: [[FILE_SEGMENT_START:[^:]*]]:<br>
> @@ -206,6 +225,8 @@<br>
> ; X64-NEXT: .long [[FILE_SEGMENT_END:.*]]-[[FILE_SEGMENT_START]]<br>
> ; X64-NEXT: .long [[CALL_LINE_1]]-f<br>
> ; X64-NEXT: .long 1<br>
> +; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 0<br>
> ; X64-NEXT: [[FILE_SEGMENT_END]]:<br>
> ; Segment for file 'D:\\two.c' begins<br>
> ; X64-NEXT: [[FILE_SEGMENT_START:[^:]*]]:<br>
> @@ -214,6 +235,8 @@<br>
> ; X64-NEXT: .long [[FILE_SEGMENT_END:.*]]-[[FILE_SEGMENT_START]]<br>
> ; X64-NEXT: .long [[CALL_LINE_2]]-f<br>
> ; X64-NEXT: .long 2<br>
> +; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 0<br>
> ; X64-NEXT: [[FILE_SEGMENT_END]]:<br>
> ; A new segment for file 'D:\\one.c' begins<br>
> ; X64-NEXT: [[FILE_SEGMENT_START:[^:]*]]:<br>
> @@ -224,6 +247,10 @@<br>
> ; X64-NEXT: .long 7<br>
> ; X64-NEXT: .long [[EPILOG_AND_RET]]-f<br>
> ; X64-NEXT: .long 8<br>
> +; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 0<br>
> ; X64-NEXT: [[FILE_SEGMENT_END]]:<br>
> ; X64-NEXT: [[F2_END]]:<br>
> ; File index to string table offset subsection<br>
> @@ -269,23 +296,34 @@<br>
> ; OBJ64-NEXT: ]<br>
> ; OBJ64: FunctionLineTable [<br>
> ; OBJ64-NEXT: Name: f<br>
> +; OBJ64-NEXT: Flags: 0x1<br>
> ; OBJ64-NEXT: CodeSize: 0x18<br>
> ; OBJ64-NEXT: FilenameSegment [<br>
> ; OBJ64-NEXT: Filename: D:\input.c<br>
> ; OBJ64-NEXT: +0x0: 3<br>
> +; OBJ64-NEXT: ColStart: 0<br>
> +; OBJ64-NEXT: ColEnd: 0<br>
> ; OBJ64-NEXT: ]<br>
> ; OBJ64-NEXT: FilenameSegment [<br>
> ; OBJ64-NEXT: Filename: D:\one.c<br>
> ; OBJ64-NEXT: +0x4: 1<br>
> +; OBJ64-NEXT: ColStart: 0<br>
> +; OBJ64-NEXT: ColEnd: 0<br>
> ; OBJ64-NEXT: ]<br>
> ; OBJ64-NEXT: FilenameSegment [<br>
> ; OBJ64-NEXT: Filename: D:\two.c<br>
> ; OBJ64-NEXT: +0x9: 2<br>
> +; OBJ64-NEXT: ColStart: 0<br>
> +; OBJ64-NEXT: ColEnd: 0<br>
> ; OBJ64-NEXT: ]<br>
> ; OBJ64-NEXT: FilenameSegment [<br>
> ; OBJ64-NEXT: Filename: D:\one.c<br>
> ; OBJ64-NEXT: +0xE: 7<br>
> ; OBJ64-NEXT: +0x13: 8<br>
> +; OBJ64-NEXT: ColStart: 0<br>
> +; OBJ64-NEXT: ColEnd: 0<br>
> +; OBJ64-NEXT: ColStart: 0<br>
> +; OBJ64-NEXT: ColEnd: 0<br>
> ; OBJ64-NEXT: ]<br>
> ; OBJ64-NEXT: ]<br>
> ; OBJ64: }<br>
><br>
> Modified: llvm/trunk/test/DebugInfo/COFF/multifunction.ll<br>
> URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_test_DebugInfo_COFF_multifunction.ll-3Frev-3D241764-26r1-3D241763-26r2-3D241764-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Lkf653WFn6ljMMlsHNZnS2WzSACsom75XAX58eDzzVU&s=7nu4OFoqRYvWUNGKHx-VyVi-Bh2k1do0Ysu_yiWR00A&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/COFF/multifunction.ll?rev=241764&r1=241763&r2=241764&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/DebugInfo/COFF/multifunction.ll (original)<br>
> +++ llvm/trunk/test/DebugInfo/COFF/multifunction.ll Wed Jul 8 19:19:51 2015<br>
> @@ -82,7 +82,7 @@<br>
> ; X86-NEXT: [[F2_START]]:<br>
> ; X86-NEXT: .secrel32 _x<br>
> ; X86-NEXT: .secidx _x<br>
> -; X86-NEXT: .short 0<br>
> +; X86-NEXT: .short 1<br>
> ; X86-NEXT: .long [[END_OF_X]]-_x<br>
> ; X86-NEXT: [[FILE_SEGMENT_START:[^:]*]]:<br>
> ; X86-NEXT: .long 0<br>
> @@ -92,6 +92,10 @@<br>
> ; X86-NEXT: .long 4<br>
> ; X86-NEXT: .long [[X_RETURN]]-_x<br>
> ; X86-NEXT: .long 5<br>
> +; X86-NEXT: .short 42<br>
> +; X86-NEXT: .short 42<br>
> +; X86-NEXT: .short 43<br>
> +; X86-NEXT: .short 43<br>
> ; X86-NEXT: [[FILE_SEGMENT_END]]:<br>
> ; X86-NEXT: [[F2_END]]:<br>
> ; Symbol subsection for y<br>
> @@ -121,7 +125,7 @@<br>
> ; X86-NEXT: [[F2_START]]:<br>
> ; X86-NEXT: .secrel32 _y<br>
> ; X86-NEXT: .secidx _y<br>
> -; X86-NEXT: .short 0<br>
> +; X86-NEXT: .short 1<br>
> ; X86-NEXT: .long [[END_OF_Y]]-_y<br>
> ; X86-NEXT: [[FILE_SEGMENT_START:[^:]*]]:<br>
> ; X86-NEXT: .long 0<br>
> @@ -131,6 +135,10 @@<br>
> ; X86-NEXT: .long 8<br>
> ; X86-NEXT: .long [[Y_RETURN]]-_y<br>
> ; X86-NEXT: .long 9<br>
> +; X86-NEXT: .short 52<br>
> +; X86-NEXT: .short 52<br>
> +; X86-NEXT: .short 53<br>
> +; X86-NEXT: .short 53<br>
> ; X86-NEXT: [[FILE_SEGMENT_END]]:<br>
> ; X86-NEXT: [[F2_END]]:<br>
> ; Symbol subsection for f<br>
> @@ -160,7 +168,7 @@<br>
> ; X86-NEXT: [[F2_START]]:<br>
> ; X86-NEXT: .secrel32 _f<br>
> ; X86-NEXT: .secidx _f<br>
> -; X86-NEXT: .short 0<br>
> +; X86-NEXT: .short 1<br>
> ; X86-NEXT: .long [[END_OF_F]]-_f<br>
> ; X86-NEXT: [[FILE_SEGMENT_START:[^:]*]]:<br>
> ; X86-NEXT: .long 0<br>
> @@ -174,6 +182,14 @@<br>
> ; X86-NEXT: .long 14<br>
> ; X86-NEXT: .long [[F_RETURN]]-_f<br>
> ; X86-NEXT: .long 15<br>
> +; X86-NEXT: .short 62<br>
> +; X86-NEXT: .short 62<br>
> +; X86-NEXT: .short 63<br>
> +; X86-NEXT: .short 63<br>
> +; X86-NEXT: .short 72<br>
> +; X86-NEXT: .short 72<br>
> +; X86-NEXT: .short 73<br>
> +; X86-NEXT: .short 73<br>
> ; X86-NEXT: [[FILE_SEGMENT_END]]:<br>
> ; X86-NEXT: [[F2_END]]:<br>
> ; File index to string table offset subsection<br>
> @@ -198,14 +214,14 @@<br>
> ; OBJ32-NEXT: 0x30 IMAGE_REL_I386_SECTION _x<br>
> ; OBJ32-NEXT: 0x44 IMAGE_REL_I386_SECREL _x<br>
> ; OBJ32-NEXT: 0x48 IMAGE_REL_I386_SECTION _x<br>
> -; OBJ32-NEXT: 0x94 IMAGE_REL_I386_SECREL _y<br>
> -; OBJ32-NEXT: 0x98 IMAGE_REL_I386_SECTION _y<br>
> -; OBJ32-NEXT: 0xAC IMAGE_REL_I386_SECREL _y<br>
> -; OBJ32-NEXT: 0xB0 IMAGE_REL_I386_SECTION _y<br>
> -; OBJ32-NEXT: 0xFC IMAGE_REL_I386_SECREL _f<br>
> -; OBJ32-NEXT: 0x100 IMAGE_REL_I386_SECTION _f<br>
> -; OBJ32-NEXT: 0x114 IMAGE_REL_I386_SECREL _f<br>
> -; OBJ32-NEXT: 0x118 IMAGE_REL_I386_SECTION _f<br>
> +; OBJ32-NEXT: 0x9C IMAGE_REL_I386_SECREL _y<br>
> +; OBJ32-NEXT: 0xA0 IMAGE_REL_I386_SECTION _y<br>
> +; OBJ32-NEXT: 0xB4 IMAGE_REL_I386_SECREL _y<br>
> +; OBJ32-NEXT: 0xB8 IMAGE_REL_I386_SECTION _y<br>
> +; OBJ32-NEXT: 0x10C IMAGE_REL_I386_SECREL _f<br>
> +; OBJ32-NEXT: 0x110 IMAGE_REL_I386_SECTION _f<br>
> +; OBJ32-NEXT: 0x124 IMAGE_REL_I386_SECREL _f<br>
> +; OBJ32-NEXT: 0x128 IMAGE_REL_I386_SECTION _f<br>
> ; OBJ32-NEXT: ]<br>
> ; OBJ32: Subsection [<br>
> ; OBJ32-NEXT: Type: 0xF1<br>
> @@ -248,24 +264,35 @@<br>
> ; OBJ32: ]<br>
> ; OBJ32: FunctionLineTable [<br>
> ; OBJ32-NEXT: Name: _x<br>
> +; OBJ32-NEXT: Flags: 0x1<br>
> ; OBJ32-NEXT: CodeSize: 0x6<br>
> ; OBJ32-NEXT: FilenameSegment [<br>
> ; OBJ32-NEXT: Filename: D:\source.c<br>
> ; OBJ32-NEXT: +0x0: 4<br>
> ; OBJ32-NEXT: +0x5: 5<br>
> +; OBJ32-NEXT: ColStart: 42<br>
> +; OBJ32-NEXT: ColEnd: 42<br>
> +; OBJ32-NEXT: ColStart: 43<br>
> +; OBJ32-NEXT: ColEnd: 43<br>
> ; OBJ32-NEXT: ]<br>
> ; OBJ32-NEXT: ]<br>
> ; OBJ32-NEXT: FunctionLineTable [<br>
> ; OBJ32-NEXT: Name: _y<br>
> +; OBJ32-NEXT: Flags: 0x1<br>
> ; OBJ32-NEXT: CodeSize: 0x6<br>
> ; OBJ32-NEXT: FilenameSegment [<br>
> ; OBJ32-NEXT: Filename: D:\source.c<br>
> ; OBJ32-NEXT: +0x0: 8<br>
> ; OBJ32-NEXT: +0x5: 9<br>
> +; OBJ32-NEXT: ColStart: 52<br>
> +; OBJ32-NEXT: ColEnd: 52<br>
> +; OBJ32-NEXT: ColStart: 53<br>
> +; OBJ32-NEXT: ColEnd: 53<br>
> ; OBJ32-NEXT: ]<br>
> ; OBJ32-NEXT: ]<br>
> ; OBJ32-NEXT: FunctionLineTable [<br>
> ; OBJ32-NEXT: Name: _f<br>
> +; OBJ32-NEXT: Flags: 0x1<br>
> ; OBJ32-NEXT: CodeSize: 0x10<br>
> ; OBJ32-NEXT: FilenameSegment [<br>
> ; OBJ32-NEXT: Filename: D:\source.c<br>
> @@ -273,6 +300,14 @@<br>
> ; OBJ32-NEXT: +0x5: 13<br>
> ; OBJ32-NEXT: +0xA: 14<br>
> ; OBJ32-NEXT: +0xF: 15<br>
> +; OBJ32-NEXT: ColStart: 62<br>
> +; OBJ32-NEXT: ColEnd: 62<br>
> +; OBJ32-NEXT: ColStart: 63<br>
> +; OBJ32-NEXT: ColEnd: 63<br>
> +; OBJ32-NEXT: ColStart: 72<br>
> +; OBJ32-NEXT: ColEnd: 72<br>
> +; OBJ32-NEXT: ColStart: 73<br>
> +; OBJ32-NEXT: ColEnd: 73<br>
> ; OBJ32-NEXT: ]<br>
> ; OBJ32-NEXT: ]<br>
> ; OBJ32: }<br>
> @@ -349,7 +384,7 @@<br>
> ; X64-NEXT: [[F2_START]]:<br>
> ; X64-NEXT: .secrel32 x<br>
> ; X64-NEXT: .secidx x<br>
> -; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 1<br>
> ; X64-NEXT: .long [[END_OF_X]]-x<br>
> ; X64-NEXT: [[FILE_SEGMENT_START:[^:]*]]:<br>
> ; X64-NEXT: .long 0<br>
> @@ -361,6 +396,12 @@<br>
> ; X64-NEXT: .long 4<br>
> ; X64-NEXT: .long [[X_EPILOG_AND_RET]]-x<br>
> ; X64-NEXT: .long 5<br>
> +; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 42<br>
> +; X64-NEXT: .short 42<br>
> +; X64-NEXT: .short 43<br>
> +; X64-NEXT: .short 43<br>
> ; X64-NEXT: [[FILE_SEGMENT_END]]:<br>
> ; X64-NEXT: [[F2_END]]:<br>
> ; Symbol subsection for y<br>
> @@ -390,7 +431,7 @@<br>
> ; X64-NEXT: [[F2_START]]:<br>
> ; X64-NEXT: .secrel32 y<br>
> ; X64-NEXT: .secidx y<br>
> -; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 1<br>
> ; X64-NEXT: .long [[END_OF_Y]]-y<br>
> ; X64-NEXT: [[FILE_SEGMENT_START:[^:]*]]:<br>
> ; X64-NEXT: .long 0<br>
> @@ -402,6 +443,12 @@<br>
> ; X64-NEXT: .long 8<br>
> ; X64-NEXT: .long [[Y_EPILOG_AND_RET]]-y<br>
> ; X64-NEXT: .long 9<br>
> +; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 52<br>
> +; X64-NEXT: .short 52<br>
> +; X64-NEXT: .short 53<br>
> +; X64-NEXT: .short 53<br>
> ; X64-NEXT: [[FILE_SEGMENT_END]]:<br>
> ; X64-NEXT: [[F2_END]]:<br>
> ; Symbol subsection for f<br>
> @@ -431,7 +478,7 @@<br>
> ; X64-NEXT: [[F2_START]]:<br>
> ; X64-NEXT: .secrel32 f<br>
> ; X64-NEXT: .secidx f<br>
> -; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 1<br>
> ; X64-NEXT: .long [[END_OF_F]]-f<br>
> ; X64-NEXT: [[FILE_SEGMENT_START:[^:]*]]:<br>
> ; X64-NEXT: .long 0<br>
> @@ -447,6 +494,16 @@<br>
> ; X64-NEXT: .long 14<br>
> ; X64-NEXT: .long [[F_EPILOG_AND_RET]]-f<br>
> ; X64-NEXT: .long 15<br>
> +; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 62<br>
> +; X64-NEXT: .short 62<br>
> +; X64-NEXT: .short 63<br>
> +; X64-NEXT: .short 63<br>
> +; X64-NEXT: .short 72<br>
> +; X64-NEXT: .short 72<br>
> +; X64-NEXT: .short 73<br>
> +; X64-NEXT: .short 73<br>
> ; X64-NEXT: [[FILE_SEGMENT_END]]:<br>
> ; X64-NEXT: [[F2_END]]:<br>
> ; File index to string table offset subsection<br>
> @@ -471,14 +528,14 @@<br>
> ; OBJ64-NEXT: 0x30 IMAGE_REL_AMD64_SECTION x<br>
> ; OBJ64-NEXT: 0x44 IMAGE_REL_AMD64_SECREL x<br>
> ; OBJ64-NEXT: 0x48 IMAGE_REL_AMD64_SECTION x<br>
> -; OBJ64-NEXT: 0x9C IMAGE_REL_AMD64_SECREL y<br>
> -; OBJ64-NEXT: 0xA0 IMAGE_REL_AMD64_SECTION y<br>
> -; OBJ64-NEXT: 0xB4 IMAGE_REL_AMD64_SECREL y<br>
> -; OBJ64-NEXT: 0xB8 IMAGE_REL_AMD64_SECTION y<br>
> -; OBJ64-NEXT: 0x10C IMAGE_REL_AMD64_SECREL f<br>
> -; OBJ64-NEXT: 0x110 IMAGE_REL_AMD64_SECTION f<br>
> +; OBJ64-NEXT: 0xA8 IMAGE_REL_AMD64_SECREL y<br>
> +; OBJ64-NEXT: 0xAC IMAGE_REL_AMD64_SECTION y<br>
> +; OBJ64-NEXT: 0xC0 IMAGE_REL_AMD64_SECREL y<br>
> +; OBJ64-NEXT: 0xC4 IMAGE_REL_AMD64_SECTION y<br>
> ; OBJ64-NEXT: 0x124 IMAGE_REL_AMD64_SECREL f<br>
> ; OBJ64-NEXT: 0x128 IMAGE_REL_AMD64_SECTION f<br>
> +; OBJ64-NEXT: 0x13C IMAGE_REL_AMD64_SECREL f<br>
> +; OBJ64-NEXT: 0x140 IMAGE_REL_AMD64_SECTION f<br>
> ; OBJ64-NEXT: ]<br>
> ; OBJ64: Subsection [<br>
> ; OBJ64-NEXT: Type: 0xF1<br>
> @@ -521,26 +578,41 @@<br>
> ; OBJ64: ]<br>
> ; OBJ64: FunctionLineTable [<br>
> ; OBJ64-NEXT: Name: x<br>
> +; OBJ64-NEXT: Flags: 0x1<br>
> ; OBJ64-NEXT: CodeSize: 0xE<br>
> ; OBJ64-NEXT: FilenameSegment [<br>
> ; OBJ64-NEXT: Filename: D:\source.c<br>
> ; OBJ64-NEXT: +0x0: 3<br>
> ; OBJ64-NEXT: +0x4: 4<br>
> ; OBJ64-NEXT: +0x9: 5<br>
> +; OBJ64-NEXT: ColStart: 0<br>
> +; OBJ64-NEXT: ColEnd: 0<br>
> +; OBJ64-NEXT: ColStart: 42<br>
> +; OBJ64-NEXT: ColEnd: 42<br>
> +; OBJ64-NEXT: ColStart: 43<br>
> +; OBJ64-NEXT: ColEnd: 43<br>
> ; OBJ64-NEXT: ]<br>
> ; OBJ64-NEXT: ]<br>
> ; OBJ64-NEXT: FunctionLineTable [<br>
> ; OBJ64-NEXT: Name: y<br>
> +; OBJ64-NEXT: Flags: 0x1<br>
> ; OBJ64-NEXT: CodeSize: 0xE<br>
> ; OBJ64-NEXT: FilenameSegment [<br>
> ; OBJ64-NEXT: Filename: D:\source.c<br>
> ; OBJ64-NEXT: +0x0: 7<br>
> ; OBJ64-NEXT: +0x4: 8<br>
> ; OBJ64-NEXT: +0x9: 9<br>
> +; OBJ64-NEXT: ColStart: 0<br>
> +; OBJ64-NEXT: ColEnd: 0<br>
> +; OBJ64-NEXT: ColStart: 52<br>
> +; OBJ64-NEXT: ColEnd: 52<br>
> +; OBJ64-NEXT: ColStart: 53<br>
> +; OBJ64-NEXT: ColEnd: 53<br>
> ; OBJ64-NEXT: ]<br>
> ; OBJ64-NEXT: ]<br>
> ; OBJ64-NEXT: FunctionLineTable [<br>
> ; OBJ64-NEXT: Name: f<br>
> +; OBJ64-NEXT: Flags: 0x1<br>
> ; OBJ64-NEXT: CodeSize: 0x18<br>
> ; OBJ64-NEXT: FilenameSegment [<br>
> ; OBJ64-NEXT: Filename: D:\source.c<br>
> @@ -549,6 +621,16 @@<br>
> ; OBJ64-NEXT: +0x9: 13<br>
> ; OBJ64-NEXT: +0xE: 14<br>
> ; OBJ64-NEXT: +0x13: 15<br>
> +; OBJ64-NEXT: ColStart: 0<br>
> +; OBJ64-NEXT: ColEnd: 0<br>
> +; OBJ64-NEXT: ColStart: 62<br>
> +; OBJ64-NEXT: ColEnd: 62<br>
> +; OBJ64-NEXT: ColStart: 63<br>
> +; OBJ64-NEXT: ColEnd: 63<br>
> +; OBJ64-NEXT: ColStart: 72<br>
> +; OBJ64-NEXT: ColEnd: 72<br>
> +; OBJ64-NEXT: ColStart: 73<br>
> +; OBJ64-NEXT: ColEnd: 73<br>
> ; OBJ64-NEXT: ]<br>
> ; OBJ64-NEXT: ]<br>
> ; OBJ64: }<br>
> @@ -599,11 +681,11 @@ attributes #1 = { "less-precise-fpmad"="<br>
> !11 = !{i32 2, !"Dwarf Version", i32 4}<br>
> !12 = !{i32 1, !"Debug Info Version", i32 3}<br>
> !13 = !{!"clang version 3.5 "}<br>
> -!14 = !DILocation(line: 4, scope: !4)<br>
> -!15 = !DILocation(line: 5, scope: !4)<br>
> -!16 = !DILocation(line: 8, scope: !9)<br>
> -!17 = !DILocation(line: 9, scope: !9)<br>
> -!18 = !DILocation(line: 12, scope: !10)<br>
> -!19 = !DILocation(line: 13, scope: !10)<br>
> -!20 = !DILocation(line: 14, scope: !10)<br>
> -!21 = !DILocation(line: 15, scope: !10)<br>
> +!14 = !DILocation(line: 4, column: 42, scope: !4)<br>
> +!15 = !DILocation(line: 5, column: 43, scope: !4)<br>
> +!16 = !DILocation(line: 8, column: 52, scope: !9)<br>
> +!17 = !DILocation(line: 9, column: 53, scope: !9)<br>
> +!18 = !DILocation(line: 12, column: 62, scope: !10)<br>
> +!19 = !DILocation(line: 13, column: 63, scope: !10)<br>
> +!20 = !DILocation(line: 14, column: 72, scope: !10)<br>
> +!21 = !DILocation(line: 15, column: 73, scope: !10)<br>
><br>
> Modified: llvm/trunk/test/DebugInfo/COFF/simple.ll<br>
> URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_test_DebugInfo_COFF_simple.ll-3Frev-3D241764-26r1-3D241763-26r2-3D241764-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Lkf653WFn6ljMMlsHNZnS2WzSACsom75XAX58eDzzVU&s=snJhCgS7nt0pkaDrw-IsFXysOLvz7WmdrPH9ERA1jhY&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/COFF/simple.ll?rev=241764&r1=241763&r2=241764&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/DebugInfo/COFF/simple.ll (original)<br>
> +++ llvm/trunk/test/DebugInfo/COFF/simple.ll Wed Jul 8 19:19:51 2015<br>
> @@ -49,7 +49,7 @@<br>
> ; X86-NEXT: [[F2_START]]:<br>
> ; X86-NEXT: .secrel32 _f<br>
> ; X86-NEXT: .secidx _f<br>
> -; X86-NEXT: .short 0<br>
> +; X86-NEXT: .short 1<br>
> ; X86-NEXT: .long [[END_OF_F]]-_f<br>
> ; X86-NEXT: [[FILE_SEGMENT_START:[^:]*]]:<br>
> ; X86-NEXT: .long 0<br>
> @@ -59,6 +59,10 @@<br>
> ; X86-NEXT: .long 4<br>
> ; X86-NEXT: .long [[RETURN_STMT]]-_f<br>
> ; X86-NEXT: .long 5<br>
> +; X86-NEXT: .short 0<br>
> +; X86-NEXT: .short 0<br>
> +; X86-NEXT: .short 0<br>
> +; X86-NEXT: .short 0<br>
> ; X86-NEXT: [[FILE_SEGMENT_END]]:<br>
> ; X86-NEXT: [[F2_END]]:<br>
> ; File index to string table offset subsection<br>
> @@ -97,11 +101,16 @@<br>
> ; OBJ32-NEXT: ]<br>
> ; OBJ32: FunctionLineTable [<br>
> ; OBJ32-NEXT: Name: _f<br>
> +; OBJ32-NEXT: Flags: 0x1<br>
> ; OBJ32-NEXT: CodeSize: 0x6<br>
> ; OBJ32-NEXT: FilenameSegment [<br>
> ; OBJ32-NEXT: Filename: D:\test.c<br>
> ; OBJ32-NEXT: +0x0: 4<br>
> ; OBJ32-NEXT: +0x5: 5<br>
> +; OBJ32-NEXT: ColStart: 0<br>
> +; OBJ32-NEXT: ColEnd: 0<br>
> +; OBJ32-NEXT: ColStart: 0<br>
> +; OBJ32-NEXT: ColEnd: 0<br>
> ; OBJ32-NEXT: ]<br>
> ; OBJ32-NEXT: ]<br>
> ; OBJ32: }<br>
> @@ -148,7 +157,7 @@<br>
> ; X64-NEXT: [[F2_START]]:<br>
> ; X64-NEXT: .secrel32 f<br>
> ; X64-NEXT: .secidx f<br>
> -; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 1<br>
> ; X64-NEXT: .long [[END_OF_F]]-f<br>
> ; X64-NEXT: [[FILE_SEGMENT_START:[^:]*]]:<br>
> ; X64-NEXT: .long 0<br>
> @@ -160,6 +169,12 @@<br>
> ; X64-NEXT: .long 4<br>
> ; X64-NEXT: .long [[EPILOG_AND_RET]]-f<br>
> ; X64-NEXT: .long 5<br>
> +; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 0<br>
> +; X64-NEXT: .short 0<br>
> ; X64-NEXT: [[FILE_SEGMENT_END]]:<br>
> ; X64-NEXT: [[F2_END]]:<br>
> ; File index to string table offset subsection<br>
> @@ -198,12 +213,19 @@<br>
> ; OBJ64-NEXT: ]<br>
> ; OBJ64: FunctionLineTable [<br>
> ; OBJ64-NEXT: Name: f<br>
> +; OBJ64-NEXT: Flags: 0x1<br>
> ; OBJ64-NEXT: CodeSize: 0xE<br>
> ; OBJ64-NEXT: FilenameSegment [<br>
> ; OBJ64-NEXT: Filename: D:\test.c<br>
> ; OBJ64-NEXT: +0x0: 3<br>
> ; OBJ64-NEXT: +0x4: 4<br>
> ; OBJ64-NEXT: +0x9: 5<br>
> +; OBJ64-NEXT: ColStart: 0<br>
> +; OBJ64-NEXT: ColEnd: 0<br>
> +; OBJ64-NEXT: ColStart: 0<br>
> +; OBJ64-NEXT: ColEnd: 0<br>
> +; OBJ64-NEXT: ColStart: 0<br>
> +; OBJ64-NEXT: ColEnd: 0<br>
> ; OBJ64-NEXT: ]<br>
> ; OBJ64-NEXT: ]<br>
> ; OBJ64: }<br>
><br>
> Modified: llvm/trunk/test/tools/llvm-readobj/codeview-linetables.test<br>
> URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_test_tools_llvm-2Dreadobj_codeview-2Dlinetables.test-3Frev-3D241764-26r1-3D241763-26r2-3D241764-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Lkf653WFn6ljMMlsHNZnS2WzSACsom75XAX58eDzzVU&s=d8VwrwE2McmwQ3ClSRpPIQ-1W4aUaXnuPf1BZUHI6Og&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/codeview-linetables.test?rev=241764&r1=241763&r2=241764&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/tools/llvm-readobj/codeview-linetables.test (original)<br>
> +++ llvm/trunk/test/tools/llvm-readobj/codeview-linetables.test Wed Jul 8 19:19:51 2015<br>
> @@ -104,6 +104,7 @@ MFUN32-NEXT: PayloadSize: 0x8<br>
> MFUN32: ]<br>
> MFUN32-NEXT: FunctionLineTable [<br>
> MFUN32-NEXT: FunctionName: _x<br>
> +MFUN32-NEXT: Flags: 0x0<br>
> MFUN32-NEXT: CodeSize: 0xA<br>
> MFUN32-NEXT: FilenameSegment [<br>
> MFUN32-NEXT: Filename: d:\source.c<br>
> @@ -114,6 +115,7 @@ MFUN32-NEXT: ]<br>
> MFUN32-NEXT: ]<br>
> MFUN32-NEXT: FunctionLineTable [<br>
> MFUN32-NEXT: FunctionName: _y<br>
> +MFUN32-NEXT: Flags: 0x0<br>
> MFUN32-NEXT: CodeSize: 0xA<br>
> MFUN32-NEXT: FilenameSegment [<br>
> MFUN32-NEXT: Filename: d:\source.c<br>
> @@ -124,6 +126,7 @@ MFUN32-NEXT: ]<br>
> MFUN32-NEXT: ]<br>
> MFUN32-NEXT: FunctionLineTable [<br>
> MFUN32-NEXT: FunctionName: _f<br>
> +MFUN32-NEXT: Flags: 0x0<br>
> MFUN32-NEXT: CodeSize: 0x14<br>
> MFUN32-NEXT: FilenameSegment [<br>
> MFUN32-NEXT: Filename: d:\source.c<br>
> @@ -201,6 +204,7 @@ MFUN64-NEXT: PayloadSize: 0x8<br>
> MFUN64: ]<br>
> MFUN64-NEXT: FunctionLineTable [<br>
> MFUN64-NEXT: FunctionName: x<br>
> +MFUN64-NEXT: Flags: 0x0<br>
> MFUN64-NEXT: CodeSize: 0xE<br>
> MFUN64-NEXT: FilenameSegment [<br>
> MFUN64-NEXT: Filename: d:\source.c<br>
> @@ -211,6 +215,7 @@ MFUN64-NEXT: ]<br>
> MFUN64-NEXT: ]<br>
> MFUN64-NEXT: FunctionLineTable [<br>
> MFUN64-NEXT: FunctionName: y<br>
> +MFUN64-NEXT: Flags: 0x0<br>
> MFUN64-NEXT: CodeSize: 0xE<br>
> MFUN64-NEXT: FilenameSegment [<br>
> MFUN64-NEXT: Filename: d:\source.c<br>
> @@ -221,6 +226,7 @@ MFUN64-NEXT: ]<br>
> MFUN64-NEXT: ]<br>
> MFUN64-NEXT: FunctionLineTable [<br>
> MFUN64-NEXT: FunctionName: f<br>
> +MFUN64-NEXT: Flags: 0x0<br>
> MFUN64-NEXT: CodeSize: 0x18<br>
> MFUN64-NEXT: FilenameSegment [<br>
> MFUN64-NEXT: Filename: d:\source.c<br>
> @@ -296,6 +302,7 @@ MFILE32-NEXT: PayloadSize: 0x8<br>
> MFILE32: ]<br>
> MFILE32-NEXT: FunctionLineTable [<br>
> MFILE32-NEXT: FunctionName: _f<br>
> +MFILE32-NEXT: Flags: 0x0<br>
> MFILE32-NEXT: CodeSize: 0x14<br>
> MFILE32-NEXT: FilenameSegment [<br>
> MFILE32-NEXT: Filename: d:\input.c<br>
> @@ -352,6 +359,7 @@ MFILE64-NEXT: PayloadSize: 0x8<br>
> MFILE64: ]<br>
> MFILE64-NEXT: FunctionLineTable [<br>
> MFILE64-NEXT: FunctionName: f<br>
> +MFILE64-NEXT: Flags: 0x0<br>
> MFILE64-NEXT: CodeSize: 0x18<br>
> MFILE64-NEXT: FilenameSegment [<br>
> MFILE64-NEXT: Filename: d:\input.c<br>
> @@ -399,6 +407,7 @@ MCOMDAT-NEXT: CodeSize: 0x7<br>
> MCOMDAT-NEXT: }<br>
> MCOMDAT: FunctionLineTable [<br>
> MCOMDAT-NEXT: FunctionName: ?f@@YAHXZ<br>
> +MCOMDAT-NEXT: Flags: 0x0<br>
> MCOMDAT-NEXT: CodeSize: 0x7<br>
> MCOMDAT-NEXT: FilenameSegment [<br>
> MCOMDAT-NEXT: Filename: c:\src\test.cc<br>
> @@ -414,6 +423,7 @@ MCOMDAT-NEXT: CodeSize: 0x7<br>
> MCOMDAT-NEXT: }<br>
> MCOMDAT: FunctionLineTable [<br>
> MCOMDAT-NEXT: FunctionName: ?g@@YAHXZ<br>
> +MCOMDAT-NEXT: Flags: 0x0<br>
> MCOMDAT-NEXT: CodeSize: 0x7<br>
> MCOMDAT-NEXT: FilenameSegment [<br>
> MCOMDAT-NEXT: Filename: c:\src\test.cc<br>
><br>
> Modified: llvm/trunk/tools/llvm-readobj/COFFDumper.cpp<br>
> URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_tools_llvm-2Dreadobj_COFFDumper.cpp-3Frev-3D241764-26r1-3D241763-26r2-3D241764-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Lkf653WFn6ljMMlsHNZnS2WzSACsom75XAX58eDzzVU&s=UYeTlxvC6QAxnKZ2vH6uWUF3GkauRJyp8DzxqweqbCw&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/COFFDumper.cpp?rev=241764&r1=241763&r2=241764&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/tools/llvm-readobj/COFFDumper.cpp (original)<br>
> +++ llvm/trunk/tools/llvm-readobj/COFFDumper.cpp Wed Jul 8 19:19:51 2015<br>
> @@ -585,7 +585,11 @@ void COFFDumper::printCodeViewDebugInfo(<br>
> W.printString("FunctionName", Name);<br>
><br>
> DataExtractor DE(FunctionLineTables[Name], true, 4);<br>
> - uint32_t Offset = 8; // Skip relocations.<br>
> + uint32_t Offset = 6; // Skip relocations.<br>
> + uint16_t Flags = DE.getU16(&Offset);<br>
> + W.printHex("Flags", Flags);<br>
> + bool HasColumnInformation =<br>
> + Flags & COFF::DEBUG_LINE_TABLES_HAVE_COLUMN_RECORDS;<br>
> uint32_t FunctionSize = DE.getU32(&Offset);<br>
> W.printHex("CodeSize", FunctionSize);<br>
> while (DE.isValidOffset(Offset)) {<br>
> @@ -595,11 +599,6 @@ void COFFDumper::printCodeViewDebugInfo(<br>
> uint32_t OffsetInIndex = DE.getU32(&Offset),<br>
> SegmentLength = DE.getU32(&Offset),<br>
> FullSegmentSize = DE.getU32(&Offset);<br>
> - if (FullSegmentSize != 12 + 8 * SegmentLength) {<br>
> - error(object_error::parse_failed);<br>
> - return;<br>
> - }<br>
> -<br>
<br>
</div></div>This broke -Werror, since FullSegmentSize is unused now. I've fixed that<br>
in r241783 by skipping it instead of reading it.<br>
<br>
Looking at it though, was removing this check related to this<br>
change/intentional? No tests fail if I add it back, which is a bit<br>
concerning.<br></blockquote><div><br></div><div>I removed it while I was adding support for the column information. I forgot to add in the augmented check when I was finished. Fixed in r241831.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class=""><div class="h5"><br>
> uint32_t FilenameOffset;<br>
> {<br>
> DataExtractor SDE(CVFileIndexToStringOffsetTable, true, 4);<br>
> @@ -636,6 +635,15 @@ void COFFDumper::printCodeViewDebugInfo(<br>
> format("+0x%X", PC).snprint(Buffer, 32);<br>
> W.printNumber(Buffer, LineNumber);<br>
> }<br>
> + if (HasColumnInformation) {<br>
> + for (unsigned J = 0; J != SegmentLength && DE.isValidOffset(Offset);<br>
> + ++J) {<br>
> + uint16_t ColStart = DE.getU16(&Offset);<br>
> + W.printNumber("ColStart", ColStart);<br>
> + uint16_t ColEnd = DE.getU16(&Offset);<br>
> + W.printNumber("ColEnd", ColEnd);<br>
> + }<br>
> + }<br>
> }<br>
> }<br>
> }<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div></div>