OSDN Git Service

[WebAssembly] Only call llvm::value::dump() in debug build.
authorEric Liu <ioeric@google.com>
Wed, 11 Jul 2018 08:16:47 +0000 (08:16 +0000)
committerEric Liu <ioeric@google.com>
Wed, 11 Jul 2018 08:16:47 +0000 (08:16 +0000)
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

index 91b0b4a..4af9cd1 100644 (file)
@@ -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");
       }