diff options
author | Sam Clegg <sbc@chromium.org> | 2018-06-20 22:45:03 +0000 |
---|---|---|
committer | Sam Clegg <sbc@chromium.org> | 2018-06-20 22:45:03 +0000 |
commit | 6f5c970c7623f331873382129e629b8f164483fc (patch) | |
tree | 5cfe4d3a19d92e561288834eaef2340b4d28c2ef /lld | |
parent | e0a113bc8584800cadb14dacd4169ba4f969a84d (diff) |
[WebAssembly] Update function signature mismatch error message. NFC.
We don't start our error messages with capital letters.
Split out from https://reviews.llvm.org/D48394
Differential Revision: https://reviews.llvm.org/D48400
Diffstat (limited to 'lld')
-rw-r--r-- | lld/test/wasm/fatal-warnings.ll | 4 | ||||
-rw-r--r-- | lld/test/wasm/signature-mismatch-weak.ll | 2 | ||||
-rw-r--r-- | lld/test/wasm/signature-mismatch.ll | 4 | ||||
-rw-r--r-- | lld/wasm/SymbolTable.cpp | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/lld/test/wasm/fatal-warnings.ll b/lld/test/wasm/fatal-warnings.ll index 9bfe95e50bb..0007dc203f0 100644 --- a/lld/test/wasm/fatal-warnings.ll +++ b/lld/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" diff --git a/lld/test/wasm/signature-mismatch-weak.ll b/lld/test/wasm/signature-mismatch-weak.ll index 8123b609a8b..dbf73d1aa46 100644 --- a/lld/test/wasm/signature-mismatch-weak.ll +++ b/lld/test/wasm/signature-mismatch-weak.ll @@ -13,6 +13,6 @@ entry: 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 diff --git a/lld/test/wasm/signature-mismatch.ll b/lld/test/wasm/signature-mismatch.ll index 5b91c19bdb0..d750d4f6b35 100644 --- a/lld/test/wasm/signature-mismatch.ll +++ b/lld/test/wasm/signature-mismatch.ll @@ -17,10 +17,10 @@ entry: 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 diff --git a/lld/wasm/SymbolTable.cpp b/lld/wasm/SymbolTable.cpp index 6cc7c36db88..1180cfc6759 100644 --- a/lld/wasm/SymbolTable.cpp +++ b/lld/wasm/SymbolTable.cpp @@ -116,7 +116,7 @@ static void checkFunctionType(const Symbol *Existing, const InputFile *File, 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)); |