[llvm] r285862 - Emit S_COMPILE3 record once per TU rather than once per function

Adrian McCarthy via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 2 14:30:35 PDT 2016


Author: amccarth
Date: Wed Nov  2 16:30:35 2016
New Revision: 285862

URL: http://llvm.org/viewvc/llvm-project?rev=285862&view=rev
Log:
Emit S_COMPILE3 record once per TU rather than once per function

This has some ripple effects in several tests.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
    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/pr28747.ll
    llvm/trunk/test/DebugInfo/COFF/simple.ll
    llvm/trunk/test/MC/ARM/coff-debugging-secrel.ll
    llvm/trunk/test/MC/COFF/cv-compiler-info.ll

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp?rev=285862&r1=285861&r2=285862&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp Wed Nov  2 16:30:35 2016
@@ -391,6 +391,11 @@ void CodeViewDebug::endModule() {
   // Use the generic .debug$S section, and make a subsection for all the inlined
   // subprograms.
   switchToDebugSectionForSymbol(nullptr);
+
+  MCSymbol *CompilerInfo = beginCVSubsection(ModuleSubstreamKind::Symbols);
+  emitCompilerInformation();
+  endCVSubsection(CompilerInfo);
+
   emitInlineeLinesSubsection();
 
   // Emit per-function debug information.
@@ -2131,8 +2136,6 @@ MCSymbol *CodeViewDebug::beginCVSubsecti
   OS.AddComment("Subsection size");
   OS.emitAbsoluteSymbolDiff(EndLabel, BeginLabel, 4);
   OS.EmitLabel(BeginLabel);
-  if (Kind == ModuleSubstreamKind::Symbols)
-    emitCompilerInformation();
   return EndLabel;
 }
 

Modified: llvm/trunk/test/DebugInfo/COFF/asm.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/COFF/asm.ll?rev=285862&r1=285861&r2=285862&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/COFF/asm.ll (original)
+++ llvm/trunk/test/DebugInfo/COFF/asm.ll Wed Nov  2 16:30:35 2016
@@ -20,38 +20,9 @@
 ; X86:      .cv_loc 0 1 6 0
 ; X86:      ret
 ; X86:      [[END_OF_F:.?Lfunc_end.*]]:
-;
-; X86-LABEL: .section        .debug$S,"dr"
-; X86-NEXT: .p2align 2
-; X86-NEXT: .long   4
-; Symbol subsection
-; X86-NEXT: .long   241
-; X86-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] #
-; Compiler information record
-; X86-NEXT: [[F1_START]]:
-; X86-NEXT: .short [[C1_END:.*]]-[[C1_START:.*]] #
-; X86:      [[C1_END]]:
-; X86-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
-; X86-NEXT: [[PROC_SEGMENT_START]]:
-; X86-NEXT: .short  4423
-; X86-NEXT: .long   0
-; X86-NEXT: .long   0
-; X86-NEXT: .long   0
-; X86-NEXT: .long [[END_OF_F]]-_f
-; X86-NEXT: .long   0
-; X86-NEXT: .long   0
-; X86-NEXT: .long   4098
-; X86-NEXT: .secrel32 _f
-; X86-NEXT: .secidx _f
-; X86-NEXT: .byte   0
-; X86-NEXT: .asciz "f"
-; X86-NEXT: [[PROC_SEGMENT_END]]:
-; X86-NEXT: .short  2
-; X86-NEXT: .short  4431
-; X86-NEXT: [[F1_END]]:
-; X86-NEXT: .p2align 2
+
 ; Line table
-; X86-NEXT: .cv_linetable 0, _f, [[END_OF_F]]
+; X86:      .cv_linetable 0, _f, [[END_OF_F]]
 ; File index to string table offset subsection
 ; X86-NEXT: .cv_filechecksums
 ; String table
@@ -61,12 +32,6 @@
 ; OBJ32:      Name: .debug$S (2E 64 65 62 75 67 24 53)
 ; OBJ32:      Characteristics [ (0x42300040)
 ; OBJ32:      ]
