]> granicus.if.org Git - clang/commitdiff
Avoid calling dump() in normal code
authorMatthias Braun <matze@braunis.de>
Sat, 28 Jan 2017 02:36:00 +0000 (02:36 +0000)
committerMatthias Braun <matze@braunis.de>
Sat, 28 Jan 2017 02:36:00 +0000 (02:36 +0000)
dump() is only available in debug builds and meant for debugger usage,
normal code should use something like print(errs());

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293364 91177308-0d34-0410-b5e6-96231b3b80d8

tools/clang-offload-bundler/ClangOffloadBundler.cpp

index 20988b48ede1e35229dc2d35c138aa73c91d33b1..f37868fb6186b262fce924618ec7435341c5a84b 100644 (file)
@@ -514,7 +514,10 @@ public:
     // Dump the contents of the temporary file if that was requested.
     if (DumpTemporaryFiles) {
       errs() << ";\n; Object file bundler IR file.\n;\n";
-      AuxModule.get()->dump();
+      AuxModule.get()->print(errs(), nullptr,
+                             /*ShouldPreserveUseListOrder=*/false,
+                             /*IsForDebug=*/true);
+      errs() << '\n';
     }
 
     // Find clang in order to create the bundle binary.