From cf2a9e28b1bb37181ae916043df155cede38ff18 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Mon, 16 Jul 2018 23:09:29 +0000 Subject: [WebAssembly] Remove ELF file support. This support was partial and temporary. Now that we have wasm object file support its no longer needed. Differential Revision: https://reviews.llvm.org/D48744 llvm-svn: 337222 --- llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp') diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp index 9a5f459e9dd3..7c10f022cbbc 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp @@ -97,11 +97,7 @@ WebAssemblyTargetMachine::WebAssemblyTargetMachine( : "e-m:e-p:32:32-i64:64-n32:64-S128", TT, CPU, FS, Options, getEffectiveRelocModel(RM), CM ? *CM : CodeModel::Large, OL), - TLOF(TT.isOSBinFormatELF() ? - static_cast( - new WebAssemblyTargetObjectFileELF()) : - static_cast( - new WebAssemblyTargetObjectFile())) { + TLOF(new WebAssemblyTargetObjectFile()) { // WebAssembly type-checks instructions, but a noreturn function with a return // type that doesn't match the context will cause a check failure. So we lower // LLVM 'unreachable' to ISD::TRAP and then lower that to WebAssembly's @@ -110,11 +106,9 @@ WebAssemblyTargetMachine::WebAssemblyTargetMachine( // WebAssembly treats each function as an independent unit. Force // -ffunction-sections, effectively, so that we can emit them independently. - if (!TT.isOSBinFormatELF()) { - this->Options.FunctionSections = true; - this->Options.DataSections = true; - this->Options.UniqueSectionNames = true; - } + this->Options.FunctionSections = true; + this->Options.DataSections = true; + this->Options.UniqueSectionNames = true; initAsmInfo(); -- cgit v1.2.3