[llvm] fdb408f - [MC] Delete unused MCAsmInfoELF::UsesNonexecutableStackSection after EM_WEBASSEMBLY was removed in D48744

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 15 15:44:17 PST 2019


Author: Fangrui Song
Date: 2019-12-15T15:43:30-08:00
New Revision: fdb408f348f91f8eb4ecc32527aebfb6286e55cb

URL: https://github.com/llvm/llvm-project/commit/fdb408f348f91f8eb4ecc32527aebfb6286e55cb
DIFF: https://github.com/llvm/llvm-project/commit/fdb408f348f91f8eb4ecc32527aebfb6286e55cb.diff

LOG: [MC] Delete unused MCAsmInfoELF::UsesNonexecutableStackSection after EM_WEBASSEMBLY was removed in D48744

This removes remnant of D15969 which hasn't been removed by D48744.

Added: 
    

Modified: 
    llvm/include/llvm/MC/MCAsmInfoELF.h
    llvm/lib/MC/MCAsmInfoELF.cpp

Removed: 
    llvm/test/CodeGen/WebAssembly/non-executable-stack.ll


################################################################################
diff  --git a/llvm/include/llvm/MC/MCAsmInfoELF.h b/llvm/include/llvm/MC/MCAsmInfoELF.h
index aa2e5873e2c6..408d4df76412 100644
--- a/llvm/include/llvm/MC/MCAsmInfoELF.h
+++ b/llvm/include/llvm/MC/MCAsmInfoELF.h
@@ -18,10 +18,6 @@ class MCAsmInfoELF : public MCAsmInfo {
   MCSection *getNonexecutableStackSection(MCContext &Ctx) const final;
 
 protected:
-  /// Targets which have non-executable stacks by default can set this to false
-  /// to disable the special section which requests a non-executable stack.
-  bool UsesNonexecutableStackSection = true;
-
   MCAsmInfoELF();
 };
 

diff  --git a/llvm/lib/MC/MCAsmInfoELF.cpp b/llvm/lib/MC/MCAsmInfoELF.cpp
index a5e8aff7f129..9b8b8db794f0 100644
--- a/llvm/lib/MC/MCAsmInfoELF.cpp
+++ b/llvm/lib/MC/MCAsmInfoELF.cpp
@@ -21,8 +21,6 @@ using namespace llvm;
 void MCAsmInfoELF::anchor() {}
 
 MCSection *MCAsmInfoELF::getNonexecutableStackSection(MCContext &Ctx) const {
-  if (!UsesNonexecutableStackSection)
-    return nullptr;
   return Ctx.getELFSection(".note.GNU-stack", ELF::SHT_PROGBITS, 0);
 }
 

diff  --git a/llvm/test/CodeGen/WebAssembly/non-executable-stack.ll b/llvm/test/CodeGen/WebAssembly/non-executable-stack.ll
deleted file mode 100644
index b81063724e9c..000000000000
--- a/llvm/test/CodeGen/WebAssembly/non-executable-stack.ll
+++ /dev/null
@@ -1,9 +0,0 @@
-; RUN: llc < %s -asm-verbose=false | FileCheck %s
-
-; Test that we don't emit anything declaring a non-executable stack,
-; because wasm's stack is always non-executable.
-
-target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
-target triple = "wasm32-unknown-unknown"
-
-; CHECK-NOT: .note.GNU-stack


        


More information about the llvm-commits mailing list