From e7b54c2ea5540f456fa77423a53902ed212b0994 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Mon, 31 Oct 2016 18:50:13 +0000 Subject: [PATCH] Revert r285607: Emit Section Map stream. That change broke buildbots. llvm-svn: 285618 --- lld/COFF/PDB.cpp | 9 --------- lld/test/COFF/pdb.test | 51 +++----------------------------------------------- 2 files changed, 3 insertions(+), 57 deletions(-) diff --git a/lld/COFF/PDB.cpp b/lld/COFF/PDB.cpp index d57df1e..53f50f3 100644 --- a/lld/COFF/PDB.cpp +++ b/lld/COFF/PDB.cpp @@ -19,7 +19,6 @@ #include "llvm/DebugInfo/PDB/Raw/PDBFileBuilder.h" #include "llvm/DebugInfo/PDB/Raw/TpiStream.h" #include "llvm/DebugInfo/PDB/Raw/TpiStreamBuilder.h" -#include "llvm/Object/COFF.h" #include "llvm/Support/Endian.h" #include "llvm/Support/FileOutputBuffer.h" #include @@ -64,14 +63,6 @@ void coff::createPDB(StringRef Path, ArrayRef SectionTable) { auto &IpiBuilder = Builder.getIpiBuilder(); IpiBuilder.setVersionHeader(pdb::PdbTpiV80); - // Add Section Map stream. - ArrayRef Sections - = {(object::coff_section *)SectionTable.data(), - SectionTable.size() / sizeof(object::coff_section)}; - std::vector SectionMap = - pdb::DbiStreamBuilder::createSectionMap(Sections); - DbiBuilder.setSectionMap(SectionMap); - // Add COFF section header stream. ExitOnErr( DbiBuilder.addDbgStream(pdb::DbgHeaderType::SectionHdr, SectionTable)); diff --git a/lld/test/COFF/pdb.test b/lld/test/COFF/pdb.test index e10d58c..59005d2 100644 --- a/lld/test/COFF/pdb.test +++ b/lld/test/COFF/pdb.test @@ -3,8 +3,7 @@ # RUN: llvm-pdbdump pdb2yaml -stream-metadata -stream-directory -pdb-stream \ # RUN: -dbi-stream -ipi-stream %t.pdb | FileCheck %s -# RUN: llvm-pdbdump raw -section-map -section-headers %t.pdb | \ -# RUN: FileCheck -check-prefix RAW %s +# RUN: llvm-pdbdump raw -section-headers %t.pdb | FileCheck -check-prefix RAW %s # CHECK: MSF: # CHECK-NEXT: SuperBlock: @@ -18,7 +17,7 @@ # CHECK-NEXT: DirectoryBlocks: [ 9 ] # CHECK-NEXT: NumStreams: 6 # CHECK-NEXT: FileSize: 40960 -# CHECK-NEXT: StreamSizes: [ 0, 48, 56, 154, 56, 80 ] +# CHECK-NEXT: StreamSizes: [ 0, 48, 56, 90, 56, 80 ] # CHECK-NEXT: StreamMap: # CHECK-NEXT: - Stream: [ ] # CHECK-NEXT: - Stream: [ 5 ] @@ -44,51 +43,7 @@ # CHECK-NEXT: Version: VC80 # CHECK-NEXT: Records: -# RAW: Section Map [ -# RAW-NEXT: Entry { -# RAW-NEXT: Flags [ (0x10D) -# RAW-NEXT: AddressIs32Bit (0x8) -# RAW-NEXT: Execute (0x4) -# RAW-NEXT: IsSelector (0x100) -# RAW-NEXT: Read (0x1) -# RAW-NEXT: ] -# RAW-NEXT: Ovl: 0 -# RAW-NEXT: Group: 0 -# RAW-NEXT: Frame: 1 -# RAW-NEXT: SecName: 65535 -# RAW-NEXT: ClassName: 65535 -# RAW-NEXT: Offset: 0 -# RAW-NEXT: SecByteLength: 3 -# RAW-NEXT: } -# RAW-NEXT: Entry { -# RAW-NEXT: Flags [ (0x109) -# RAW-NEXT: AddressIs32Bit (0x8) -# RAW-NEXT: IsSelector (0x100) -# RAW-NEXT: Read (0x1) -# RAW-NEXT: ] -# RAW-NEXT: Ovl: 0 -# RAW-NEXT: Group: 0 -# RAW-NEXT: Frame: 2 -# RAW-NEXT: SecName: 65535 -# RAW-NEXT: ClassName: 65535 -# RAW-NEXT: Offset: 0 -# RAW-NEXT: SecByteLength: 107 -# RAW-NEXT: } -# RAW-NEXT: Entry { -# RAW-NEXT: Flags [ (0x208) -# RAW-NEXT: AddressIs32Bit (0x8) -# RAW-NEXT: IsAbsoluteAddress (0x200) -# RAW-NEXT: ] -# RAW-NEXT: Ovl: 0 -# RAW-NEXT: Group: 0 -# RAW-NEXT: Frame: 3 -# RAW-NEXT: SecName: 65535 -# RAW-NEXT: ClassName: 65535 -# RAW-NEXT: Offset: 0 -# RAW-NEXT: SecByteLength: 4294967295 -# RAW-NEXT: } -# RAW-NEXT: ] -# RAW-NEXT: Section Headers [ +# RAW: Section Headers [ # RAW-NEXT: { # RAW-NEXT: Name: .text # RAW-NEXT: Virtual Size: -- 2.7.4