[PATCH] D53963: [WebAssembly] Remove duplicate function. NFC.
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 31 18:11:15 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL345806: [WebAssembly] Remove duplicate function. NFC. (authored by sbc, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D53963
Files:
lld/trunk/test/wasm/lto/signature-mismatch.ll
lld/trunk/test/wasm/signature-mismatch-weak.ll
lld/trunk/test/wasm/signature-mismatch.ll
lld/trunk/wasm/WriterUtils.cpp
Index: lld/trunk/test/wasm/signature-mismatch.ll
===================================================================
--- lld/trunk/test/wasm/signature-mismatch.ll
+++ lld/trunk/test/wasm/signature-mismatch.ll
@@ -18,9 +18,9 @@
declare i32 @ret32(i32, i64, i32) local_unnamed_addr #1
; CHECK: error: function signature mismatch: ret32
-; CHECK-NEXT: >>> defined as (I32, I64, I32) -> I32 in {{.*}}.main.o
-; CHECK-NEXT: >>> defined as (F32) -> I32 in {{.*}}.ret32.o
+; CHECK-NEXT: >>> defined as (i32, i64, i32) -> i32 in {{.*}}.main.o
+; CHECK-NEXT: >>> defined as (f32) -> i32 in {{.*}}.ret32.o
; REVERSE: error: function signature mismatch: ret32
-; REVERSE-NEXT: >>> defined as (F32) -> I32 in {{.*}}.ret32.o
-; REVERSE-NEXT: >>> defined as (I32, I64, I32) -> I32 in {{.*}}.main.o
+; REVERSE-NEXT: >>> defined as (f32) -> i32 in {{.*}}.ret32.o
+; REVERSE-NEXT: >>> defined as (i32, i64, i32) -> i32 in {{.*}}.main.o
Index: lld/trunk/test/wasm/lto/signature-mismatch.ll
===================================================================
--- lld/trunk/test/wasm/lto/signature-mismatch.ll
+++ lld/trunk/test/wasm/lto/signature-mismatch.ll
@@ -15,5 +15,5 @@
ret void
}
-; CHECK: >>> defined as (I32) -> void in {{.*}}signature-mismatch.ll.tmp1.o
+; CHECK: >>> defined as (i32) -> void in {{.*}}signature-mismatch.ll.tmp1.o
; CHECK: >>> defined as () -> void in lto.tmp
Index: lld/trunk/test/wasm/signature-mismatch-weak.ll
===================================================================
--- lld/trunk/test/wasm/signature-mismatch-weak.ll
+++ lld/trunk/test/wasm/signature-mismatch-weak.ll
@@ -14,5 +14,5 @@
}
; CHECK: warning: function signature mismatch: weakFn
-; CHECK-NEXT: >>> defined as () -> I32 in {{.*}}signature-mismatch-weak.ll.tmp.o
-; CHECK-NEXT: >>> defined as () -> I64 in {{.*}}signature-mismatch-weak.ll.tmp.strong.o
+; CHECK-NEXT: >>> defined as () -> i32 in {{.*}}signature-mismatch-weak.ll.tmp.o
+; CHECK-NEXT: >>> defined as () -> i64 in {{.*}}signature-mismatch-weak.ll.tmp.strong.o
Index: lld/trunk/wasm/WriterUtils.cpp
===================================================================
--- lld/trunk/wasm/WriterUtils.cpp
+++ lld/trunk/wasm/WriterUtils.cpp
@@ -19,21 +19,6 @@
using namespace llvm::wasm;
using namespace lld::wasm;
-static const char *valueTypeToString(ValType Type) {
- switch (Type) {
- case wasm::ValType::I32:
- return "i32";
- case wasm::ValType::I64:
- return "i64";
- case wasm::ValType::F32:
- return "f32";
- case wasm::ValType::F64:
- return "f64";
- default:
- llvm_unreachable("invalid value type");
- }
-}
-
namespace lld {
void wasm::debugWrite(uint64_t Offset, const Twine &Msg) {
@@ -75,7 +60,7 @@
void wasm::writeValueType(raw_ostream &OS, ValType Type, const Twine &Msg) {
writeU8(OS, static_cast<uint8_t>(Type),
- Msg + "[type: " + valueTypeToString(Type) + "]");
+ Msg + "[type: " + toString(Type) + "]");
}
void wasm::writeSig(raw_ostream &OS, const WasmSignature &Sig) {
@@ -178,15 +163,15 @@
std::string lld::toString(ValType Type) {
switch (Type) {
case ValType::I32:
- return "I32";
+ return "i32";
case ValType::I64:
- return "I64";
+ return "i64";
case ValType::F32:
- return "F32";
+ return "f32";
case ValType::F64:
- return "F64";
+ return "f64";
case ValType::V128:
- return "V128";
+ return "v128";
case ValType::EXCEPT_REF:
return "except_ref";
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53963.172075.patch
Type: text/x-patch
Size: 3460 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181101/0fcf3576/attachment.bin>
More information about the llvm-commits
mailing list