浏览代码

[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
Eric Liu 7 年之前
父节点
当前提交
d07522f042
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      lib/Target/WebAssembly/WebAssemblyAddMissingPrototypes.cpp

+ 2 - 0
lib/Target/WebAssembly/WebAssemblyAddMissingPrototypes.cpp

@@ -123,7 +123,9 @@ bool WebAssemblyAddMissingPrototypes::runOnModule(Module &M) {
         Replacements.emplace_back(&F, NewF);
         Replacements.emplace_back(&F, NewF);
       } else {
       } else {
         dbgs() << *U.getUser()->getType() << "\n";
         dbgs() << *U.getUser()->getType() << "\n";
+#ifndef NDEBUG
         U.getUser()->dump();
         U.getUser()->dump();
+#endif
         report_fatal_error(
         report_fatal_error(
             "unexpected use of prototypeless function: " + F.getName() + "\n");
             "unexpected use of prototypeless function: " + F.getName() + "\n");
       }
       }