summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-13 16:56:13 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-13 16:56:13 +0000
commitba0e380ea9eaf051c45ce072f4cac7dccc867c90 (patch)
treeaa29c916a2fd618bdb66737d968285d17152341b /include
parent8117ac555d06b23f61ddd06aa54d3dfa3e5b8e56 (diff)
downloadllvm-ba0e380ea9eaf051c45ce072f4cac7dccc867c90.tar.gz
llvm-ba0e380ea9eaf051c45ce072f4cac7dccc867c90.tar.bz2
llvm-ba0e380ea9eaf051c45ce072f4cac7dccc867c90.tar.xz
Add a version of DisplayGraph that takes a StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183915 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/GraphWriter.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Support/GraphWriter.h b/include/llvm/Support/GraphWriter.h
index e867fae726..04daadf446 100644
--- a/include/llvm/Support/GraphWriter.h
+++ b/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<typename GraphType>
class GraphWriter {
raw_ostream &O;