mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
[WebAssembly] Fix WasmEmitter link error.
This commit is contained in:
parent
15e7e14c11
commit
148efd8599
@ -530,7 +530,12 @@ void WasmWriter::writeRelocSection(raw_ostream &OS, WasmYAML::Section &Sec,
|
||||
writeUint8(OS, Reloc.Type);
|
||||
encodeULEB128(Reloc.Offset, OS);
|
||||
encodeULEB128(Reloc.Index, OS);
|
||||
if (wasm::relocTypeHasAddend(Reloc.Type)) {
|
||||
switch (Reloc.Type) {
|
||||
case wasm::R_WASM_MEMORY_ADDR_LEB:
|
||||
case wasm::R_WASM_MEMORY_ADDR_SLEB:
|
||||
case wasm::R_WASM_MEMORY_ADDR_I32:
|
||||
case wasm::R_WASM_FUNCTION_OFFSET_I32:
|
||||
case wasm::R_WASM_SECTION_OFFSET_I32:
|
||||
encodeULEB128(Reloc.Addend, OS);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user