diff options
Diffstat (limited to 'lib/Support/GraphWriter.cpp')
| -rw-r--r-- | lib/Support/GraphWriter.cpp | 19 | 
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/Support/GraphWriter.cpp b/lib/Support/GraphWriter.cpp index f70b77da8de4..e04bd8bb3b9a 100644 --- a/lib/Support/GraphWriter.cpp +++ b/lib/Support/GraphWriter.cpp @@ -1,4 +1,4 @@ -//===-- GraphWriter.cpp - Implements GraphWriter support routines ---------===// +//===- GraphWriter.cpp - Implements GraphWriter support routines ----------===//  //  //                     The LLVM Compiler Infrastructure  // @@ -12,10 +12,22 @@  //===----------------------------------------------------------------------===//  #include "llvm/Support/GraphWriter.h" +#include "llvm/ADT/SmallString.h" +#include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/StringRef.h"  #include "llvm/Config/config.h"  #include "llvm/Support/CommandLine.h" +#include "llvm/Support/Compiler.h" +#include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/ErrorOr.h"  #include "llvm/Support/FileSystem.h"  #include "llvm/Support/Program.h" +#include "llvm/Support/raw_ostream.h" +#include <cassert> +#include <system_error> +#include <string> +#include <vector> +  using namespace llvm;  static cl::opt<bool> ViewBackground("view-background", cl::Hidden, @@ -99,8 +111,10 @@ static bool ExecGraphViewer(StringRef ExecPath, std::vector<const char *> &args,  }  namespace { +  struct GraphSession {    std::string LogBuffer; +    bool TryFindProgram(StringRef Names, std::string &ProgramPath) {      raw_string_ostream Log(LogBuffer);      SmallVector<StringRef, 8> parts; @@ -115,7 +129,8 @@ struct GraphSession {      return false;    }  }; -} // namespace + +} // end anonymous namespace  static const char *getProgramName(GraphProgram::Name program) {    switch (program) {  | 
