aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2018-07-16 23:09:29 +0000
committerSam Clegg <sbc@chromium.org>2018-07-16 23:09:29 +0000
commitcf2a9e28b1bb37181ae916043df155cede38ff18 (patch)
tree2201a2ebd62ff346c8c631b0c71422aff1e78860 /llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
parentc71adc8040b1e382b195a0096015cb5c39628b23 (diff)
downloadllvm-cf2a9e28b1bb37181ae916043df155cede38ff18.zip
llvm-cf2a9e28b1bb37181ae916043df155cede38ff18.tar.gz
llvm-cf2a9e28b1bb37181ae916043df155cede38ff18.tar.bz2
[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
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
index 9a5f459..7c10f02 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<TargetLoweringObjectFile*>(
- new WebAssemblyTargetObjectFileELF()) :
- static_cast<TargetLoweringObjectFile*>(
- 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();