-; OBJ32:      Relocations [
-; OBJ32-NEXT:   0x59 IMAGE_REL_I386_SECREL _f
-; OBJ32-NEXT:   0x5D IMAGE_REL_I386_SECTION _f
-; OBJ32-NEXT:   0x70 IMAGE_REL_I386_SECREL _f
-; OBJ32-NEXT:   0x74 IMAGE_REL_I386_SECTION _f
-; OBJ32-NEXT: ]
 ; OBJ32:    CodeViewDebugInfo [
 ; OBJ32:      Subsection [
 ; OBJ32-NEXT:   SubSectionType: Symbols (0xF1)
@@ -115,38 +80,9 @@
 ; X64:      addq    $40, %rsp
 ; X64-NEXT: ret
 ; X64:      [[END_OF_F:.?Lfunc_end.*]]:
-;
-; X64-LABEL: .section        .debug$S,"dr"
-; X64-NEXT: .p2align 2
-; X64-NEXT: .long   4
-; Symbol subsection
-; X64-NEXT: .long   241
-; X64-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] #
-; Compiler information record
-; X64-NEXT: [[F1_START]]:
-; X64-NEXT: .short [[C1_END:.*]]-[[C1_START:.*]] #
-; X64:      [[C1_END]]:
-; X64-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
-; X64-NEXT: [[PROC_SEGMENT_START]]:
-; X64-NEXT: .short  4423
-; X64-NEXT: .long   0
-; X64-NEXT: .long   0
-; X64-NEXT: .long   0
-; X64-NEXT: .long [[END_OF_F]]-f
-; X64-NEXT: .long   0
-; X64-NEXT: .long   0
-; X64-NEXT: .long   4098
-; X64-NEXT: .secrel32 f
-; X64-NEXT: .secidx f
-; X64-NEXT: .byte   0
-; X64-NEXT: .asciz "f"
-; X64-NEXT: [[PROC_SEGMENT_END]]:
-; X64-NEXT: .short  2
-; X64-NEXT: .short  4431
-; X64-NEXT: [[F1_END]]:
-; X64-NEXT: .p2align 2
+
 ; Line table
-; X64-NEXT: .cv_linetable 0, f, [[END_OF_F]]
+; X64:      .cv_linetable 0, f, [[END_OF_F]]
 ; File index to string table offset subsection
 ; X64-NEXT: .cv_filechecksums
 ; String table
@@ -156,12 +92,6 @@
 ; OBJ64:      Name: .debug$S (2E 64 65 62 75 67 24 53)
 ; OBJ64:      Characteristics [ (0x42300040)
 ; OBJ64:      ]
-; OBJ64:      Relocations [
-; OBJ64-NEXT:   0x59 IMAGE_REL_AMD64_SECREL f
-; OBJ64-NEXT:   0x5D IMAGE_REL_AMD64_SECTION f
-; OBJ64-NEXT:   0x70 IMAGE_REL_AMD64_SECREL f
-; OBJ64-NEXT:   0x74 IMAGE_REL_AMD64_SECTION f
-; OBJ64-NEXT: ]
 ; OBJ64:      Subsection [
 ; OBJ64-NEXT:   SubSectionType: Symbols (0xF1)
 ; OBJ64:        ProcStart {

Modified: llvm/trunk/test/DebugInfo/COFF/multifile.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/COFF/multifile.ll?rev=285862&r1=285861&r2=285862&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/COFF/multifile.ll (original)
+++ llvm/trunk/test/DebugInfo/COFF/multifile.ll Wed Nov  2 16:30:35 2016
@@ -29,38 +29,9 @@
 ; X86:      .cv_loc 0 1 8 0 # one.c:8:0
 ; X86:      ret
 ; X86:      [[END_OF_F:.?Lfunc_end.*]]:
-;
-; X86-LABEL: .section        .debug$S,"dr"
-; X86-NEXT: .p2align 2
-; X86-NEXT: .long   4
-; Symbol subsection
-; X86-NEXT: .long   241
-; X86-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] #
-; Compiler information record
-; X86-NEXT: [[F1_START]]:
-; X86-NEXT: .short [[C1_END:.*]]-[[C1_START:.*]] #
-; X86:      [[C1_END]]:
-; X86-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
-; X86-NEXT: [[PROC_SEGMENT_START]]:
-; X86-NEXT: .short  4423
-; X86-NEXT: .long   0
-; X86-NEXT: .long   0
-; X86-NEXT: .long   0
-; X86-NEXT: .long [[END_OF_F]]-_f
-; X86-NEXT: .long   0
-; X86-NEXT: .long   0
-; X86-NEXT: .long   4098
-; X86-NEXT: .secrel32 _f
-; X86-NEXT: .secidx _f
-; X86-NEXT: .byte   0
-; X86-NEXT: .asciz "f"
-; X86-NEXT: [[PROC_SEGMENT_END]]:
-; X86-NEXT: .short  2
-; X86-NEXT: .short  4431
-; X86-NEXT: [[F1_END]]:
-; X86-NEXT: .p2align   2
+
 ; Line table
-; X86-NEXT: .cv_linetable 0, _f, [[END_OF_F]]
+; X86:      .cv_linetable 0, _f, [[END_OF_F]]
 ; File index to string table offset subsection
 ; X86-NEXT: .cv_filechecksums
 ; String table
@@ -70,12 +41,6 @@
 ; OBJ32:      Name: .debug$S (2E 64 65 62 75 67 24 53)
 ; OBJ32:      Characteristics [ (0x42300040)
 ; OBJ32:      ]
-; OBJ32:      Relocations [
-; OBJ32-NEXT:   0x59 IMAGE_REL_I386_SECREL _f
-; OBJ32-NEXT:   0x5D IMAGE_REL_I386_SECTION _f
-; OBJ32-NEXT:   0x70 IMAGE_REL_I386_SECREL _f
-; OBJ32-NEXT:   0x74 IMAGE_REL_I386_SECTION _f
-; OBJ32-NEXT: ]
 ; OBJ32:      Subsection [
 ; OBJ32-NEXT:   SubSectionType: Symbols (0xF1)
 ; OBJ32:        ProcStart {
@@ -139,36 +104,7 @@
 ; X64:      addq    $40, %rsp
 ; X64-NEXT: ret
 ; X64:      [[END_OF_F:.?Lfunc_end.*]]:
-;
-; X64-LABEL: .section        .debug$S,"dr"
-; X64-NEXT: .p2align 2
-; X64-NEXT: .long   4
-; Symbol subsection
-; X64-NEXT: .long   241
-; X64-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] #
-; Compiler information record
-; X64-NEXT: [[F1_START]]:
-; X64-NEXT: .short [[C1_END:.*]]-[[C1_START:.*]] #
-; X64:      [[C1_END]]:
-; X64-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
-; X64-NEXT: [[PROC_SEGMENT_START]]:
-; X64-NEXT: .short  4423
-; X64-NEXT: .long   0
-; X64-NEXT: .long   0
-; X64-NEXT: .long   0
-; X64-NEXT: .long [[END_OF_F]]-f
-; X64-NEXT: .long   0
-; X64-NEXT: .long   0
-; X64-NEXT: .long   4098
-; X64-NEXT: .secrel32 f
-; X64-NEXT: .secidx f
-; X64-NEXT: .byte   0
-; X64-NEXT: .asciz "f"
-; X64-NEXT: [[PROC_SEGMENT_END]]:
-; X64-NEXT: .short  2
-; X64-NEXT: .short  4431
-; X64-NEXT: [[F1_END]]:
-; X64-NEXT: .p2align   2
+
 ; X64: .cv_linetable 0, f, [[END_OF_F]]
 ; X64: .cv_filechecksums
 ; X64: .cv_stringtable
@@ -177,12 +113,6 @@
 ; OBJ64:      Name: .debug$S (2E 64 65 62 75 67 24 53)
 ; OBJ64:      Characteristics [ (0x42300040)
 ; OBJ64:      ]
-; OBJ64:      Relocations [
-; OBJ64-NEXT:   0x59 IMAGE_REL_AMD64_SECREL f
-; OBJ64-NEXT:   0x5D IMAGE_REL_AMD64_SECTION f
-; OBJ64-NEXT:   0x70 IMAGE_REL_AMD64_SECREL f
-; OBJ64-NEXT:   0x74 IMAGE_REL_AMD64_SECTION f
-; OBJ64-NEXT: ]
 ; OBJ64:      Subsection [
 ; OBJ64-NEXT:   SubSectionType: Symbols (0xF1)
 ; OBJ64:        ProcStart {

Modified: llvm/trunk/test/DebugInfo/COFF/multifunction.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/COFF/multifunction.ll?rev=285862&r1=285861&r2=285862&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/COFF/multifunction.ll (original)
+++ llvm/trunk/test/DebugInfo/COFF/multifunction.ll Wed Nov  2 16:30:35 2016
@@ -54,13 +54,17 @@
 ; X86-LABEL: .section        .debug$S,"dr"
 ; X86-NEXT: .p2align 2
 ; X86-NEXT: .long   4
+; X86-NEXT: .long   241
+; X86-NEXT: .long [[COMPILE_END:.*]]-[[COMPILE_START:.*]] #
+; Compiler information record
+; X86-NEXT: [[COMPILE_START]]:
+; X86-NEXT: .short [[C1_END:.*]]-[[C1_START:.*]] #
+; X86:      [[COMPILE_END]]:
+; X86-NEXT: .p2align 2
 ; Symbol subsection for x
 ; X86-NEXT: .long   241
 ; X86-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] #
-; Compiler information record
 ; X86-NEXT: [[F1_START]]:
-; X86-NEXT: .short [[C1_END:.*]]-[[C1_START:.*]] #
-; X86:      [[C1_END]]:
 ; X86-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
 ; X86-NEXT: [[PROC_SEGMENT_START]]:
 ; X86-NEXT: .short  4422
@@ -84,11 +88,8 @@
 ; X86: .cv_linetable 0, _x, [[END_OF_X]]
 ; Symbol subsection for y
 ; X86-NEXT: .long   241
-; X86-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] #
-; Compiler information record
-; X86-NEXT: [[F1_START]]:
-; X86-NEXT: .short [[C1_END:.*]]-[[C1_START:.*]] #
-; X86:      [[C1_END]]:
+; X86-NEXT: .long [[COMPILE_END:.*]]-[[COMPILE_START:.*]] #
+; X86-NEXT: [[COMPILE_START]]:
 ; X86-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
 ; X86-NEXT: [[PROC_SEGMENT_START]]:
 ; X86-NEXT: .short  4423
@@ -106,17 +107,14 @@
 ; X86-NEXT: [[PROC_SEGMENT_END]]:
 ; X86-NEXT: .short  2
 ; X86-NEXT: .short  4431
-; X86-NEXT: [[F1_END]]:
+; X86-NEXT: [[COMPILE_END]]:
 ; X86-NEXT: .p2align 2
 ; Line table subsection for y
 ; X86: .cv_linetable 1, _y, [[END_OF_Y]]
 ; Symbol subsection for f
 ; X86-NEXT: .long   241
-; X86-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] #
-; Compiler information record
-; X86-NEXT: [[F1_START]]:
-; X86-NEXT: .short [[C1_END:.*]]-[[C1_START:.*]] #
-; X86:      [[C1_END]]:
+; X86-NEXT: .long [[COMPILE_END:.*]]-[[COMPILE_START:.*]] #
+; X86-NEXT: [[COMPILE_START]]:
 ; X86-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
 ; X86-NEXT: [[PROC_SEGMENT_START]]:
 ; X86-NEXT: .short  4423
@@ -134,7 +132,7 @@
 ; X86-NEXT: [[PROC_SEGMENT_END]]:
 ; X86-NEXT: .short  2
 ; X86-NEXT: .short  4431
-; X86-NEXT: [[F1_END]]:
+; X86-NEXT: [[COMPILE_END]]:
 ; X86-NEXT: .p2align 2
 ; Line table subsection for f
 ; X86: .cv_linetable 2, _f, [[END_OF_F]]
@@ -145,20 +143,6 @@
 ; OBJ32:      Name: .debug$S (2E 64 65 62 75 67 24 53)
 ; OBJ32:      Characteristics [ (0x42300040)
 ; OBJ32:      ]
-; OBJ32:      Relocations [
-; OBJ32-NEXT:   0x59 IMAGE_REL_I386_SECREL _x
-; OBJ32-NEXT:   0x5D IMAGE_REL_I386_SECTION _x
-; OBJ32-NEXT:   0x70 IMAGE_REL_I386_SECREL _x
-; OBJ32-NEXT:   0x74 IMAGE_REL_I386_SECTION _x
-; OBJ32-NEXT:   0xF5 IMAGE_REL_I386_SECREL _y
-; OBJ32-NEXT:   0xF9 IMAGE_REL_I386_SECTION _y
-; OBJ32-NEXT:   0x10C IMAGE_REL_I386_SECREL _y
-; OBJ32-NEXT:   0x110 IMAGE_REL_I386_SECTION _y
-; OBJ32-NEXT:   0x191 IMAGE_REL_I386_SECREL _f
-; OBJ32-NEXT:   0x195 IMAGE_REL_I386_SECTION _f
-; OBJ32-NEXT:   0x1A8 IMAGE_REL_I386_SECREL _f
-; OBJ32-NEXT:   0x1AC IMAGE_REL_I386_SECTION _f
-; OBJ32-NEXT: ]
 ; OBJ32:      Subsection [
 ; OBJ32-NEXT:   SubSectionType: Symbols (0xF1)
 ; OBJ32:        ProcStart {
@@ -324,16 +308,21 @@
 ; X64-NEXT: ret
 ; X64:      [[END_OF_F:.?Lfunc_end.*]]:
 ;
+
 ; X64-LABEL: .section        .debug$S,"dr"
 ; X64-NEXT: .p2align 2
 ; X64-NEXT: .long   4
-; Symbol subsection for x
 ; X64-NEXT: .long   241
-; X64-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] #
+; X64-NEXT: .long [[COMPILE_END:.*]]-[[COMPILE_START:.*]] #
 ; Compiler information record
-; X64-NEXT: [[F1_START]]:
+; X64-NEXT: [[COMPILE_START]]:
 ; X64-NEXT: .short [[C1_END:.*]]-[[C1_START:.*]] #
-; X64:      [[C1_END]]:
+; X64:      [[COMPILE_END]]:
+; X64-NEXT: .p2align 2
+; Symbol subsection for x
+; X64-NEXT: .long   241
+; X64-NEXT: .long  [[F1_END:.*]]-[[F1_START:.*]] #
+; X64-NEXT: [[F1_START]]:
 ; X64-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
 ; X64-NEXT: [[PROC_SEGMENT_START]]:
 ; X64-NEXT: .short  4422
@@ -357,11 +346,8 @@
 ; X64: .cv_linetable 0, x, [[END_OF_X]]
 ; Symbol subsection for y
 ; X64-NEXT: .long   241
-; X64-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] #
-; Compiler information record
-; X64-NEXT: [[F1_START]]:
-; X64-NEXT: .short [[C1_END:.*]]-[[C1_START:.*]] #
-; X64:      [[C1_END]]:
+; X64-NEXT: .long [[COMPILE_END:.*]]-[[COMPILE_START:.*]] #
+; X64-NEXT: [[COMPILE_START]]:
 ; X64-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
 ; X64-NEXT: [[PROC_SEGMENT_START]]:
 ; X64-NEXT: .short  4423
@@ -379,17 +365,14 @@
 ; X64-NEXT: [[PROC_SEGMENT_END]]:
 ; X64-NEXT: .short  2
 ; X64-NEXT: .short  4431
-; X64-NEXT: [[F1_END]]:
+; X64-NEXT: [[COMPILE_END]]:
 ; X64-NEXT: .p2align 2
 ; Line table subsection for y
 ; X64: .cv_linetable 1, y, [[END_OF_Y]]
 ; Symbol subsection for f
 ; X64-NEXT: .long   241
-; X64-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] #
-; Compiler information record
-; X64-NEXT: [[F1_START]]:
-; X64-NEXT: .short [[C1_END:.*]]-[[C1_START:.*]] #
-; X64:      [[C1_END]]:
+; X64-NEXT: .long [[COMPILE_END:.*]]-[[COMPILE_START:.*]] #
+; X64:      [[COMPILE_START]]:
 ; X64-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
 ; X64-NEXT: [[PROC_SEGMENT_START]]:
 ; X64-NEXT: .short  4423
@@ -407,7 +390,7 @@
 ; X64-NEXT: [[PROC_SEGMENT_END]]:
 ; X64-NEXT: .short  2
 ; X64-NEXT: .short  4431
-; X64-NEXT: [[F1_END]]:
+; X64-NEXT: [[COMPILE_END]]:
 ; X64-NEXT: .p2align 2
 ; Line table subsection for f
 ; X64: .cv_linetable 2, f, [[END_OF_F]]
@@ -421,18 +404,18 @@
 ; OBJ64:      Characteristics [ (0x42300040)
 ; OBJ64:      ]
 ; OBJ64:      Relocations [
-; OBJ64-NEXT:   0x59 IMAGE_REL_AMD64_SECREL x
-; OBJ64-NEXT:   0x5D IMAGE_REL_AMD64_SECTION x
-; OBJ64-NEXT:   0x70 IMAGE_REL_AMD64_SECREL x
-; OBJ64-NEXT:   0x74 IMAGE_REL_AMD64_SECTION x
-; OBJ64-NEXT:   0x101 IMAGE_REL_AMD64_SECREL y
-; OBJ64-NEXT:   0x105 IMAGE_REL_AMD64_SECTION y
-; OBJ64-NEXT:   0x118 IMAGE_REL_AMD64_SECREL y
-; OBJ64-NEXT:   0x11C IMAGE_REL_AMD64_SECTION y
-; OBJ64-NEXT:   0x1A9 IMAGE_REL_AMD64_SECREL f
-; OBJ64-NEXT:   0x1AD IMAGE_REL_AMD64_SECTION f
-; OBJ64-NEXT:   0x1C0 IMAGE_REL_AMD64_SECREL f
-; OBJ64-NEXT:   0x1C4 IMAGE_REL_AMD64_SECTION f
+; OBJ64-NEXT:   0x64 IMAGE_REL_AMD64_SECREL x
+; OBJ64-NEXT:   0x68 IMAGE_REL_AMD64_SECTION x
+; OBJ64-NEXT:   0x7C IMAGE_REL_AMD64_SECREL x
+; OBJ64-NEXT:   0x80 IMAGE_REL_AMD64_SECTION x
+; OBJ64-NEXT:   0xE0 IMAGE_REL_AMD64_SECREL y
+; OBJ64-NEXT:   0xE4 IMAGE_REL_AMD64_SECTION y
+; OBJ64-NEXT:   0xF8 IMAGE_REL_AMD64_SECREL y
+; OBJ64-NEXT:   0xFC IMAGE_REL_AMD64_SECTION y
+; OBJ64-NEXT:   0x15C IMAGE_REL_AMD64_SECREL f
+; OBJ64-NEXT:   0x160 IMAGE_REL_AMD64_SECTION f
+; OBJ64-NEXT:   0x174 IMAGE_REL_AMD64_SECREL f
+; OBJ64-NEXT:   0x178 IMAGE_REL_AMD64_SECTION f
 ; OBJ64-NEXT: ]
 ; OBJ64:      Subsection [
 ; OBJ64-NEXT:   SubSectionType: Symbols (0xF1)

Modified: llvm/trunk/test/DebugInfo/COFF/pr28747.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/COFF/pr28747.ll?rev=285862&r1=285861&r2=285862&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/COFF/pr28747.ll (original)
+++ llvm/trunk/test/DebugInfo/COFF/pr28747.ll Wed Nov  2 16:30:35 2016
@@ -1,8 +1,14 @@
 ; RUN: llc < %s | FileCheck %s
-
 ; CHECK:             .section .debug$S,"dr"{{$}}
 ; CHECK-NEXT:        .p2align 2
 ; CHECK-NEXT:        .long 4
+; CHECK-NEXT:        .long	241
+; CHECK-NEXT:        .long	[[SUBSEC_END:.*]]-[[SUBSEC_START:.*]] # Subsection size
+; CHECK-NEXT:        [[SUBSEC_START]]:
+; CHECK-NEXT:        .short	[[C1_END:.*]]-[[C1_START:.*]] # Record length
+; CHECK:             [[C1_END]]:
+; CHECK-NEXT:        [[SUBSEC_END]]:
+; CHECK-NEXT:        .p2align 2
 ; CHECK-NEXT:        .cv_filechecksums
 ; CHECK-NEXT:        .cv_stringtable
 

Modified: llvm/trunk/test/DebugInfo/COFF/simple.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/COFF/simple.ll?rev=285862&r1=285861&r2=285862&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/COFF/simple.ll (original)
+++ llvm/trunk/test/DebugInfo/COFF/simple.ll Wed Nov  2 16:30:35 2016
@@ -25,11 +25,16 @@
 ; X86-NEXT: .long   4
 ; Symbol subsection
 ; X86-NEXT: .long   241
-; X86-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] #
+; X86-NEXT: .long [[COMPILE_END:.*]]-[[COMPILE_START:.*]] #
 ; Compiler information record
-; X86-NEXT: [[F1_START]]:
+; X86-NEXT: [[COMPILE_START]]:
 ; X86-NEXT: .short [[C1_END:.*]]-[[C1_START:.*]] #
 ; X86:      [[C1_END]]:
+; X86-NEXT: [[COMPILE_END]]:
+; X86-NEXT: .p2align	2
+; X86-NEXT:	.long	241  # Symbol subsection for f
+; X86-NEXT:	.long	[[F1_END:.*]]-[[F1_START:.*]] # Subsection size
+; X86-NEXT: [[F1_START]]:
 ; X86-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
 ; X86-NEXT: [[PROC_SEGMENT_START]]:
 ; X86-NEXT: .short  4423
@@ -61,10 +66,10 @@
 ; OBJ32:      Characteristics [ (0x42300040)
 ; OBJ32:      ]
 ; OBJ32:      Relocations [
-; OBJ32-NEXT:   0x59 IMAGE_REL_I386_SECREL _f
-; OBJ32-NEXT:   0x5D IMAGE_REL_I386_SECTION _f
-; OBJ32-NEXT:   0x70 IMAGE_REL_I386_SECREL _f
-; OBJ32-NEXT:   0x74 IMAGE_REL_I386_SECTION _f
+; OBJ32-NEXT:   0x64 IMAGE_REL_I386_SECREL _f
+; OBJ32-NEXT:   0x68 IMAGE_REL_I386_SECTION _f
+; OBJ32-NEXT:   0x7C IMAGE_REL_I386_SECREL _f
+; OBJ32-NEXT:   0x80 IMAGE_REL_I386_SECTION _f
 ; OBJ32-NEXT: ]
 ; OBJ32:      Subsection [
 ; OBJ32-NEXT:   SubSectionType: Symbols (0xF1)
@@ -117,11 +122,16 @@
 ; X64-NEXT: .long   4
 ; Symbol subsection
 ; X64-NEXT: .long   241
-; X64-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] #
+; X64-NEXT: .long [[COMPILE_END:.*]]-[[COMPILE_START:.*]] #
 ; Compiler information record
-; X64-NEXT: [[F1_START]]:
+; X64-NEXT: [[COMPILE_START]]:
 ; X64-NEXT: .short [[C1_END:.*]]-[[C1_START:.*]] #
 ; X64:      [[C1_END]]:
+; X64-NEXT: [[COMPILE_END]]:
+; X64-NEXT: .p2align	2
+; X64-NEXT:	.long	241  # Symbol subsection for f
+; X64-NEXT:	.long	[[F1_END:.*]]-[[F1_START:.*]] # Subsection size
+; X64-NEXT: [[F1_START]]:
 ; X64-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
 ; X64-NEXT: [[PROC_SEGMENT_START]]:
 ; X64-NEXT: .short  4423
@@ -153,10 +163,10 @@
 ; OBJ64:      Characteristics [ (0x42300040)
 ; OBJ64:      ]
 ; OBJ64:      Relocations [
-; OBJ64-NEXT:   0x59 IMAGE_REL_AMD64_SECREL f
-; OBJ64-NEXT:   0x5D IMAGE_REL_AMD64_SECTION f
-; OBJ64-NEXT:   0x70 IMAGE_REL_AMD64_SECREL f
-; OBJ64-NEXT:   0x74 IMAGE_REL_AMD64_SECTION f
+; OBJ64-NEXT:   0x64 IMAGE_REL_AMD64_SECREL f
+; OBJ64-NEXT:   0x68 IMAGE_REL_AMD64_SECTION f
+; OBJ64-NEXT:   0x7C IMAGE_REL_AMD64_SECREL f
+; OBJ64-NEXT:   0x80 IMAGE_REL_AMD64_SECTION f
 ; OBJ64-NEXT: ]
 ; OBJ64:      Subsection [
 ; OBJ64-NEXT:   SubSectionType: Symbols (0xF1)

Modified: llvm/trunk/test/MC/ARM/coff-debugging-secrel.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/coff-debugging-secrel.ll?rev=285862&r1=285861&r2=285862&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/coff-debugging-secrel.ll (original)
+++ llvm/trunk/test/MC/ARM/coff-debugging-secrel.ll Wed Nov  2 16:30:35 2016
@@ -42,10 +42,10 @@ entry:
 
 ; CHECK-MSVC: Relocations [
 ; CHECK-MSVC:   Section {{.*}} .debug$S {
-; CHECK-MSVC:     0x5A IMAGE_REL_ARM_SECREL function
-; CHECK-MSVC:     0x5E IMAGE_REL_ARM_SECTION function
-; CHECK-MSVC:     0x78 IMAGE_REL_ARM_SECREL function
-; CHECK-MSVC:     0x7C IMAGE_REL_ARM_SECTION function
+; CHECK-MSVC:     0x64 IMAGE_REL_ARM_SECREL function
+; CHECK-MSVC:     0x68 IMAGE_REL_ARM_SECTION function
+; CHECK-MSVC:     0x80 IMAGE_REL_ARM_SECREL function
+; CHECK-MSVC:     0x84 IMAGE_REL_ARM_SECTION function
 ; CHECK-MSVC:   }
 ; CHECK-MSVC: ]
 

Modified: llvm/trunk/test/MC/COFF/cv-compiler-info.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/COFF/cv-compiler-info.ll?rev=285862&r1=285861&r2=285862&view=diff
==============================================================================
--- llvm/trunk/test/MC/COFF/cv-compiler-info.ll (original)
+++ llvm/trunk/test/MC/COFF/cv-compiler-info.ll Wed Nov  2 16:30:35 2016
@@ -17,16 +17,9 @@ attributes #0 = { nounwind sspstrong "co
 !llvm.ident = !{!9}
 
 !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 4.0.0 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
-; The debug$S section should begin with an S_COMPILE3 record that identifies the
+; One .debug$S section should contain an S_COMPILE3 record that identifies the
 ; source language and the version of the compiler based on the DICompileUnit.
 ; CHECK: 	.section	.debug$S,"dr"
-; CHECK: 		.p2align	2
-; CHECK: 		.long	4                       # Debug section magic
-; CHECK: 		.long	241                     # Symbol subsection for foo
-; CHECK: 		.long	Ltmp3-Ltmp2             # Subsection size
-; CHECK: 	Ltmp2:
-; CHECK: 		.short	Ltmp5-Ltmp4           # Record length
-; CHECK: 	Ltmp4:
 ; CHECK: 		.short	4412                  # Record kind: S_COMPILE3
 ; CHECK: 		.long	1                       # Flags and language
 ; CHECK: 		.short	7                     # CPUType
@@ -39,7 +32,7 @@ attributes #0 = { nounwind sspstrong "co
 ; CHECK: 		.short	0
 ; CHECK: 		.short	0
 ; CHECK: 		.asciz	"clang version 4.0.0 "  # Null-terminated compiler version string
-; CHECK:  Ltmp5:
+; CHECK-NOT: .short	4412                  # Record kind: S_COMPILE3
 !1 = !DIFile(filename: "D:\5Csrc\5Cscopes\5Cfoo.cpp", directory: "D:\5Csrc\5Cscopes\5Cclang")
 !2 = !{}
 !3 = !{i32 6, !"Linker Options", !4}




More information about the llvm-commits mailing list