From 970d02c42dc122a4a550599aa9153965a521660b Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 30 Mar 2017 23:58:19 +0000 Subject: [WebAssembly] Initial linking metadata support Add support for the new relocations and linking metadata section support in https://github.com/WebAssembly/tool-conventions/blob/master/Linking.md. In particular, this allows LLVM to indicate which variable is the stack pointer, so that it can be linked with other objects. This also adds support for emitting type relocations for call_indirect instructions. Right now, this is mainly tested by using wabt and hexdump to examine the output on selected testcases. We'll add more tests as the design stablizes and more of the pieces are in place. llvm-svn: 299141 --- llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h') diff --git a/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h b/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h index d11f99c1ff3..c6158720d62 100644 --- a/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h +++ b/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h @@ -18,6 +18,7 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/CodeGen/MachineValueType.h" #include "llvm/MC/MCInstPrinter.h" +#include "llvm/Support/Wasm.h" namespace llvm { @@ -50,6 +51,7 @@ public: namespace WebAssembly { const char *TypeToString(MVT Ty); +const char *TypeToString(wasm::ValType Type); } // end namespace WebAssembly -- cgit v1.2.3