diff options
author | Dan Gohman <dan433584@gmail.com> | 2017-03-30 23:58:19 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2017-03-30 23:58:19 +0000 |
commit | 970d02c42dc122a4a550599aa9153965a521660b (patch) | |
tree | 585011ec096221540d87c3527856b4e5e25a2c43 /llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h | |
parent | 1074cb5420f6cec1d2ea039d0f343719de7d84aa (diff) | |
download | bcm5719-llvm-970d02c42dc122a4a550599aa9153965a521660b.tar.gz bcm5719-llvm-970d02c42dc122a4a550599aa9153965a521660b.zip |
[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
Diffstat (limited to 'llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h')
-rw-r--r-- | llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 |