summaryrefslogtreecommitdiffstats
path: root/lld/wasm/SymbolTable.cpp
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2018-06-22 15:13:10 +0000
committerSam Clegg <sbc@chromium.org>2018-06-22 15:13:10 +0000
commitffd0aaf810e7dbae871c046a9b3c48ae0a7d7eb0 (patch)
tree073d1fc9d8b79126d1cb8a6cb68c9616d0a0e011 /lld/wasm/SymbolTable.cpp
parenta99b3759bfc34a253a271f5bc8f5c7a6c2cfd284 (diff)
downloadbcm5719-llvm-ffd0aaf810e7dbae871c046a9b3c48ae0a7d7eb0.tar.gz
bcm5719-llvm-ffd0aaf810e7dbae871c046a9b3c48ae0a7d7eb0.zip
Revert "[WebAssembly] Error on mismatched function signature in final output"
This caused a lot of issues on the WebAssembly waterfall. In particular, until with the signature of `main`. We probably want a better solution for main before we re-land. Reverts rL335192 llvm-svn: 335355
Diffstat (limited to 'lld/wasm/SymbolTable.cpp')
-rw-r--r--lld/wasm/SymbolTable.cpp25
1 files changed, 5 insertions, 20 deletions
diff --git a/lld/wasm/SymbolTable.cpp b/lld/wasm/SymbolTable.cpp
index 77b2f18c286..1180cfc6759 100644
--- a/lld/wasm/SymbolTable.cpp
+++ b/lld/wasm/SymbolTable.cpp
@@ -106,7 +106,7 @@ static void reportTypeError(const Symbol *Existing, const InputFile *File,
" in " + toString(File));
}
-static void checkFunctionType(Symbol *Existing, const InputFile *File,
+static void checkFunctionType(const Symbol *Existing, const InputFile *File,
const WasmSignature *NewSig) {
auto ExistingFunction = dyn_cast<FunctionSymbol>(Existing);
if (!ExistingFunction) {
@@ -114,27 +114,12 @@ static void checkFunctionType(Symbol *Existing, const InputFile *File,
return;
}
-
const WasmSignature *OldSig = ExistingFunction->getFunctionType();
if (OldSig && NewSig && *NewSig != *OldSig) {
- // Don't generate more than one warning per symbol.
- if (Existing->SignatureMismatch)
- return;
- Existing->SignatureMismatch = true;
-
- std::string msg = ("function signature mismatch: " + Existing->getName() +
- "\n>>> defined as " + toString(*OldSig) + " in " +
- toString(Existing->getFile()) + "\n>>> defined as " +
- toString(*NewSig) + " in " + toString(File))
- .str();
- // A function signature mismatch is only really problem if the mismatched
- // symbol is included in the final output, and gc-sections can remove the
- // offending uses. Therefore we delay reporting this as an error when
- // section GC is enabled.
- if (Config->GcSections)
- warn(msg);
- else
- error(msg);
+ warn("function signature mismatch: " + Existing->getName() +
+ "\n>>> defined as " + toString(*OldSig) + " in " +
+ toString(Existing->getFile()) + "\n>>> defined as " +
+ toString(*NewSig) + " in " + toString(File));
}
}
OpenPOWER on IntegriCloud