summaryrefslogtreecommitdiff
path: root/compiler/optimizing/optimizing_compiler.cc
diff options
context:
space:
mode:
author Calin Juravle <calin@google.com> 2015-09-16 14:34:41 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-09-16 14:34:41 +0000
commit831904f6fb678354bdf8e7736723a9d87a2cde31 (patch)
tree49fd12aaad3102b397803f8eebc99a866edbf111 /compiler/optimizing/optimizing_compiler.cc
parentfe157012b6d760c275d944ff83e8bea371c59b09 (diff)
parent87000a948524cba7538ccc5438f6a9ecbd4e347e (diff)
Merge "Add option to append to the cfg dump."
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r--compiler/optimizing/optimizing_compiler.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index 8fc1e4e47d..092e3c2876 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -334,7 +334,9 @@ void OptimizingCompiler::Init() {
CHECK_EQ(driver->GetThreadCount(), 1U)
<< "Graph visualizer requires the compiler to run single-threaded. "
<< "Invoke the compiler with '-j1'.";
- visualizer_output_.reset(new std::ofstream(cfg_file_name));
+ std::ios_base::openmode cfg_file_mode =
+ driver->GetDumpCfgAppend() ? std::ofstream::app : std::ofstream::out;
+ visualizer_output_.reset(new std::ofstream(cfg_file_name, cfg_file_mode));
}
if (driver->GetDumpStats()) {
compilation_stats_.reset(new OptimizingCompilerStats());