summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2018-05-15 21:49:58 +0000
committerSam Clegg <sbc@chromium.org>2018-05-15 21:49:58 +0000
commit1be4bf9abcbea756d628beb870efb09e6fdcc1a8 (patch)
tree70a6f3ed949dae30d6406049640cf152505b06a5 /llvm/include
parentad5684aae0c1c21a0e2ec3949bd3b52d47b1a21b (diff)
downloadbcm5719-llvm-1be4bf9abcbea756d628beb870efb09e6fdcc1a8.tar.gz
bcm5719-llvm-1be4bf9abcbea756d628beb870efb09e6fdcc1a8.zip
[WebAssembly] Provide WasmFunction content offset information.
WasmObjectWriter mostly operates with function segments offsets that do not include their size fields. WasmObjectFile needs to have and provide this information to the lld to maintain proper R_WEBASSEMBLY_FUNCTION_OFFSET_I32 relocations entries. Patch by Yury Delendik Differential Revision: https://reviews.llvm.org/D46763 llvm-svn: 332406
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/BinaryFormat/Wasm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/include/llvm/BinaryFormat/Wasm.h b/llvm/include/llvm/BinaryFormat/Wasm.h
index 9212fe88d34..fa5448dacec 100644
--- a/llvm/include/llvm/BinaryFormat/Wasm.h
+++ b/llvm/include/llvm/BinaryFormat/Wasm.h
@@ -102,6 +102,7 @@ struct WasmFunction {
ArrayRef<uint8_t> Body;
uint32_t CodeSectionOffset;
uint32_t Size;
+ uint32_t CodeOffset; // start of Locals and Body
StringRef SymbolName; // from the "linking" section
StringRef DebugName; // from the "name" section
uint32_t Comdat; // from the "comdat info" section
OpenPOWER on IntegriCloud