diff options
author | Derek Schuff <dschuff@google.com> | 2017-03-14 20:23:22 +0000 |
---|---|---|
committer | Derek Schuff <dschuff@google.com> | 2017-03-14 20:23:22 +0000 |
commit | e2688c432fcffff53d7d356d7530a0b139c16286 (patch) | |
tree | 2b97e836032eaecdaf9f998154ef61ff141975cd /llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp | |
parent | 265ca535ab1c208749c05fbbb2d18ddd0047dd65 (diff) | |
download | bcm5719-llvm-e2688c432fcffff53d7d356d7530a0b139c16286.tar.gz bcm5719-llvm-e2688c432fcffff53d7d356d7530a0b139c16286.zip |
[WebAssembly] Use LEB encoding for value types
Previously we were using the encoded LEB hex values
for the value types. This change uses the decoded
negative value and the LEB encoder to write them out.
Differential Revision: https://reviews.llvm.org/D30847
Patch by Sam Clegg
llvm-svn: 297777
Diffstat (limited to 'llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp index 9ccaf433b5d..9fd3ec81c25 100644 --- a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp +++ b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp @@ -141,12 +141,12 @@ extern "C" void LLVMInitializeWebAssemblyTargetMC() { } } -WebAssembly::ValType WebAssembly::toValType(const MVT &Ty) { +wasm::ValType WebAssembly::toValType(const MVT &Ty) { switch (Ty.SimpleTy) { - case MVT::i32: return WebAssembly::ValType::I32; - case MVT::i64: return WebAssembly::ValType::I64; - case MVT::f32: return WebAssembly::ValType::F32; - case MVT::f64: return WebAssembly::ValType::F64; + case MVT::i32: return wasm::ValType::I32; + case MVT::i64: return wasm::ValType::I64; + case MVT::f32: return wasm::ValType::F32; + case MVT::f64: return wasm::ValType::F64; default: llvm_unreachable("unexpected type"); } } |