diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp index 215c63c1233c..e2d0ad49cf61 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp @@ -842,8 +842,8 @@ void llvm::getLibcallSignature(const WebAssemblySubtarget &Subtarget, auto Val = Map.find(Name); #ifndef NDEBUG if (Val == Map.end()) { - errs() << "runtime library name: " << Name << "\n"; - llvm_unreachable("unexpected runtime library name"); + auto message = std::string("unexpected runtime library name: ") + Name; + llvm_unreachable(message.c_str()); } #endif return getLibcallSignature(Subtarget, Val->second, Rets, Params);