DebugInfo: Add fission-related sections to COFF
authorDavid Blaikie <dblaikie@gmail.com>
Wed, 26 Mar 2014 03:05:10 +0000 (03:05 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 26 Mar 2014 03:05:10 +0000 (03:05 +0000)
Allows this test to pass on COFF platforms so we don't need to restrict
this test to a single target anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204780 91177308-0d34-0410-b5e6-96231b3b80d8

lib/MC/MCObjectFileInfo.cpp
test/DebugInfo/empty.ll

index ff1f58494376ce7719a2586e4fda4597f1886a1d..879aa8035b2e0e334691dee9e352ecd20debf268 100644 (file)
@@ -679,6 +679,33 @@ void MCObjectFileInfo::InitCOFFMCObjectFileInfo(Triple T) {
                         COFF::IMAGE_SCN_MEM_DISCARDABLE |
                         COFF::IMAGE_SCN_MEM_READ,
                         SectionKind::getMetadata());
+  DwarfInfoDWOSection =
+      Ctx->getCOFFSection(".debug_info.dwo", COFF::IMAGE_SCN_MEM_DISCARDABLE |
+                                                COFF::IMAGE_SCN_MEM_READ,
+                          SectionKind::getMetadata());
+  DwarfAbbrevDWOSection =
+      Ctx->getCOFFSection(".debug_abbrev.dwo", COFF::IMAGE_SCN_MEM_DISCARDABLE |
+                                                  COFF::IMAGE_SCN_MEM_READ,
+                          SectionKind::getMetadata());
+  DwarfStrDWOSection =
+      Ctx->getCOFFSection(".debug_str.dwo", COFF::IMAGE_SCN_MEM_DISCARDABLE |
+                                               COFF::IMAGE_SCN_MEM_READ,
+                          SectionKind::getMetadata());
+  DwarfLineDWOSection =
+      Ctx->getCOFFSection(".debug_line.dwo", COFF::IMAGE_SCN_MEM_DISCARDABLE |
+                                                COFF::IMAGE_SCN_MEM_READ,
+                          SectionKind::getMetadata());
+  DwarfLocDWOSection =
+      Ctx->getCOFFSection(".debug_loc.dwo", COFF::IMAGE_SCN_MEM_DISCARDABLE |
+                                               COFF::IMAGE_SCN_MEM_READ,
+                          SectionKind::getMetadata());
+  DwarfStrOffDWOSection =
+      Ctx->getCOFFSection(".debug_str_offsets.dwo", COFF::IMAGE_SCN_MEM_DISCARDABLE |
+                                                  COFF::IMAGE_SCN_MEM_READ,
+                          SectionKind::getMetadata());
+  DwarfAddrSection = Ctx->getCOFFSection(
+      ".debug_addr", COFF::IMAGE_SCN_MEM_DISCARDABLE | COFF::IMAGE_SCN_MEM_READ,
+      SectionKind::getMetadata());
 
   DrectveSection =
     Ctx->getCOFFSection(".drectve",
index 130d045aba3526a056b48db32afae770339f9244..cf40523e7e4aed39300e918dbd44746aaf185a7c 100644 (file)
@@ -1,7 +1,7 @@
 ; REQUIRES: object-emission
 
 ; RUN: %llc_dwarf < %s -filetype=obj | llvm-dwarfdump - | FileCheck %s
-; RUN: llc -mtriple=x86_64-unknown-unknown -split-dwarf=Enable < %s -filetype=obj | llvm-dwarfdump - | FileCheck --check-prefix=FISSION %s
+; RUN: %llc_dwarf -split-dwarf=Enable < %s -filetype=obj | llvm-dwarfdump - | FileCheck --check-prefix=FISSION %s
 
 ; darwin has a workaround for a linker bug so it always emits one line table entry
 ; XFAIL: darwin