diff options
| author | Sam Clegg <sbc@chromium.org> | 2019-02-04 17:28:46 +0000 |
|---|---|---|
| committer | Sam Clegg <sbc@chromium.org> | 2019-02-04 17:28:46 +0000 |
| commit | d1152a267cb1e9d4f5793d5324a785f8d6ffa8a8 (patch) | |
| tree | 7cdd059cb84266b4ce57c84e210a5328626ac972 /llvm/lib/Target | |
| parent | bf7593ec4a1ed4d1605796f862f65a7b7fcb4b3e (diff) | |
| download | bcm5719-llvm-d1152a267cb1e9d4f5793d5324a785f8d6ffa8a8.tar.gz bcm5719-llvm-d1152a267cb1e9d4f5793d5324a785f8d6ffa8a8.zip | |
[WebAssembly] Rename relocations from R_WEBASSEMBLY_ to R_WASM_
See https://github.com/WebAssembly/tool-conventions/pull/95.
This is less typing and IMHO more readable, and it also fits with
our naming around the binary format which tends to use the short name.
e.g.
include/llvm/BinaryFormat/Wasm.h
tools/llvm-objdump/WasmDump.cpp
etc..
Differential Revision: https://reviews.llvm.org/D57611
llvm-svn: 353062
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp index 1eb1308c2b8..d13e1ece9bf 100644 --- a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp +++ b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp @@ -99,31 +99,31 @@ unsigned WebAssemblyWasmObjectWriter::getRelocType(const MCValue &Target, switch (unsigned(Fixup.getKind())) { case WebAssembly::fixup_code_sleb128_i32: if (IsFunction) - return wasm::R_WEBASSEMBLY_TABLE_INDEX_SLEB; - return wasm::R_WEBASSEMBLY_MEMORY_ADDR_SLEB; + return wasm::R_WASM_TABLE_INDEX_SLEB; + return wasm::R_WASM_MEMORY_ADDR_SLEB; case WebAssembly::fixup_code_sleb128_i64: llvm_unreachable("fixup_sleb128_i64 not implemented yet"); case WebAssembly::fixup_code_uleb128_i32: if (IsGlobalType(Target)) - return wasm::R_WEBASSEMBLY_GLOBAL_INDEX_LEB; + return wasm::R_WASM_GLOBAL_INDEX_LEB; if (IsFunctionType(Target)) - return wasm::R_WEBASSEMBLY_TYPE_INDEX_LEB; + return wasm::R_WASM_TYPE_INDEX_LEB; if (IsFunction) - return wasm::R_WEBASSEMBLY_FUNCTION_INDEX_LEB; + return wasm::R_WASM_FUNCTION_INDEX_LEB; if (IsEventType(Target)) - return wasm::R_WEBASSEMBLY_EVENT_INDEX_LEB; - return wasm::R_WEBASSEMBLY_MEMORY_ADDR_LEB; + return wasm::R_WASM_EVENT_INDEX_LEB; + return wasm::R_WASM_MEMORY_ADDR_LEB; case FK_Data_4: if (IsFunction) - return wasm::R_WEBASSEMBLY_TABLE_INDEX_I32; + return wasm::R_WASM_TABLE_INDEX_I32; if (auto Section = static_cast<const MCSectionWasm *>( GetFixupSection(Fixup.getValue()))) { if (Section->getKind().isText()) - return wasm::R_WEBASSEMBLY_FUNCTION_OFFSET_I32; + return wasm::R_WASM_FUNCTION_OFFSET_I32; else if (!Section->isWasmData()) - return wasm::R_WEBASSEMBLY_SECTION_OFFSET_I32; + return wasm::R_WASM_SECTION_OFFSET_I32; } - return wasm::R_WEBASSEMBLY_MEMORY_ADDR_I32; + return wasm::R_WASM_MEMORY_ADDR_I32; case FK_Data_8: llvm_unreachable("FK_Data_8 not implemented yet"); default: |

