[WebAssembly] Update to match llvm changes
Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D46849
llvm-svn: 332306
diff --git a/lld/wasm/SymbolTable.cpp b/lld/wasm/SymbolTable.cpp
index 54e04ab..e86d82f 100644
--- a/lld/wasm/SymbolTable.cpp
+++ b/lld/wasm/SymbolTable.cpp
@@ -69,17 +69,17 @@
}
static void reportTypeError(const Symbol *Existing, const InputFile *File,
- StringRef Type) {
+ llvm::wasm::WasmSymbolType Type) {
error("symbol type mismatch: " + toString(*Existing) + "\n>>> defined as " +
toString(Existing->getWasmType()) + " in " +
- toString(Existing->getFile()) + "\n>>> defined as " + Type + " in " +
- toString(File));
+ toString(Existing->getFile()) + "\n>>> defined as " + toString(Type) +
+ " in " + toString(File));
}
static void checkFunctionType(const Symbol *Existing, const InputFile *File,
const WasmSignature *NewSig) {
if (!isa<FunctionSymbol>(Existing)) {
- reportTypeError(Existing, File, "Function");
+ reportTypeError(Existing, File, WASM_SYMBOL_TYPE_FUNCTION);
return;
}
@@ -98,7 +98,7 @@
static void checkGlobalType(const Symbol *Existing, const InputFile *File,
const WasmGlobalType *NewType) {
if (!isa<GlobalSymbol>(Existing)) {
- reportTypeError(Existing, File, "Global");
+ reportTypeError(Existing, File, WASM_SYMBOL_TYPE_GLOBAL);
return;
}
@@ -112,7 +112,7 @@
static void checkDataType(const Symbol *Existing, const InputFile *File) {
if (!isa<DataSymbol>(Existing))
- reportTypeError(Existing, File, "Data");
+ reportTypeError(Existing, File, WASM_SYMBOL_TYPE_DATA);
}
DefinedFunction *SymbolTable::addSyntheticFunction(StringRef Name,