From 9723c07d382a9529cfe1d710010ec6bcf5a15e93 Mon Sep 17 00:00:00 2001 From: Francis Visoiu Mistrih Date: Mon, 28 Oct 2019 11:14:48 -0700 Subject: [PATCH] [Remarks] Remove references to ELF support There is no ELF support at the moment. Remove all the references to the `.remarks` section. --- docs/CommandGuide/llc.rst | 4 ++-- docs/Remarks.rst | 1 - lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 2 +- lib/MC/MCObjectFileInfo.cpp | 3 --- test/CodeGen/X86/remarks-section.ll | 6 ------ 5 files changed, 3 insertions(+), 13 deletions(-) diff --git a/docs/CommandGuide/llc.rst b/docs/CommandGuide/llc.rst index b4e5dbf1b96..4575e4a543a 100644 --- a/docs/CommandGuide/llc.rst +++ b/docs/CommandGuide/llc.rst @@ -149,8 +149,8 @@ End-user Options .. option:: -remarks-section - Emit the .remarks (ELF) / __remarks (MachO) section which contains metadata - about remark diagnostics. + Emit the __remarks (MachO) section which contains metadata about remark + diagnostics. Tuning/Configuration Options ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/Remarks.rst b/docs/Remarks.rst index 0496a5a3f64..653b418e6fd 100644 --- a/docs/Remarks.rst +++ b/docs/Remarks.rst @@ -592,7 +592,6 @@ This can be overridden by using the flag ``-remarks-section=``. The section is named: * ``__LLVM,__remarks`` (MachO) -* ``.remarks`` (ELF) C API ===== diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index b784d2980cb..3c2395ef684 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -1380,7 +1380,7 @@ void AsmPrinter::emitRemarksSection(RemarkStreamer &RS) { : RemarkSerializer.metaSerializer(OS); MetaSerializer->emit(); - // Switch to the right section: .remarks/__remarks. + // Switch to the remarks section. MCSection *RemarksSection = OutContext.getObjectFileInfo()->getRemarksSection(); OutStreamer->SwitchSection(RemarksSection); diff --git a/lib/MC/MCObjectFileInfo.cpp b/lib/MC/MCObjectFileInfo.cpp index 1a9ceb07dd5..be195928320 100644 --- a/lib/MC/MCObjectFileInfo.cpp +++ b/lib/MC/MCObjectFileInfo.cpp @@ -480,9 +480,6 @@ void MCObjectFileInfo::initELFMCObjectFileInfo(const Triple &T, bool Large) { Ctx->getELFSection(".eh_frame", EHSectionType, EHSectionFlags); StackSizesSection = Ctx->getELFSection(".stack_sizes", ELF::SHT_PROGBITS, 0); - - RemarksSection = - Ctx->getELFSection(".remarks", ELF::SHT_PROGBITS, ELF::SHF_EXCLUDE); } void MCObjectFileInfo::initCOFFMCObjectFileInfo(const Triple &T) { diff --git a/test/CodeGen/X86/remarks-section.ll b/test/CodeGen/X86/remarks-section.ll index 3388e7879dc..dba20d428a6 100644 --- a/test/CodeGen/X86/remarks-section.ll +++ b/test/CodeGen/X86/remarks-section.ll @@ -1,4 +1,3 @@ -; RUN: llc < %s -mtriple=x86_64-linux -remarks-section -pass-remarks-output=%/t.yaml | FileCheck -DPATH=%/t.yaml %s ; RUN: llc < %s -mtriple=x86_64-darwin -remarks-section -pass-remarks-output=%/t.yaml | FileCheck --check-prefix=CHECK-DARWIN -DPATH=%/t.yaml %s ; RUN: llc < %s -mtriple=x86_64-darwin --pass-remarks-format=yaml-strtab -remarks-section -pass-remarks-output=%/t.yaml | FileCheck --check-prefix=CHECK-DARWIN-STRTAB -DPATH=%/t.yaml %s @@ -8,11 +7,6 @@ ; RUN: llc < %s -mtriple=x86_64-darwin --pass-remarks-format=bitstream -remarks-section=false -pass-remarks-output=%/t.yaml | FileCheck --check-prefix=CHECK-DARWIN-OVERRIDE-BITSTREAM %s ; RUN: llc < %s -mtriple=x86_64-darwin --pass-remarks-format=yaml -remarks-section=true -pass-remarks-output=%/t.yaml | FileCheck --check-prefix=CHECK-DARWIN-OVERRIDE-YAML %s -; CHECK-LABEL: func1: - -; CHECK: .section .remarks,"e",@progbits -; CHECK-NEXT: .byte - ; CHECK-DARWIN: .section __LLVM,__remarks,regular,debug ; CHECK-DARWIN-NEXT: .byte