summaryrefslogtreecommitdiffstats
path: root/llvm
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
commit013b42cb1dff96951d8267f0d793ccb856a1974d (patch)
tree60e33e1d89242856dc0a4811fe5deadee4f9abfb /llvm
parentbd2b610eba36ac785692ba76f44ff9c14781eef6 (diff)
downloadbcm5719-llvm-013b42cb1dff96951d8267f0d793ccb856a1974d.tar.gz
bcm5719-llvm-013b42cb1dff96951d8267f0d793ccb856a1974d.zip
Add a version of DisplayGraph that takes a StringRef.
llvm-svn: 183915
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/Support/GraphWriter.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/GraphWriter.h b/llvm/include/llvm/Support/GraphWriter.h
index e867fae726d..04daadf4469 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<typename GraphType>
class GraphWriter {
raw_ostream &O;
OpenPOWER on IntegriCloud