[WebAssembly] Make an assertion message prettier. NFC.
authorDan Gohman <dan433584@gmail.com>
Mon, 29 Apr 2019 22:37:08 +0000 (22:37 +0000)
committerDan Gohman <dan433584@gmail.com>
Mon, 29 Apr 2019 22:37:08 +0000 (22:37 +0000)
This is a follow-up to https://reviews.llvm.org/D59521.

llvm-svn: 359509

llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp

index 215c63c..e2d0ad4 100644 (file)
@@ -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);