aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyTargetObjectFile.cpp
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2017-02-22 01:23:18 +0000
committerDan Gohman <dan433584@gmail.com>2017-02-22 01:23:18 +0000
commit18eafb6c688fbef06a133fd6fe5d523a546f6477 (patch)
tree704eb1ba29b0962125ec2507066683d49ec2030d /llvm/lib/Target/WebAssembly/WebAssemblyTargetObjectFile.cpp
parentc90b79c585f76af2789aeca1ac8250b45af46446 (diff)
downloadllvm-18eafb6c688fbef06a133fd6fe5d523a546f6477.zip
llvm-18eafb6c688fbef06a133fd6fe5d523a546f6477.tar.gz
llvm-18eafb6c688fbef06a133fd6fe5d523a546f6477.tar.bz2
[WebAssembly] Add skeleton MC support for the Wasm container format
This just adds the basic skeleton for supporting a new object file format. All of the actual encoding will be implemented in followup patches. Differential Revision: https://reviews.llvm.org/D26722 llvm-svn: 295803
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyTargetObjectFile.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyTargetObjectFile.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyTargetObjectFile.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyTargetObjectFile.cpp
index 74e33b9..b1fd108 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyTargetObjectFile.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyTargetObjectFile.cpp
@@ -17,8 +17,14 @@
#include "WebAssemblyTargetMachine.h"
using namespace llvm;
-void WebAssemblyTargetObjectFile::Initialize(MCContext &Ctx,
- const TargetMachine &TM) {
+void WebAssemblyTargetObjectFileELF::Initialize(MCContext &Ctx,
+ const TargetMachine &TM) {
TargetLoweringObjectFileELF::Initialize(Ctx, TM);
InitializeELF(TM.Options.UseInitArray);
}
+
+void WebAssemblyTargetObjectFile::Initialize(MCContext &Ctx,
+ const TargetMachine &TM) {
+ TargetLoweringObjectFileWasm::Initialize(Ctx, TM);
+ InitializeWasm();
+}