From d07522f0425f3ba366d622b1cc56b1fe1b24bfb8 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Wed, 11 Jul 2018 08:16:47 +0000 Subject: [PATCH] [WebAssembly] Only call llvm::value::dump() in debug build. This fixes compile error in r336759. llvm::value::dump is not available in released build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336770 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/WebAssembly/WebAssemblyAddMissingPrototypes.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Target/WebAssembly/WebAssemblyAddMissingPrototypes.cpp b/lib/Target/WebAssembly/WebAssemblyAddMissingPrototypes.cpp index 91b0b4aac2b..4af9cd150bf 100644 --- a/lib/Target/WebAssembly/WebAssemblyAddMissingPrototypes.cpp +++ b/lib/Target/WebAssembly/WebAssemblyAddMissingPrototypes.cpp @@ -123,7 +123,9 @@ bool WebAssemblyAddMissingPrototypes::runOnModule(Module &M) { Replacements.emplace_back(&F, NewF); } else { dbgs() << *U.getUser()->getType() << "\n"; +#ifndef NDEBUG U.getUser()->dump(); +#endif report_fatal_error( "unexpected use of prototypeless function: " + F.getName() + "\n"); } -- 2.11.0