diff --git a/llvm/include/llvm/Support/GraphWriter.h b/llvm/include/llvm/Support/GraphWriter.h index e867fae726d6..04daadf4469a 100644 --- a/llvm/include/llvm/Support/GraphWriter.h +++ b/llvm/include/llvm/Support/GraphWriter.h @@ -53,6 +53,12 @@ namespace GraphProgram { void DisplayGraph(const sys::Path& Filename, bool wait=true, GraphProgram::Name program = GraphProgram::DOT); +inline void DisplayGraph(StringRef Filename, bool wait = true, + GraphProgram::Name program = GraphProgram::DOT) { + sys::Path P(Filename); + DisplayGraph(P, wait, program); +} + template class GraphWriter { raw_ostream &O;