Index: src/compiler/pipeline.cc |
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc |
index bd99944149ec4adab18c97b2f9f3f85242888131..60b04cb6da37a33ad84cf7305bca53c3d895e43e 100644 |
--- a/src/compiler/pipeline.cc |
+++ b/src/compiler/pipeline.cc |
@@ -87,12 +87,16 @@ void Pipeline::VerifyAndPrintGraph(Graph* graph, const char* phase) { |
if (FLAG_trace_turbo) { |
char buffer[256]; |
Vector<char> filename(buffer, sizeof(buffer)); |
- SmartArrayPointer<char> functionname = |
- info_->shared_info()->DebugName()->ToCString(); |
- if (strlen(functionname.get()) > 0) { |
- SNPrintF(filename, "turbo-%s-%s.dot", functionname.get(), phase); |
+ if (!info_->shared_info().is_null()) { |
+ SmartArrayPointer<char> functionname = |
+ info_->shared_info()->DebugName()->ToCString(); |
+ if (strlen(functionname.get()) > 0) { |
+ SNPrintF(filename, "turbo-%s-%s.dot", functionname.get(), phase); |
+ } else { |
+ SNPrintF(filename, "turbo-%p-%s.dot", static_cast<void*>(info_), phase); |
+ } |
} else { |
- SNPrintF(filename, "turbo-%p-%s.dot", static_cast<void*>(info_), phase); |
+ SNPrintF(filename, "turbo-none-%s.dot", phase); |
} |
std::replace(filename.start(), filename.start() + filename.length(), ' ', |
'_'); |