diff --git a/llvm/include/llvm/CodeGen/MachineModuleInfoImpls.h b/llvm/include/llvm/CodeGen/MachineModuleInfoImpls.h index 58f7163d7b819..f8a328f13eded 100644 --- a/llvm/include/llvm/CodeGen/MachineModuleInfoImpls.h +++ b/llvm/include/llvm/CodeGen/MachineModuleInfoImpls.h @@ -15,7 +15,7 @@ #define LLVM_CODEGEN_MACHINEMODULEINFOIMPLS_H #include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/StringSet.h" +#include "llvm/ADT/SetVector.h" #include "llvm/CodeGen/MachineModuleInfo.h" #include @@ -110,7 +110,7 @@ class MachineModuleInfoWasm : public MachineModuleInfoImpl { public: MachineModuleInfoWasm(const MachineModuleInfo &) {} - StringSet<> MachineSymbolsUsed; + SetVector MachineSymbolsUsed; }; } // end namespace llvm diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp index f0002494a9517..b9e6e0f534198 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp @@ -303,8 +303,8 @@ void WebAssemblyAsmPrinter::emitDecls(const Module &M) { // only find symbols that have been used. Unused symbols from globals will // not be found here. MachineModuleInfoWasm &MMIW = MMI->getObjFileInfo(); - for (const auto &Name : MMIW.MachineSymbolsUsed) { - auto *WasmSym = cast(getOrCreateWasmSymbol(Name.getKey())); + for (StringRef Name : MMIW.MachineSymbolsUsed) { + auto *WasmSym = cast(getOrCreateWasmSymbol(Name)); if (WasmSym->isFunction()) { // TODO(wvo): is there any case where this overlaps with the call to // emitFunctionType in the loop below? diff --git a/llvm/test/CodeGen/WebAssembly/functype-emission.ll b/llvm/test/CodeGen/WebAssembly/functype-emission.ll index 617267a216c63..bd18288fcf862 100644 --- a/llvm/test/CodeGen/WebAssembly/functype-emission.ll +++ b/llvm/test/CodeGen/WebAssembly/functype-emission.ll @@ -3,8 +3,8 @@ ; Demonstrates that appropriate .functype directives are emitted for defined ; functions, declared functions, and any libcalls. -; CHECK: .functype __unordtf2 (i64, i64, i64, i64) -> (i32) ; CHECK: .functype __multi3 (i32, i64, i64, i64, i64) -> () +; CHECK: .functype __unordtf2 (i64, i64, i64, i64) -> (i32) ; CHECK: .functype defined_fun_1 (f64) -> (i64) ; CHECK: .functype defined_fun_2 (f64, i32) -> (i64) ; CHECK: .functype declared_fun (i32, f32, i64) -> (i32)