[PATCH] D48400: [WebAssembly] Update function signature mismatch error message

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 20 15:49:39 PDT 2018


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rL335186: [WebAssembly] Update function signature mismatch error message. NFC. (authored by sbc, committed by ).

Repository:
  rL LLVM

https://reviews.llvm.org/D48400

Files:
  lld/trunk/test/wasm/fatal-warnings.ll
  lld/trunk/test/wasm/signature-mismatch-weak.ll
  lld/trunk/test/wasm/signature-mismatch.ll
  lld/trunk/wasm/SymbolTable.cpp


Index: lld/trunk/wasm/SymbolTable.cpp
===================================================================
--- lld/trunk/wasm/SymbolTable.cpp
+++ lld/trunk/wasm/SymbolTable.cpp
@@ -116,7 +116,7 @@
 
   const WasmSignature *OldSig = ExistingFunction->getFunctionType();
   if (OldSig && NewSig && *NewSig != *OldSig) {
-    warn("Function type mismatch: " + Existing->getName() +
+    warn("function signature mismatch: " + Existing->getName() +
          "\n>>> defined as " + toString(*OldSig) + " in " +
          toString(Existing->getFile()) + "\n>>> defined as " +
          toString(*NewSig) + " in " + toString(File));
Index: lld/trunk/test/wasm/signature-mismatch.ll
===================================================================
--- lld/trunk/test/wasm/signature-mismatch.ll
+++ lld/trunk/test/wasm/signature-mismatch.ll
@@ -17,10 +17,10 @@
 
 declare i32 @ret32(i32, i64, i32) local_unnamed_addr #1
 
-; CHECK: error: Function type mismatch: ret32
+; 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
 
-; REVERSE: error: Function type mismatch: ret32
+; 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
Index: lld/trunk/test/wasm/fatal-warnings.ll
===================================================================
--- lld/trunk/test/wasm/fatal-warnings.ll
+++ lld/trunk/test/wasm/fatal-warnings.ll
@@ -3,8 +3,8 @@
 ; RUN: lld -flavor wasm -o %t.wasm %t.main.o %t.ret32.o 2>&1 | FileCheck %s -check-prefix=CHECK-WARN
 ; RUN: not lld -flavor wasm --fatal-warnings -o %t.wasm %t.main.o %t.ret32.o 2>&1 | FileCheck %s -check-prefix=CHECK-FATAL
 
-; CHECK-WARN: warning: Function type mismatch: ret32
-; CHECK-FATAL: error: Function type mismatch: ret32
+; CHECK-WARN: warning: function signature mismatch: ret32
+; CHECK-FATAL: error: function signature mismatch: ret32
 
 target triple = "wasm32-unknown-unknown"
 
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
@@ -13,6 +13,6 @@
   ret void
 }
 
-; CHECK: warning: Function type mismatch: weakFn
+; 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48400.152185.patch
Type: text/x-patch
Size: 2631 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180620/741ea3d3/attachment.bin>


More information about the llvm-commits mailing list