Index: lib/CodeGen/AsmPrinter/CodeViewDebug.cpp =================================================================== --- lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -391,6 +391,11 @@ // 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. @@ -2133,8 +2138,6 @@ OS.AddComment("Subsection size"); OS.emitAbsoluteSymbolDiff(EndLabel, BeginLabel, 4); OS.EmitLabel(BeginLabel); - if (Kind == ModuleSubstreamKind::Symbols) - emitCompilerInformation(); return EndLabel; } Index: test/DebugInfo/COFF/asm.ll =================================================================== --- test/DebugInfo/COFF/asm.ll +++ test/DebugInfo/COFF/asm.ll @@ -31,6 +31,11 @@ ; X86-NEXT: [[F1_START]]: ; X86-NEXT: .short [[C1_END:.*]]-[[C1_START:.*]] # ; X86: [[C1_END]]: +; X86-NEXT: [[F1_END]]: +; X86-NEXT: .p2align 2 +; X86-NEXT: .long 241 # Symbol subsection for f +; X86-NEXT: .long [[SUBSEC_END:.*]]-[[SUBSEC_START:.*]] # Subsection size +; X86-NEXT: [[SUBSEC_START]]: ; X86-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] # ; X86-NEXT: [[PROC_SEGMENT_START]]: ; X86-NEXT: .short 4423 @@ -48,7 +53,7 @@ ; X86-NEXT: [[PROC_SEGMENT_END]]: ; X86-NEXT: .short 2 ; X86-NEXT: .short 4431 -; X86-NEXT: [[F1_END]]: +; X86-NEXT: [[SUBSEC_END]]: ; X86-NEXT: .p2align 2 ; Line table ; X86-NEXT: .cv_linetable 0, _f, [[END_OF_F]] @@ -62,10 +67,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: CodeViewDebugInfo [ ; OBJ32: Subsection [ @@ -126,6 +131,11 @@ ; X64-NEXT: [[F1_START]]: ; X64-NEXT: .short [[C1_END:.*]]-[[C1_START:.*]] # ; X64: [[C1_END]]: +; X64-NEXT: [[F1_END]]: +; X64-NEXT: .p2align 2 +; X64-NEXT: .long 241 # Symbol subsection for f +; X64-NEXT: .long [[SUBSEC_END:.*]]-[[SUBSEC_START:.*]] # Subsection size +; X64-NEXT: [[SUBSEC_START]]: ; X64-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] # ; X64-NEXT: [[PROC_SEGMENT_START]]: ; X64-NEXT: .short 4423 @@ -143,7 +153,7 @@ ; X64-NEXT: [[PROC_SEGMENT_END]]: ; X64-NEXT: .short 2 ; X64-NEXT: .short 4431 -; X64-NEXT: [[F1_END]]: +; X64-NEXT: [[SUBSEC_END]]: ; X64-NEXT: .p2align 2 ; Line table ; X64-NEXT: .cv_linetable 0, f, [[END_OF_F]] @@ -157,10 +167,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) Index: test/DebugInfo/COFF/multifile.ll =================================================================== --- test/DebugInfo/COFF/multifile.ll +++ test/DebugInfo/COFF/multifile.ll @@ -40,6 +40,11 @@ ; X86-NEXT: [[F1_START]]: ; X86-NEXT: .short [[C1_END:.*]]-[[C1_START:.*]] # ; X86: [[C1_END]]: +; X86-NEXT: [[F1_END]]: +; X86-NEXT: .p2align 2 +; X86-NEXT: .long 241 # Symbol subsection for f +; X86-NEXT: .long [[SUBSEC_END:.*]]-[[SUBSEC_START:.*]] # Subsection size +; X86-NEXT: [[SUBSEC_START]]: ; X86-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] # ; X86-NEXT: [[PROC_SEGMENT_START]]: ; X86-NEXT: .short 4423 @@ -57,7 +62,7 @@ ; X86-NEXT: [[PROC_SEGMENT_END]]: ; X86-NEXT: .short 2 ; X86-NEXT: .short 4431 -; X86-NEXT: [[F1_END]]: +; X86-NEXT: [[SUBSEC_END]]: ; X86-NEXT: .p2align 2 ; Line table ; X86-NEXT: .cv_linetable 0, _f, [[END_OF_F]] @@ -71,10 +76,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) @@ -150,6 +155,11 @@ ; X64-NEXT: [[F1_START]]: ; X64-NEXT: .short [[C1_END:.*]]-[[C1_START:.*]] # ; X64: [[C1_END]]: +; X64-NEXT: [[F1_END]]: +; X64-NEXT: .p2align 2 +; X64-NEXT: .long 241 # Symbol subsection for f +; X64-NEXT: .long [[SUBSEC_END:.*]]-[[SUBSEC_START:.*]] # Subsection size +; X64-NEXT: [[SUBSEC_START]]: ; X64-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] # ; X64-NEXT: [[PROC_SEGMENT_START]]: ; X64-NEXT: .short 4423 @@ -167,7 +177,7 @@ ; X64-NEXT: [[PROC_SEGMENT_END]]: ; X64-NEXT: .short 2 ; X64-NEXT: .short 4431 -; X64-NEXT: [[F1_END]]: +; X64-NEXT: [[SUBSEC_END]]: ; X64-NEXT: .p2align 2 ; X64: .cv_linetable 0, f, [[END_OF_F]] ; X64: .cv_filechecksums @@ -178,10 +188,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) Index: test/DebugInfo/COFF/multifunction.ll =================================================================== --- test/DebugInfo/COFF/multifunction.ll +++ test/DebugInfo/COFF/multifunction.ll @@ -54,13 +54,17 @@ ; X86-LABEL: .section .debug$S,"dr" ; X86-NEXT: .p2align 2 ; X86-NEXT: .long 4 -; 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: [[F1_END]]: +; X86-NEXT: .p2align 2 +; Symbol subsection for x +; X86-NEXT: .long 241 +; X86-NEXT: .long [[SUBSEC_END:.*]]-[[SUBSEC_START:.*]] # +; X86-NEXT: [[SUBSEC_START]]: ; X86-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] # ; X86-NEXT: [[PROC_SEGMENT_START]]: ; X86-NEXT: .short 4422 @@ -78,17 +82,14 @@ ; X86-NEXT: [[PROC_SEGMENT_END]]: ; X86-NEXT: .short 2 ; X86-NEXT: .short 4431 -; X86-NEXT: [[F1_END]]: +; X86-NEXT: [[SUBSEC_END]]: ; X86-NEXT: .p2align 2 ; Line table subsection for x ; 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: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] # ; X86-NEXT: [[PROC_SEGMENT_START]]: ; X86-NEXT: .short 4423 @@ -113,10 +114,7 @@ ; 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: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] # ; X86-NEXT: [[PROC_SEGMENT_START]]: ; X86-NEXT: .short 4423 @@ -146,18 +144,18 @@ ; 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: 0x64 IMAGE_REL_I386_SECREL _x +; OBJ32-NEXT: 0x68 IMAGE_REL_I386_SECTION _x +; OBJ32-NEXT: 0x7C IMAGE_REL_I386_SECREL _x +; OBJ32-NEXT: 0x80 IMAGE_REL_I386_SECTION _x +; OBJ32-NEXT: 0xD4 IMAGE_REL_I386_SECREL _y +; OBJ32-NEXT: 0xD8 IMAGE_REL_I386_SECTION _y +; OBJ32-NEXT: 0xEC IMAGE_REL_I386_SECREL _y +; OBJ32-NEXT: 0xF0 IMAGE_REL_I386_SECTION _y +; OBJ32-NEXT: 0x144 IMAGE_REL_I386_SECREL _f +; OBJ32-NEXT: 0x148 IMAGE_REL_I386_SECTION _f +; OBJ32-NEXT: 0x15C IMAGE_REL_I386_SECREL _f +; OBJ32-NEXT: 0x160 IMAGE_REL_I386_SECTION _f ; OBJ32-NEXT: ] ; OBJ32: Subsection [ ; OBJ32-NEXT: SubSectionType: Symbols (0xF1) @@ -324,16 +322,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:.*]] # ; Compiler information record ; X64-NEXT: [[F1_START]]: ; X64-NEXT: .short [[C1_END:.*]]-[[C1_START:.*]] # -; X64: [[C1_END]]: +; X64: [[F1_END]]: +; X64-NEXT: .p2align 2 +; Symbol subsection for x +; X64-NEXT: .long 241 +; X64-NEXT: .long [[SUBSEC_END:.*]]-[[SUBSEC_START:.*]] # +; X64-NEXT: [[SUBSEC_START]]: ; X64-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] # ; X64-NEXT: [[PROC_SEGMENT_START]]: ; X64-NEXT: .short 4422 @@ -351,17 +354,14 @@ ; X64-NEXT: [[PROC_SEGMENT_END]]: ; X64-NEXT: .short 2 ; X64-NEXT: .short 4431 -; X64-NEXT: [[F1_END]]: +; X64-NEXT: [[SUBSEC_END]]: ; X64-NEXT: .p2align 2 ; Line table subsection for x ; 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: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] # ; X64-NEXT: [[PROC_SEGMENT_START]]: ; X64-NEXT: .short 4423 @@ -386,10 +386,7 @@ ; 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: [[F1_START]]: ; X64-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] # ; X64-NEXT: [[PROC_SEGMENT_START]]: ; X64-NEXT: .short 4423 @@ -421,18 +418,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) Index: test/DebugInfo/COFF/pr28747.ll =================================================================== --- test/DebugInfo/COFF/pr28747.ll +++ test/DebugInfo/COFF/pr28747.ll @@ -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 Index: test/DebugInfo/COFF/simple.ll =================================================================== --- test/DebugInfo/COFF/simple.ll +++ test/DebugInfo/COFF/simple.ll @@ -30,6 +30,11 @@ ; X86-NEXT: [[F1_START]]: ; X86-NEXT: .short [[C1_END:.*]]-[[C1_START:.*]] # ; X86: [[C1_END]]: +; X86-NEXT: [[F1_END]]: +; X86-NEXT: .p2align 2 +; X86-NEXT: .long 241 # Symbol subsection for f +; X86-NEXT: .long [[SUBSEC_END:.*]]-[[SUBSEC_START:.*]] # Subsection size +; X86-NEXT: [[SUBSEC_START]]: ; X86-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] # ; X86-NEXT: [[PROC_SEGMENT_START]]: ; X86-NEXT: .short 4423 @@ -47,7 +52,7 @@ ; X86-NEXT: [[PROC_SEGMENT_END]]: ; X86-NEXT: .short 2 ; X86-NEXT: .short 4431 -; X86-NEXT: [[F1_END]]: +; X86-NEXT: [[SUBSEC_END]]: ; X86-NEXT: .p2align 2 ; Line table ; X86-NEXT: .cv_linetable 0, _f, [[END_OF_F]] @@ -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) @@ -122,6 +127,11 @@ ; X64-NEXT: [[F1_START]]: ; X64-NEXT: .short [[C1_END:.*]]-[[C1_START:.*]] # ; X64: [[C1_END]]: +; X64-NEXT: [[F1_END]]: +; X64-NEXT: .p2align 2 +; X64-NEXT: .long 241 # Symbol subsection for f +; X64-NEXT: .long [[SUBSEC_END:.*]]-[[SUBSEC_START:.*]] # Subsection size +; X64-NEXT: [[SUBSEC_START]]: ; X64-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] # ; X64-NEXT: [[PROC_SEGMENT_START]]: ; X64-NEXT: .short 4423 @@ -139,7 +149,7 @@ ; X64-NEXT: [[PROC_SEGMENT_END]]: ; X64-NEXT: .short 2 ; X64-NEXT: .short 4431 -; X64-NEXT: [[F1_END]]: +; X64-NEXT: [[SUBSEC_END]]: ; X64-NEXT: .p2align 2 ; Line table ; X64-NEXT: .cv_linetable 0, f, [[END_OF_F]] @@ -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) Index: test/MC/ARM/coff-debugging-secrel.ll =================================================================== --- test/MC/ARM/coff-debugging-secrel.ll +++ test/MC/ARM/coff-debugging-secrel.ll @@ -42,10 +42,10 @@ ; 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: ] Index: test/MC/COFF/cv-compiler-info.ll =================================================================== --- test/MC/COFF/cv-compiler-info.ll +++ test/MC/COFF/cv-compiler-info.ll @@ -17,16 +17,9 @@ !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 @@ ; 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}