From 013b42cb1dff96951d8267f0d793ccb856a1974d Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 13 Jun 2013 16:56:13 +0000 Subject: [PATCH] Add a version of DisplayGraph that takes a StringRef. llvm-svn: 183915 --- llvm/include/llvm/Support/GraphWriter.h | 6 ++++++ 1 file changed, 6 insertions(+) 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;